Skip to content

Commit d31e493

Browse files
committed
ci: prune gcc@10/11 compilers that don't exist on ubuntu-24.04
--reuse pulls buildcache specs compiled with gcc@10. When a package has no binary (e.g. py-pyyaml) spack falls back to source build and invokes /usr/bin/gcc-10, which doesn't exist on ubuntu-24.04. Remove compilers that aren't present on the runner before concretizing so spack picks gcc@12+ for any source-built fallbacks.
1 parent e49d839 commit d31e493

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/spack.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,17 @@ jobs:
2626
packages_ref: f0bb11a611fb7f311e788da778208be234601797
2727
buildcache: true
2828

29+
- name: Prune compilers not present on this runner
30+
run: |
31+
source spack/share/spack/setup-env.sh
32+
spack compiler find
33+
# ubuntu-24.04 ships gcc-12..14; gcc-10/11 binaries from the
34+
# buildcache cannot be used for source builds (no /usr/bin/gcc-10).
35+
for v in 10 11; do
36+
spack compiler rm "gcc@${v}" 2>/dev/null || true
37+
done
38+
spack compilers
39+
2940
- name: Cache Spack install store
3041
uses: actions/cache@v4
3142
with:

0 commit comments

Comments
 (0)