Repository navigation
Disable OPI in the GitHub workflow #97
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: CMake | |
| on: | |
| push: | |
| branches: [ master, add-moon-reference-system ] | |
| pull_request: | |
| branches: [ master ] | |
| # Cancel any in-progress run on the same branch so stale builds don't queue up | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| BUILD_TYPE: Release | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| # ----------------------------------------------------------------------- | |
| # Dependencies — each is cached by its source tree hash so the build is | |
| # skipped on re-runs where those files haven't changed. | |
| # ----------------------------------------------------------------------- | |
| - name: Cache libslam build | |
| id: cache-libslam | |
| uses: actions/cache@v4 | |
| with: | |
| path: libslam/build | |
| key: libslam-${{ runner.os }}-${{ hashFiles('libslam/**') }} | |
| - name: Build libslam | |
| if: steps.cache-libslam.outputs.cache-hit != 'true' | |
| run: | | |
| cmake -S libslam -B libslam/build \ | |
| -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ | |
| -DENABLE_OpenMP_SUPPORT=OFF \ | |
| -DENABLE_POSTGRESQL_SUPPORT=OFF | |
| cmake --build libslam/build --config ${{ env.BUILD_TYPE }} --parallel $(nproc) | |
| cmake --install libslam/build --config ${{ env.BUILD_TYPE }} | |
| - name: Cache pFUnit build | |
| id: cache-pfunit | |
| uses: actions/cache@v4 | |
| with: | |
| path: pFUnit/build | |
| key: pfunit-${{ runner.os }}-${{ hashFiles('pFUnit/**') }} | |
| - name: Build pFUnit | |
| if: steps.cache-pfunit.outputs.cache-hit != 'true' | |
| run: | | |
| cmake -S pFUnit -B pFUnit/build \ | |
| -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ | |
| -DENABLE_OpenMP_SUPPORT=OFF \ | |
| -DENABLE_POSTGRESQL_SUPPORT=OFF | |
| cmake --build pFUnit/build --config ${{ env.BUILD_TYPE }} --parallel $(nproc) | |
| cmake --install pFUnit/build --config ${{ env.BUILD_TYPE }} | |
| - name: Link dependencies | |
| run: bash link-dependencies.sh | |
| # ----------------------------------------------------------------------- | |
| # NEPTUNE | |
| # ----------------------------------------------------------------------- | |
| - name: Configure NEPTUNE | |
| run: | | |
| cmake -S . -B build \ | |
| -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ | |
| -DENABLE_PFUNIT=ON \ | |
| -DCMAKE_PREFIX_PATH=${{ github.workspace }}/pFUnit/build/installed | |
| - name: Build NEPTUNE | |
| run: cmake --build build --config ${{ env.BUILD_TYPE }} --parallel $(nproc) | |
| - name: Install NEPTUNE | |
| run: cmake --install build --config ${{ env.BUILD_TYPE }} | |
| # ----------------------------------------------------------------------- | |
| # Test | |
| # ----------------------------------------------------------------------- | |
| - name: Test | |
| working-directory: ${{ github.workspace }}/build | |
| run: | | |
| LD_LIBRARY_PATH=${{ github.workspace }}/lib \ | |
| ctest -C ${{ env.BUILD_TYPE }} \ | |
| --output-on-failure \ | |
| --output-junit ../test_report.xml | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results | |
| path: test_report.xml | |
| retention-days: 30 |