basic wasm compat #20
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: ['0.10.x'] | |
pull_request: | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
rust: [stable, beta] | |
exclude: | |
- os: macos-latest | |
rust: beta | |
- os: windows-latest | |
rust: beta | |
runs-on: ${{ matrix.os }} | |
env: | |
RUSTC_WRAPPER: "sccache" | |
SCCACHE_GHA_ENABLED: "on" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: mozilla-actions/[email protected] | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- run: cargo build --all-targets | |
- run: cargo test | |
- run: cargo test --manifest-path fuzz/Cargo.toml | |
if: ${{ matrix.rust }} == "stable" | |
wasm_build: | |
name: Build wasm32 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Add wasm target | |
run: rustup target add wasm32-unknown-unknown | |
- name: wasm32 build (quinn) | |
run: cargo build -p iroh-quinn --no-default-features --features log,ring,rustls,wasm,runtime-wasm --target wasm32-unknown-unknown | |
env: | |
RUST_BACKTRACE: 1 | |
- name: wasm32 build (quinn-proto) | |
run: cargo build -p iroh-quinn-proto --features wasm --target wasm32-unknown-unknown | |
env: | |
RUST_BACKTRACE: 1 | |
- name: wasm32 build (quinn-udp) | |
run: cargo build -p iroh-quinn-udp --no-default-features --features log --target wasm32-unknown-unknown | |
env: | |
RUST_BACKTRACE: 1 | |
msrv: | |
runs-on: ubuntu-latest | |
env: | |
RUSTC_WRAPPER: "sccache" | |
SCCACHE_GHA_ENABLED: "on" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: mozilla-actions/[email protected] | |
- uses: dtolnay/[email protected] | |
- run: cargo check --lib --all-features -p iroh-quinn-udp -p iroh-quinn-proto -p iroh-quinn | |
lint: | |
runs-on: ubuntu-latest | |
env: | |
RUSTC_WRAPPER: "sccache" | |
SCCACHE_GHA_ENABLED: "on" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: mozilla-actions/[email protected] | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- run: cargo fmt --all -- --check | |
- run: cargo clippy --all-targets -- -D warnings | |
- name: doc | |
run: cargo doc --no-deps --document-private-items | |
env: | |
RUSTDOCFLAGS: -Dwarnings | |
- name: lint fuzz | |
run: | | |
cd fuzz | |
cargo clippy -- -D warnings | |
audit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: EmbarkStudios/cargo-deny-action@v1 |