-
Notifications
You must be signed in to change notification settings - Fork 16
39 lines (38 loc) · 1.32 KB
/
compile-wasm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Compile WASM
on:
workflow_call:
workflow_dispatch:
push:
branches:
- main
jobs:
wasm:
runs-on: buildjet-16vcpu-ubuntu-2204 # buildjet for rust, github standard for everything else
steps:
- uses: actions/checkout@v4
- id: compiled
uses: buildjet/cache@v3
with:
path: .turbo
key: ${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-compiled
restore-keys: ${{ hashFiles('**/Cargo.lock') }}
- uses: pnpm/action-setup@v2
- uses: buildjet/setup-node@v4
with:
node-version: '21'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm turbo telemetry disable
- uses: dtolnay/rust-toolchain@stable # rust only on buildjet
with:
targets: wasm32-unknown-unknown
- uses: jetli/[email protected] # preinstall wasm-pack
with:
version: 'latest'
- run: pnpm turbo compile --cache-dir=.turbo # compile wasm
- name: Verify no unexpected file changes (like cargo.lock change)
run: git diff --exit-code
working-directory: packages/wasm/crate
- run: cargo tree --invert penumbra-wasm --edges features # debug tree
if: failure()
working-directory: packages/wasm/crate