Add export!
macros
#158
Workflow file for this run
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, pull_request] | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: [stable, beta, nightly] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} && rustup component add rustfmt | |
- run: rustup target add wasm32-wasi wasm32-unknown-unknown | |
- run: cargo build | |
- run: cargo build --no-default-features | |
- run: cargo build --target wasm32-wasi | |
- run: cargo build --target wasm32-wasi --no-default-features | |
- name: Install Wasmtime | |
uses: bytecodealliance/actions/wasmtime/setup@v1 | |
with: | |
version: "v17.0.0" | |
- name: Install wasm-tools | |
uses: bytecodealliance/actions/wasm-tools/setup@v1 | |
with: | |
version: "1.0.57" | |
- run: cargo build --examples --target wasm32-wasi | |
- run: curl -LO https://github.com/bytecodealliance/wasmtime/releases/download/v17.0.0/wasi_snapshot_preview1.command.wasm | |
- run: wasm-tools component new ./target/wasm32-wasi/debug/examples/hello-world.wasm --adapt ./wasi_snapshot_preview1.command.wasm -o component.wasm | |
- run: wasmtime run component.wasm | |
- run: cargo build --examples --target wasm32-unknown-unknown --features macros | |
- run: wasm-tools component new ./target/wasm32-unknown-unknown/debug/examples/cli_command.wasm -o component.wasm | |
- run: wasmtime run component.wasm | |
- run: wasm-tools component new ./target/wasm32-unknown-unknown/debug/examples/http_proxy.wasm -o component.wasm | |
- run: wasm-tools component targets wit component.wasm -w wasi:http/proxy | |
rustfmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup update stable && rustup default stable && rustup component add rustfmt | |
- run: cargo fmt -- --check | |
generate: | |
name: Ensure generated code up-to-date | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup update stable && rustup default stable | |
- run: cargo install wit-bindgen-cli@0.19.1 | |
- run: ./ci/regenerate.sh | |
- run: git diff --exit-code |