Spack buildcache build #95
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: Spack buildcache build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| inputs: | |
| name: | |
| type: boolean | |
| description: Create a fresh buildcache | |
| default: false | |
| env: | |
| SPACK_BACKTRACE: please | |
| jobs: | |
| rebuild: | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup Spack | |
| uses: spack/setup-spack@v3 | |
| - name: Find compilers | |
| run: spack -e . compiler find | |
| - name: Show packages config | |
| run: spack -e . config get packages | |
| - name: Concretize (fresh) | |
| run: spack -e . -v concretize --fresh | |
| if: ${{ github.event.inputs.name == 'true' }} | |
| - name: Concretize (reuse) | |
| run: spack -e . -v concretize | |
| if: ${{ github.event.inputs.name == 'false' || github.event_name != 'workflow_dispatch' }} | |
| - name: Install | |
| run: | | |
| spack -e . env depfile -o Makefile | |
| make -Orecurse -j $(($(nproc) + 1)) | |
| - name: Push packages and update index | |
| env: | |
| GITHUB_USER: ${{ github.actor }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: spack -e . buildcache push -j $(($(nproc) + 1)) --base-image ubuntu:22.04 --update-index github-actions-buildcache | |
| if: ${{ !cancelled() }} |