Skip to content

Commit 3167753

Browse files
committed
Add cache status indicator to Spack CI
Shows whether dependencies are cached or need to be built: - Cache hit: Lists already-installed packages (~5-10 min total) - Cache miss: Warns about long build time (~30-40 min) Helps users understand CI timing at a glance.
1 parent c91fa8c commit 3167753

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/spack.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ jobs:
146146
spack config add "packages:all:target:[x86_64]"
147147
148148
- name: Cache Spack Dependencies
149+
id: spack-cache
149150
uses: actions/cache@v4
150151
with:
151152
path: |
@@ -155,6 +156,16 @@ jobs:
155156
restore-keys: |
156157
spack-deps-${{ runner.os }}-
157158
159+
- name: Check Cache Status
160+
run: |
161+
if [ "${{ steps.spack-cache.outputs.cache-hit }}" == "true" ]; then
162+
echo "✓ Cache hit! Dependencies already built."
163+
. spack/share/spack/setup-env.sh
164+
spack find
165+
else
166+
echo "⚠ Cache miss. Will build dependencies from source (~30-40 min)."
167+
fi
168+
158169
- name: Install Package into Spack
159170
run: |
160171
. spack/share/spack/setup-env.sh

0 commit comments

Comments
 (0)