Merge. #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CMake | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
name: ${{ matrix.os }}.${{ matrix.compiler }}.${{ matrix.build_type }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-22.04 ] | |
compiler: [ 'g++-12', 'g++-11', 'clang-14' ] | |
build_type: [ 'Debug', 'Release' ] | |
env: | |
MATRIX_OS: ${{ matrix.os }} | |
MATRIX_COMPILER: ${{ matrix.compiler }} | |
MATRIX_BUILD_TYPE: ${{ matrix.build_type }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install software | |
shell: bash | |
run: | | |
sudo apt install ${{ matrix.compiler }} | |
sudo apt install libboost-all-dev | |
sudo apt install cmake ninja-build | |
- name: Configure CMake | |
shell: bash | |
run: | | |
source ${{github.workspace}}/actions_config.sh | |
cmake -B ${{github.workspace}}/build $CMAKE_ARGS -G Ninja | |
- name: Build | |
working-directory: ${{github.workspace}}/build | |
run: ninja | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: ctest |