Skip to content

Commit

Permalink
Only compile on cache miss
Browse files Browse the repository at this point in the history
  • Loading branch information
simolus3 committed Feb 6, 2025
1 parent cae12cf commit 9e29345
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/test_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,35 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: cache_build
with:
path: packages/sqlite3_wasm_build/dist/
key: ${{ runner.os }}-${{ hashFiles('packages/sqlite3_wasm_build/build.sh') }}

- name: Setup Homebrew
if: steps.cache_build.outputs.cache-hit != 'true'
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Install Dart SDK
if: steps.cache_build.outputs.cache-hit != 'true'
uses: dart-lang/setup-dart@v1
- name: Setup macOS build dependencies
if: steps.cache_build.outputs.cache-hit != 'true'
run: brew install cmake llvm lld binaryen wasi-libc wasi-runtimes
- name: Compile sqlite3.wasm on macOS
if: runner.os == 'macOS'
if: steps.cache_build.outputs.cache-hit != 'true'
working-directory: packages/sqlite3_wasm_build
run: ./build.sh

- name: Upload built sqlite3 binaries
uses: actions/upload-artifact@v4
with:
name: sqlite3-wasm
path: packages/sqlite3_wasm_build/dist/
if-no-files-found: error
retention-days: 1

- name: Setup Node.js
uses: actions/setup-node@v4
- uses: pnpm/action-setup@v2
Expand Down

0 comments on commit 9e29345

Please sign in to comment.