Skip to content

Prepare new release #205

Prepare new release

Prepare new release #205

Workflow file for this run

name: Test
on:
push:
branches: ["main"]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
build-test:
name: Build & Test
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
rust:
- { version: "1.60", msrv: true, component: "", flags: "", args: "" }
- { version: stable, msrv: false, component: "", flags: "", args: "" }
- { version: nightly, msrv: false, component: --component rust-src, flags: "-Ctarget-feature=+atomics,+bulk-memory", args: "-Zbuild-std=panic_abort,std" }
target:
- { target: wasm32-unknown-unknown, native: false }
features:
- { features: "" }
- { features: --all-features }
include:
- os: ubuntu-latest
rust: { version: "1.60", msrv: true, component: "", flags: "", args: "" }
target: { target: x86_64-unknown-linux-gnu, native: true }
features: { features: "" }
- os: ubuntu-latest
rust: { version: stable, msrv: false, component: "", flags: "", args: "" }
target: { target: x86_64-unknown-linux-gnu, native: true }
features: { features: "" }
exclude:
- os: macos-latest
rust: { version: "1.60", msrv: true, component: "", flags: "", args: "" }
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: wasm-bindgen-cli
- name: Install Rust
run: |
rustup toolchain install ${{ matrix.rust.version }} --profile minimal ${{ matrix.rust.component }} --target ${{ matrix.target.target }}
rustup default ${{ matrix.rust.version }}
- name: Fix MSRV dependencies
if: matrix.rust.msrv == true
run: cargo update -p bumpalo --precise 3.14.0
- name: Build
env:
RUSTFLAGS: ${{ matrix.rust.flags }}
run: cargo build ${{ matrix.features.features }} --target ${{ matrix.target.target }} ${{ matrix.rust.args }}
- name: Documentation
if: matrix.os == 'ubuntu-latest'
env:
RUSTDOCFLAGS: ${{ matrix.rust.flags }}
RUSTFLAGS: ${{ matrix.rust.flags }}
run: cargo doc --no-deps ${{ matrix.features.features }} --target ${{ matrix.target.target }} ${{ matrix.rust.args }}
- name: Test
if: matrix.rust.msrv == false && matrix.os == 'ubuntu-latest' && matrix.target.native == true
run: cargo test --all-targets --no-fail-fast
- name: Test on Chrome
if: matrix.rust.msrv == false && matrix.os == 'ubuntu-latest' && matrix.target.native == false
env:
CHROMEDRIVER: chromedriver
RUSTFLAGS: ${{ matrix.rust.flags }}
run: cargo test ${{ matrix.features.features }} --all-targets --no-fail-fast --target ${{ matrix.target.target }} ${{ matrix.rust.args }}
- name: Test on Firefox
if: matrix.rust.msrv == false && matrix.os == 'ubuntu-latest' && matrix.target.native == false
env:
GECKODRIVER: geckodriver
RUSTFLAGS: ${{ matrix.rust.flags }}
run: cargo test ${{ matrix.features.features }} --all-targets --no-fail-fast --target ${{ matrix.target.target }} ${{ matrix.rust.args }}
- name: Test on Safari
if: matrix.rust.msrv == false && matrix.os == 'macos-latest'
env:
SAFARIDRIVER: safaridriver
RUSTFLAGS: ${{ matrix.rust.flags }}
run: cargo test ${{ matrix.features.features }} --all-targets --no-fail-fast --target ${{ matrix.target.target }} ${{ matrix.rust.args }}
- name: Documentation Test
if: matrix.rust.msrv == false && matrix.target.native == true && matrix.os == 'ubuntu-latest'
run: cargo test --doc --no-fail-fast
minimal-versions:
name: Minimal Versions
runs-on: ubuntu-latest
defaults:
run:
working-directory: minimal-versions
strategy:
fail-fast: false
matrix:
rust:
- "1.60"
- stable
target:
- x86_64-unknown-linux-gnu
- wasm32-unknown-unknown
features:
- { features: "" }
- { features: --all-features }
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
run: |
rustup toolchain install ${{ matrix.rust }} --profile minimal --target ${{ matrix.target }}
rustup default ${{ matrix.rust }}
- name: Install Rust nightly
run: rustup toolchain install nightly --profile minimal
- name: Build
run: |
cargo +nightly update -Z minimal-versions
cargo build ${{ matrix.features.features }} --target ${{ matrix.target }}