Skip to content

Commit

Permalink
DRAFT 215 - Test initial Github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmai committed Nov 7, 2023
1 parent 20390d7 commit 3ef68c8
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 730 deletions.
63 changes: 0 additions & 63 deletions .appveyor.yml

This file was deleted.

69 changes: 69 additions & 0 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# This workflow is for a CMake project running on multiple platforms.
name: CMake on multiple platforms

on: [push, pull_request]

jobs:
build:
name: ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.c_compiler }})
runs-on: ${{ matrix.os }}

strategy:
# Deliver the feedback for all matrix combinations.
fail-fast: false

matrix:
build_type: [ Release ]
include:
- target_arch: amd64
os: macos-latest
c_compiler: clang
- target_arch: amd64
os: ubuntu-latest
c_compiler: clang
- target_arch: amd64
os: ubuntu-latest
c_compiler: gcc
- target_arch: amd64
os: windows-latest
c_compiler: cl
- target_arch: amd64
os: windows-latest
c_compiler: clang
- target_arch: amd64
os: windows-latest
c_compiler: gcc
#armv6 alpine_latest
#armv7 ubuntu_latest
#aarch64 alpine_latest
#riscv64 ubuntu_latest
#s390x fedora_latest
#ppc64le fedora_latest

steps:
- uses: actions/checkout@v4

- name: Set reusable strings
# Turn repeated input strings into step outputs.
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Configure CMake
# Configure CMake in a 'build' subdirectory.
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-Dbuild_tests=ON
-S ${{ github.workspace }}
- name: Build
# Build the code with the given configuration.
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}

- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
# Execute tests defined by the CMake configuration.
run: ctest --build-config ${{ matrix.build_type }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Makefile
*.pdb
*.so

/build/
/out/

/src/.deps/
Expand Down
Loading

0 comments on commit 3ef68c8

Please sign in to comment.