Modernize CMake package config and install layout #15
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: GitHub Actions | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| ubuntu: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install MPICH | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y mpich libmpich-dev | |
| - name: Configure | |
| run: cmake -S . -B build -DROSS_BUILD_MODELS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PWD/install | |
| - name: Build | |
| run: cmake --build build -j | |
| - name: Test | |
| run: ctest --test-dir build --output-on-failure | |
| - name: Install | |
| run: cmake --install build | |
| - name: Upload logs on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-logs | |
| path: | | |
| build/Testing/Temporary/LastTest.log | |
| build/Testing/Temporary/LastTestsFailed.log | |
| build/CMakeFiles/CMakeError.log | |
| build/CMakeFiles/CMakeOutput.log | |
| build/CMakeCache.txt | |
| if-no-files-found: ignore | |
| retention-days: 14 | |
| coverage: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install MPICH and lcov | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y mpich libmpich-dev lcov | |
| - name: Configure with coverage | |
| run: cmake -S . -B build -DROSS_BUILD_MODELS=ON -DCMAKE_BUILD_TYPE=Debug -DROSS_ENABLE_COVERAGE=ON | |
| - name: Build | |
| run: cmake --build build -j | |
| - name: Test | |
| run: ctest --test-dir build --output-on-failure | |
| - name: Collect coverage | |
| run: | | |
| lcov --capture --directory build --output-file coverage.info \ | |
| --ignore-errors mismatch,gcov,source,unused | |
| lcov --remove coverage.info \ | |
| '/usr/*' \ | |
| '*/core/lz4.*' \ | |
| '*/models/*' \ | |
| --output-file coverage.info \ | |
| --ignore-errors unused | |
| lcov --list coverage.info | |
| - name: Upload to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: coverage.info | |
| fail_ci_if_error: false | |
| - name: Upload coverage artifact | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-info | |
| path: coverage.info | |
| if-no-files-found: ignore | |
| retention-days: 14 |