Refactor CMake with JRL CMake Modules v2 #32
Workflow file for this run
This file contains hidden or 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: CI - Linux via APT | |
| on: | |
| push: | |
| branches: | |
| - devel | |
| pull_request: | |
| paths-ignore: | |
| - CHANGELOG.md | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| ubuntu: | |
| name: "Ubuntu ${{ matrix.ubuntu }}.04" | |
| runs-on: "ubuntu-${{ matrix.ubuntu }}.04" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ubuntu: [22, 24] | |
| env: | |
| CCACHE_BASEDIR: ${{ github.workspace }} | |
| CCACHE_DIR: ${{ github.workspace }}/.ccache | |
| CCACHE_COMPRESS: true | |
| CCACHE_COMPRESSLEVEL: 6 | |
| CMAKE_BUILD_PARALLEL_LEVEL: 2 | |
| CMAKE_C_COMPILER_LAUNCHER: ccache | |
| CMAKE_CXX_COMPILER_LAUNCHER: ccache | |
| steps: | |
| - run: sudo apt-get update | |
| - run: sudo apt-get install -y cmake ninja-build ccache graphviz libmatio-dev doxygen catch2 libeigen3-dev python3-numpy python3-dev python3-scipy | |
| - uses: actions/checkout@v6 | |
| - name: Setup ccache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.CCACHE_DIR }} | |
| key: ${{ runner.os }}-ccache-${{ matrix.ubuntu }}-${{ hashFiles('**/CMakeLists.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-ccache-${{ matrix.ubuntu }}- | |
| ${{ runner.os }}-ccache- | |
| - name: Clear ccache stats | |
| run: ccache --show-stats --zero-stats --verbose | |
| - name: CMake Configure | |
| run: /usr/bin/cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release | |
| - name: CMake Build | |
| run: /usr/bin/cmake --build build | |
| - name: Show ccache stats | |
| run: ccache --show-stats --verbose | |
| - name: CTest | |
| run: /usr/bin/ctest --test-dir build --output-on-failure | |
| - name: CMake Install | |
| run: /usr/bin/cmake --install build --prefix install | |
| check: | |
| if: always() | |
| name: check-linux | |
| needs: | |
| - ubuntu | |
| runs-on: Ubuntu-latest | |
| steps: | |
| - name: Decide whether the needed jobs succeeded or failed | |
| uses: re-actors/alls-green@release/v1 | |
| with: | |
| jobs: ${{ toJSON(needs) }} |