Skip to content

Commit

Permalink
ci: fix wasm release (#821)
Browse files Browse the repository at this point in the history
* ci: fix wasm release

Adds a wasm build step to PR checks to ensure we can always wasm-pack

* add missing dep
  • Loading branch information
mrgrain authored Jan 22, 2025
1 parent 69ee99a commit 9d2ddbf
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
37 changes: 36 additions & 1 deletion .github/workflows/status-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
with:
crate: just

- name: Install wasm-pack
- name: Install cargo-llvm-cov
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-llvm-cov
Expand Down Expand Up @@ -116,3 +116,38 @@ jobs:
fail_ci_if_error: true
files: target/codecov.json
name: codecov.json

wasm:
name: Build wasm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: 🦀 Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Setup Node.js
uses: actions/setup-node@main
with:
node-version: lts/*

- name: ⚡ Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
${{ runner.os }}-cargo
- name: Install wasm-pack
uses: baptiste0928/cargo-install@v3
with:
crate: wasm-pack

- name: Build wasm package
run: |-
wasm-pack build --all-features --target=nodejs --out-name=index
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ crate-type = ["cdylib", "lib"]
anyhow = "^1.0.95"
base64 = "^0.22.1"
clap = { version = "^4.5.26", features = ["cargo"] }
console_error_panic_hook = { version = "0.1.1", optional = true }
indexmap = { version = "^2.7.0", features = ["serde"] }
nom = "^7.1.3"
numberkit = "^0.1.0"
Expand Down

0 comments on commit 9d2ddbf

Please sign in to comment.