Skip to content

Compile WASM

Compile WASM #1

Workflow file for this run

name: Compile WASM
on: [workflow_call, workflow_dispatch]
jobs:
wasm:
runs-on: buildjet-16vcpu-ubuntu-2204 # buildjet for rust, github standard for everything else
steps:
- uses: actions/checkout@v4
- id: compiled
uses: actions/cache@v3 # turbo cache, shared between buildjet and github
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ hashFiles('packages/wasm/cargo/src/**') }}-${{ github.ref }}-${{ github.sha }}-compiled
restore-keys: |
${{ runner.os }}-turbo-${{ hashFiles('packages/wasm/cargo/src/**') }}-${{ github.ref }}-${{ github.sha }}}
${{ runner.os }}-turbo-${{ hashFiles('packages/wasm/cargo/src/**') }}-${{ github.ref }}
${{ runner.os }}-turbo-${{ hashFiles('packages/wasm/cargo/src/**') }}
- uses: pnpm/action-setup@v2
- uses: buildjet/setup-node@v4 # node cache, distinct between buildjet and github
with:
node-version: '21'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile # commit your lockfile
- run: pnpm turbo telemetry disable
- uses: dtolnay/rust-toolchain@stable # rust only on buildjet
with:
targets: wasm32-unknown-unknown
- uses: astriaorg/[email protected] # buildjet rust cache
- uses: jetli/[email protected] # preinstall wasm-pack
with:
version: 'latest'
- run: pnpm turbo compile --cache-dir=.turbo # compile wasm
- run: cargo tree --invert mio --edges features # debug tree
if: failure()
working-directory: packages/wasm/crate