Add test-dependencies variant
#779
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: Presubmit | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| debug_enabled: | |
| type: boolean | |
| description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | |
| required: false | |
| default: false | |
| env: | |
| SPACK_OPT: "--concurrent-packages 2 --show-log-on-error --fail-fast" | |
| CACHE_DIR: "${{ github.workspace }}/thapi_cache_${{ github.run_id }}" | |
| jobs: | |
| pre_job: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
| steps: | |
| - id: skip_check | |
| uses: fkirc/skip-duplicate-actions@master | |
| with: | |
| concurrent_skipping: 'same_content' | |
| skip_after_successful_duplicate: 'true' | |
| paths_ignore: '["**/README.md"]' | |
| do_not_skip: '["pull_request"]' | |
| install_thapi_dependencies: | |
| needs: pre_job | |
| if: ${{ needs.pre_job.outputs.should_skip != 'true' }} | |
| runs-on: ubuntu-latest | |
| name: Install thapi dependencies | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Checkout Thapi Deps (spack,...) | |
| uses: ./.github/actions/setup-thapi-deps | |
| with: | |
| cache-dir: ${{ env.CACHE_DIR }} | |
| - name: Install thapi dependencies | |
| run: | | |
| . external/spack/share/spack/setup-env.sh | |
| spack install --only dependencies $SPACK_OPT thapi ^ruby | |
| - name: Upload thapi build cache | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: thapi_cache | |
| include-hidden-files: true | |
| path: ${{ env.CACHE_DIR }} | |
| if-no-files-found: error | |
| install_thapi: | |
| strategy: | |
| matrix: | |
| version: ['thapi', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', | |
| '[email protected]', 'thapi@master', 'thapi@develop', 'thapi@develop+archive', | |
| 'thapi@develop ^lttng-tools@master ^lttng-ust@master ^babeltrace2@master'] | |
| needs: install_thapi_dependencies | |
| runs-on: ubuntu-latest | |
| name: Install ${{ matrix.version }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Download thapi build cache | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: thapi_cache | |
| path: ${{ env.CACHE_DIR }} | |
| - name: Checkout Thapi Deps (spack,...) | |
| uses: ./.github/actions/setup-thapi-deps | |
| with: | |
| cache-dir: ${{ env.CACHE_DIR }} | |
| - name: Install clang for new parser | |
| if: startsWith(matrix.version, 'thapi@develop') | |
| run: | | |
| # install llvm+clang | |
| sudo apt-get install libllvm18 llvm-18 llvm-18-dev | |
| sudo apt-get install libclang-18-dev | |
| - name: Install ${{ matrix.version }} | |
| if: ${{ matrix.version != 'thapi@develop ^lttng-tools@master ^lttng-ust@master ^babeltrace2@master' }} | |
| run: | | |
| . external/spack/share/spack/setup-env.sh | |
| spack install $SPACK_OPT ${{ matrix.version }} | |
| - name: Install thapi@develop with master versions of dependencies | |
| if: ${{ matrix.version == 'thapi@develop ^lttng-tools@master ^lttng-ust@master ^babeltrace2@master' }} | |
| continue-on-error: true | |
| run: | | |
| . external/spack/share/spack/setup-env.sh | |
| spack install $SPACK_OPT ${{ matrix.version }} || true | |
| cleanup: | |
| needs: install_thapi | |
| if: always() | |
| runs-on: ubuntu-latest | |
| name: Cleanup the build cache | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: geekyeggo/delete-artifact@v5 | |
| with: | |
| name: thapi_cache |