Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
chore: add cargo build for wasm in ci (#69)
Browse files Browse the repository at this point in the history
This adds a CI job to ensure this repo can compile to wasm. Any change
that doesn't work with wasm will then be flagged early.
  • Loading branch information
lrlna authored Oct 31, 2023
1 parent 4b1c740 commit 3ebe215
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ workflows:
parameters:
platform: [linux, macos]
rust_channel: [stable]
wasm:
jobs:
- wasm:
name: Compile to wasm (stable rust on linux)
matrix:
parameters:
platform: [linux]
rust_channel: [stable]
release:
jobs:
- test:
Expand Down Expand Up @@ -128,6 +136,24 @@ jobs:
name: Run cargo test
command: cargo test --all-features

wasm:
parameters:
rust_channel:
type: enum
enum: ["stable", "nightly"]
default: stable
platform:
type: executor
executor: << parameters.platform >>
steps:
- checkout
- install_system_deps:
rust_channel: << parameters.rust_channel >>
platform: << parameters.platform >>
- run:
name: Build to wasm target
command: rustup target add wasm32-unknown-unknown && cargo build --target wasm32-unknown-unknown

publish:
parameters:
rust_channel:
Expand Down

0 comments on commit 3ebe215

Please sign in to comment.