Skip to content

Commit

Permalink
Simplify MacOS builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Morwenn committed Jan 5, 2021
1 parent 0ad187d commit 2cc9016
Showing 1 changed file with 11 additions and 25 deletions.
36 changes: 11 additions & 25 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,16 @@ jobs:
strategy:
fail-fast: false
matrix:
# Default configuration corresponds to a release
# build without additional tooling, also provides
# default options for other builds
cxx:
- g++-9
- $(brew --prefix llvm)/bin/clang++ # Clang 11
build_type: [Release]
sanitize: ['']

# Below are debug builds with tooling
include:
# GCC builds
- cxx: g++-9
build_type: Debug
sanitize: address
- cxx: g++-9
build_type: Debug
sanitize: undefined
# Clang builds
- cxx: $(brew --prefix llvm)/bin/clang++
build_type: Debug
config:
# Release build
- build_type: Release
# Debug builds
- build_type: Debug
sanitize: address
- cxx: $(brew --prefix llvm)/bin/clang++
build_type: Debug
- build_type: Debug
sanitize: undefined

steps:
Expand All @@ -63,19 +49,19 @@ jobs:
run: |
export CXX=${{matrix.cxx}}
cmake -H${{github.event.repository.name}} -Bbuild \
-DCMAKE_CONFIGURATION_TYPES=${{matrix.build_type}} \
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DSANITIZE=${{matrix.sanitize}} \
-DCMAKE_CONFIGURATION_TYPES=${{matrix.config.build_type}} \
-DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} \
-DSANITIZE=${{matrix.config.sanitize}} \
-GNinja \
-DBUILD_EXAMPLES=ON
- name: Build the test suite
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config ${{matrix.build_type}} -j 2
run: cmake --build . --config ${{matrix.config.build_type}} -j 2

- name: Run the test suite
env:
CTEST_OUTPUT_ON_FAILURE: 1
working-directory: ${{runner.workspace}}/build
run: ctest -C ${{matrix.build_type}}
run: ctest -C ${{matrix.config.build_type}}

0 comments on commit 2cc9016

Please sign in to comment.