Rework logic and data structures involved in multi threaded computation #513
Workflow file for this run
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: Build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
ubuntu-build: | |
strategy: | |
fail-fast: false | |
matrix: | |
build-type: [Debug, RelWithDebInfo, Release] | |
compiler: [{c: gcc-10, cpp: g++-10}, {c: gcc-11, cpp: g++-11, code-cov: true}, {c: clang-13, cpp: clang++-13}, {c: clang-14, cpp: clang++-14}, {c: clang-15, cpp: clang++-15}] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Get Conan | |
uses: turtlebrowser/[email protected] | |
with: | |
version: 1.59 | |
- name: Create default profile | |
run: | | |
conan profile new default --detect | |
- name: Configure CMake | |
run: cmake -B ${{ github.workspace }}/build -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp }} -DCMAKE_C_COMPILER=${{ matrix.compiler.c }} -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DUSE_CLANG_TIDY=ON -DCODE_COVERAGE=${{ matrix.build-type == 'Debug' && matrix.compiler.code-cov }} | |
- name: Check compile commands | |
run: cat ${{ github.workspace }}/build/compile_commands.json | |
- name: Build | |
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.build-type }} -j 3 | |
- name: Test | |
working-directory: ${{ github.workspace }}/build | |
run: ctest -C ${{ matrix.build-type }} --output-on-failure | |
- name: Prepare Codecov | |
if: ${{ matrix.build-type == 'Debug' && matrix.compiler.code-cov }} | |
run: | | |
sudo apt-get install -y lcov | |
lcov --directory . --capture --output-file coverage.info --rc lcov_branch_coverage=1 # capture coverage info | |
lcov --remove coverage.info '/usr/*' --output-file coverage.info --rc lcov_branch_coverage=1 # filter out system | |
lcov --remove coverage.info '/home/runner/.conan/*' --output-file coverage.info --rc lcov_branch_coverage=1 # filter out conan files | |
lcov --list coverage.info --rc lcov_branch_coverage=1 # debug info | |
- name: Codecov | |
if: ${{ matrix.build-type == 'Debug' && matrix.compiler.code-cov }} | |
uses: codecov/[email protected] | |
with: | |
files: coverage.info | |
fail_ci_if_error: true | |
verbose: true | |
macos-build: | |
strategy: | |
fail-fast: false | |
matrix: | |
build-type: [Debug, RelWithDebInfo, Release] | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Select Python 3.10 | |
# otherwise turtlebrowser/[email protected] fails on macos-12 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Get Conan | |
uses: turtlebrowser/[email protected] | |
with: | |
version: 1.59 | |
- name: Create default profile | |
# M1 is not supported by all dependencies | |
run: | | |
conan profile new default --detect | |
conan profile update settings.arch=x86_64 default | |
conan profile update settings.arch_build=x86_64 default | |
- name: Configure CMake | |
run: cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} | |
- name: Check compile commands | |
run: cat ${{ github.workspace }}/build/compile_commands.json | |
- name: Build | |
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.build-type }} -j 3 | |
- name: Test | |
working-directory: ${{ github.workspace }}/build | |
run: ctest -C ${{ matrix.build-type }} --output-on-failure | |
windows-build: | |
strategy: | |
fail-fast: false | |
matrix: | |
build-type: [Debug, RelWithDebInfo, Release] | |
os: [windows-latest, windows-2019] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Get Conan | |
uses: turtlebrowser/[email protected] | |
with: | |
version: 1.59 | |
- name: Create default profile | |
run: | | |
conan profile new default --detect | |
- name: Configure CMake | |
run: cmake -B ${{ github.workspace }}/build | |
- name: Build | |
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.build-type }} -j 3 | |
- name: Test | |
working-directory: ${{ github.workspace }}/build | |
run: ctest -C ${{ matrix.build-type }} --output-on-failure |