add target: wasm #7
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: CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
strategy: | |
matrix: | |
image: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
rust: ["stable"] | |
include: | |
- image: "ubuntu-latest" | |
rust: "beta" | |
- image: "ubuntu-latest" | |
rust: "nightly" | |
- image: "ubuntu-latest" | |
rust: "1.80.0" | |
runs-on: ${{matrix.image}} | |
steps: | |
- name: Install `rustup` | |
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal | |
- name: Install Rust channel | |
run: rustup toolchain install ${{matrix.rust}} && rustup default ${{matrix.rust}} | |
- name: Install `cargo wasi` | |
run: cargo install cargo-wasi | |
- name: Install `wasmtime` | |
run: curl https://wasmtime.dev/install.sh -sSf | bash | |
- uses: actions/checkout@v4 | |
- name: Run tests | |
run: cargo test --verbose | |
- name: Run `cargo wasi test` | |
run: cargo wasi test --verbose | |
wasi-test: | |
strategy: | |
matrix: | |
rust: ["stable", "beta", "nightly", "1.80.0"] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install `rustup` | |
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal | |
- name: Install Rust channel | |
run: rustup toolchain install ${{matrix.rust}} && rustup default ${{matrix.rust}} | |
- name: Install `cargo wasi` | |
run: cargo install cargo-wasi | |
- name: Install `wasmtime` | |
run: curl https://wasmtime.dev/install.sh -sSf | bash | |
- name: refresh `wasmtime` path | |
run: source ~/.bashrc | |
- uses: actions/checkout@v4 | |
- name: Run `cargo wasi test` | |
run: cargo wasi test --verbose |