Skip to content

Commit 9225ee9

Browse files
committed
ci*.yml: Don't explicitly load compilers
1 parent 2acb571 commit 9225ee9

2 files changed

Lines changed: 12 additions & 50 deletions

File tree

.github/workflows/ci-github-hosted.yml

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,12 @@ jobs:
281281
ln --symbolic --relative --verbose --force ${{ steps.env.outputs.SPACK_ROOT }}/../spack-config/${spack_branch}/ci-upstream/* ${{ steps.env.outputs.SPACK_ROOT }}/etc/spack/
282282
283283
- name: Spack - Initial Enable
284-
run: . ${{ steps.env.outputs.SPACK_ROOT }}/share/spack/setup-env.sh
284+
run: |
285+
. ${{ steps.env.outputs.SPACK_ROOT }}/share/spack/setup-env.sh
286+
echo "----- Compilers -----"
287+
spack compiler list
288+
echo "----- Packages -----"
289+
spack find
285290
286291
- name: Spack - Get spack-packages repo locations
287292
id: spack-packages-locations
@@ -309,30 +314,6 @@ jobs:
309314
ref: ${{ inputs.access-spack-packages-ref }}
310315
spack-instance-root-path: ${{ steps.env.outputs.SPACK_ROOT }}
311316

312-
- name: Spack - Compiler Load
313-
run: |
314-
. ${{ steps.env.outputs.SPACK_ROOT }}/share/spack/setup-env.sh
315-
316-
# Find potential upstream compiler lockfile path
317-
if [ -f "/opt/upstream/compilers.spack.lock" ]; then
318-
compiler_lockfile_path="/opt/upstream/compilers.spack.lock"
319-
elif [ -f "/opt/environments/compilers/spack.lock" ]; then
320-
compiler_lockfile_path="/opt/environments/compilers/spack.lock"
321-
else
322-
echo "::warning::No upstream compilers.spack.lock or environments/compilers/spack.lock found, skipping compiler load from upstream"
323-
exit 0
324-
fi
325-
326-
# Attempt a load of compilers via upstream compilers lockfile
327-
echo "Found $compiler_lockfile_path, attempting to load compilers from upstream"
328-
yq '.roots[].hash' "$compiler_lockfile_path" | while read hash; do
329-
echo "Loading compiler with hash: $hash"
330-
spack load /$hash
331-
spack compiler find --scope=site
332-
done
333-
334-
spack find
335-
336317
- name: Spack - OCI Buildcache Init
337318
if: inputs.spack-oci-buildcache-url != ''
338319
run: |

.github/workflows/ci.yml

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,12 @@ jobs:
288288
ln --symbolic --relative --verbose --force ${{ steps.env.outputs.SPACK_ROOT }}/../spack-config/${spack_branch}/ci-runner/* ${{ steps.env.outputs.SPACK_ROOT }}/etc/spack/
289289
290290
- name: Spack - Initial Enable
291-
run: . ${{ steps.env.outputs.SPACK_ROOT }}/share/spack/setup-env.sh
291+
run: |
292+
. ${{ steps.env.outputs.SPACK_ROOT }}/share/spack/setup-env.sh
293+
echo "----- Compilers -----"
294+
spack compiler list
295+
echo "----- Packages -----"
296+
spack find
292297
293298
- name: Spack - Get spack-packages repo locations
294299
id: spack-packages-locations
@@ -316,30 +321,6 @@ jobs:
316321
ref: ${{ inputs.access-spack-packages-ref }}
317322
spack-instance-root-path: ${{ steps.env.outputs.SPACK_ROOT }}
318323

319-
- name: Spack - Compiler Load
320-
run: |
321-
. ${{ steps.env.outputs.SPACK_ROOT }}/share/spack/setup-env.sh
322-
323-
# Find potential upstream compiler lockfile path
324-
if [ -f "/opt/upstream/compilers.spack.lock" ]; then
325-
compiler_lockfile_path="/opt/upstream/compilers.spack.lock"
326-
elif [ -f "/opt/environments/compilers/spack.lock" ]; then
327-
compiler_lockfile_path="/opt/environments/compilers/spack.lock"
328-
else
329-
echo "::warning::No upstream compilers.spack.lock or environments/compilers/spack.lock found, skipping compiler load from upstream"
330-
exit 0
331-
fi
332-
333-
# Attempt a load of compilers via upstream compilers lockfile
334-
echo "Found $compiler_lockfile_path, attempting to load compilers from upstream"
335-
yq '.roots[].hash' "$compiler_lockfile_path" | while read hash; do
336-
echo "Loading compiler with hash: $hash"
337-
spack load /$hash
338-
spack compiler find --scope=site
339-
done
340-
341-
spack find
342-
343324
- name: Spack - OCI Buildcache Init
344325
if: inputs.spack-oci-buildcache-url != ''
345326
run: |

0 commit comments

Comments
 (0)