Files
ferro-ta/.github/workflows/ci-wasm.yml
Pratik Bhadane 0ee5f246ed ci: add RUSTFLAGS environment variable to CI workflows
- Introduced RUSTFLAGS environment variable in Python, Rust, and WASM CI workflows to override target-cpu settings from .cargo/config.toml, ensuring consistent build configurations across different environments.
2026-04-02 17:05:14 +05:30

51 lines
1.3 KiB
YAML

name: CI WASM
on:
workflow_call:
permissions:
contents: read
jobs:
wasm:
name: WASM (test + build + bench)
runs-on: ubuntu-latest
env:
RUSTFLAGS: "" # override target-cpu=native from .cargo/config.toml
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: "20"
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@v2
with:
tool: wasm-pack
- name: Test WASM binding
working-directory: wasm
run: wasm-pack test --node
- name: Build WASM packages (node + web)
working-directory: wasm
run: npm run build
- name: Check API manifest is current
run: python3 scripts/check_api_manifest.py
- name: Benchmark WASM
working-directory: wasm
run: node bench.js --json ../wasm_benchmark.json
- uses: actions/upload-artifact@v7
with:
name: wasm-pkg-node
path: wasm/node/
- uses: actions/upload-artifact@v7
with:
name: wasm-pkg-web
path: wasm/web/
- uses: actions/upload-artifact@v7
with:
name: wasm-benchmark
path: wasm_benchmark.json