diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 3c6f2fa4..4e1887f1 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -2,15 +2,13 @@ name: linux on: [push] -env: - BUILD_TYPE: Release - jobs: build: runs-on: ubuntu-18.04 strategy: matrix: cxx: [g++-8, clang++] + build_type: [Debug, Release] steps: - uses: actions/checkout@v2 @@ -22,12 +20,12 @@ jobs: working-directory: ${{runner.workspace}}/build env: CXX: ${{matrix.cxx}} - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE + run: cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} $GITHUB_WORKSPACE - name: Build working-directory: ${{runner.workspace}}/build - run: cmake --build . --config $BUILD_TYPE + run: cmake --build . --config ${{matrix.build_type}} - name: Test working-directory: ${{runner.workspace}}/build - run: ctest -C $BUILD_TYPE + run: ctest -C ${{matrix.build_type}} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 3295d6ed..3f04a527 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -2,12 +2,12 @@ name: macos on: [push] -env: - BUILD_TYPE: Release - jobs: build: runs-on: macos-10.15 + strategy: + matrix: + build_type: [Debug, Release] steps: - uses: actions/checkout@v2 @@ -17,12 +17,12 @@ jobs: - name: Configure CMake working-directory: ${{runner.workspace}}/build - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE + run: cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} $GITHUB_WORKSPACE - name: Build working-directory: ${{runner.workspace}}/build - run: cmake --build . --config $BUILD_TYPE + run: cmake --build . --config ${{matrix.build_type}} - name: Test working-directory: ${{runner.workspace}}/build - run: ctest -C $BUILD_TYPE + run: ctest -C ${{matrix.build_type}} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 4204d3a3..ed1d280f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -2,12 +2,19 @@ name: windows on: [push] -env: - BUILD_TYPE: Release - jobs: build: - runs-on: windows-2019 + runs-on: ${{matrix.os}} + strategy: + matrix: + # windows-2016 and windows-2019 have MSVC 2017 and 2019 installed + # respectively: https://github.com/actions/virtual-environments. + os: [windows-2016, windows-2019] + platform: [Win32, x64] + build_type: [Debug, Release] + exclude: + - os: windows-2016 + platform: Win32 steps: - uses: actions/checkout@v2 @@ -16,18 +23,17 @@ jobs: run: cmake -E make_directory ${{runner.workspace}}/build - name: Configure CMake - # Use a bash shell so we can use the same syntax for environment variable - # access regardless of the host operating system + # Use a bash shell for $GITHUB_WORKSPACE. shell: bash working-directory: ${{runner.workspace}}/build - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE + run: | + cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ + -A ${{matrix.platform}} $GITHUB_WORKSPACE - name: Build working-directory: ${{runner.workspace}}/build - shell: bash - run: cmake --build . --config $BUILD_TYPE + run: cmake --build . --config ${{matrix.build_type}} - name: Test working-directory: ${{runner.workspace}}/build - shell: bash - run: ctest -C $BUILD_TYPE + run: ctest -C ${{matrix.build_type}}