Skip to content

Commit 04542c7

Browse files
committed
CI: cache example .build (experiment - measure warm vs cold)
1 parent 46d2ded commit 04542c7

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,14 @@ jobs:
182182
- uses: swiftwasm/setup-swiftwasm@v2
183183
id: setup-wasm32-unknown-wasip1-threads
184184
with: { target: wasm32-unknown-wasip1-threads }
185+
- uses: actions/cache@v4
186+
with:
187+
path: |
188+
Examples/${{ matrix.example }}/.build
189+
~/.cache/org.swift.swiftpm
190+
key: ex-${{ matrix.example }}-${{ hashFiles('.github/workflows/test.yml', format('Examples/{0}/Package.resolved', matrix.example)) }}
191+
restore-keys: |
192+
ex-${{ matrix.example }}-
185193
# build.sh resolves the package relative to the working directory, so run it
186194
# from the example directory (mirroring Utilities/build-examples.sh's `cd`).
187195
- run: ./build.sh release

0 commit comments

Comments
 (0)