Skip to content

Commit

Permalink
Test both Debug and Release configurations in CI
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Thaler <[email protected]>
  • Loading branch information
dthaler authored and elazarg committed Jun 15, 2021
1 parent ae42271 commit 4ba3bd0
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ on:

jobs:
build_ubuntu:
strategy:
matrix:
configurations: [Debug, Release]
runs-on: ubuntu-20.04
env:
# Configuration type to build. For documentation on how build matrices work, see
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: ${{matrix.configurations}}

steps:
- name: Install dependencies
Expand All @@ -19,14 +26,21 @@ jobs:
- name: Build
run: |
mkdir build
cmake -B build -DCMAKE_BUILD_TYPE=Debug
cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_CONFIGURATION}}
cmake --build build -j $(nproc)
- name: Run unit tests
run: ./tests -d yes

build_windows:
strategy:
matrix:
configurations: [Debug, Release]
runs-on: windows-latest
env:
# Configuration type to build. For documentation on how build matrices work, see
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: ${{matrix.configurations}}

steps:
- uses: actions/checkout@v2
Expand All @@ -37,7 +51,7 @@ jobs:
run: |
mkdir build
cmake -B build
cmake --build build -j $(nproc) --config Release
cmake --build build -j $(nproc) --config ${{env.BUILD_CONFIGURATION}}
- name: Run unit tests
run: ./Release/tests -d yes
run: ./${{env.BUILD_CONFIGURATION}}/tests -d yes

0 comments on commit 4ba3bd0

Please sign in to comment.