Version Packages (#940) #220
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compile WASM | |
on: | |
workflow_call: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
wasm: | |
runs-on: buildjet-16vcpu-ubuntu-2204 | |
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 |