diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 6920f64..1258d77 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -15,25 +15,40 @@ jobs: - releases/v0.21 steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - name: Set up Spack uses: ./ with: ref: ${{ matrix.ref }} buildcache: true color: true + - name: Version check run: spack --version + - name: Check build cache config run: spack config blame mirrors - - name: Check build cache install in active env with spack-bash shell + + - name: Check build cache install in active env with spack-bash shell (new style) shell: spack-bash {0} run: | spack env activate - spack install --add --cache-only --no-check-signature --reuse python + spack install --add --cache-only --reuse python which python3 python3 -c 'print("hello world")' + if: matrix.ref == 'develop' + + - name: Check build cache install in active env with spack-bash shell (old style) + shell: spack-bash {0} + run: | + spack env activate + spack install --add --cache-only --reuse --no-check-signature python + which python3 + python3 -c 'print("hello world")' + if: matrix.ref == 'develop' + - name: Check spack-sh shell shell: spack-sh {0} run: | spack env activate - spack env status \ No newline at end of file + spack env status diff --git a/README.md b/README.md index 7a4f71e..5ed8f24 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,20 @@ jobs: buildcache: true # Configure oci://ghcr.io/spack/github-actions-buildcache color: true # Force color output (SPACK_COLOR=always) path: spack # Where to clone Spack - - run: spack install --no-check-signature --reuse python + - run: spack install python ``` When `buildcache: true` is set, binaries from https://github.com/spack/github-actions-buildcache are used. For available software, [see here](https://github.com/spack/github-actions-buildcache/blob/main/spack.yaml). -These binaries are unsigned, so you have to specify `install --no-check-signature`. +**Note**: when using the build cache with Spack v0.21 and below, the following flag is +required: + +``` +spack install --no-check-signature +``` + +This flag is no longer required in Spack v0.22. ## Example: shell support diff --git a/action.yml b/action.yml index 32b16c0..c5027cd 100644 --- a/action.yml +++ b/action.yml @@ -40,6 +40,8 @@ runs: - name: Spack configuration run: | if [ ${{ inputs.buildcache }} = "true" ]; then + # Spack 0.22 should support the --unsigned flag + spack mirror add --unsigned github-actions-buildcache oci://ghcr.io/spack/github-actions-buildcache || \ spack mirror add github-actions-buildcache oci://ghcr.io/spack/github-actions-buildcache fi shell: sh