Skip to content

Commit 9e29345

Browse files
committed
Only compile on cache miss
1 parent cae12cf commit 9e29345

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/test_wasm.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,35 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v4
14+
- uses: actions/cache@v4
15+
id: cache_build
16+
with:
17+
path: packages/sqlite3_wasm_build/dist/
18+
key: ${{ runner.os }}-${{ hashFiles('packages/sqlite3_wasm_build/build.sh') }}
19+
1420
- name: Setup Homebrew
21+
if: steps.cache_build.outputs.cache-hit != 'true'
1522
id: set-up-homebrew
1623
uses: Homebrew/actions/setup-homebrew@master
1724
- name: Install Dart SDK
25+
if: steps.cache_build.outputs.cache-hit != 'true'
1826
uses: dart-lang/setup-dart@v1
1927
- name: Setup macOS build dependencies
28+
if: steps.cache_build.outputs.cache-hit != 'true'
2029
run: brew install cmake llvm lld binaryen wasi-libc wasi-runtimes
2130
- name: Compile sqlite3.wasm on macOS
22-
if: runner.os == 'macOS'
31+
if: steps.cache_build.outputs.cache-hit != 'true'
2332
working-directory: packages/sqlite3_wasm_build
2433
run: ./build.sh
2534

35+
- name: Upload built sqlite3 binaries
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: sqlite3-wasm
39+
path: packages/sqlite3_wasm_build/dist/
40+
if-no-files-found: error
41+
retention-days: 1
42+
2643
- name: Setup Node.js
2744
uses: actions/setup-node@v4
2845
- uses: pnpm/action-setup@v2

0 commit comments

Comments
 (0)