Continuous integration #1389
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: Continuous integration | |
env: | |
VERSION_FEATURES: "v1 v3 v4 v5 v6 v7 v8" | |
DEP_FEATURES: "slog serde arbitrary zerocopy" | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
os_tests: | |
name: "Tests / OS: ${{ matrix.os }} - ${{ matrix.channel }}-${{ matrix.rust_target }}" | |
runs-on: ${{ matrix.os }} | |
env: | |
RUSTFLAGS: "--cfg uuid_unstable" | |
RUSTDOCFLAGS: "--cfg uuid_unstable" | |
strategy: | |
matrix: | |
exclude: | |
- os: macos-10.15 | |
rust_target: x86_64-gnu | |
- os: macos-10.15 | |
rust_target: x86_64-msvc | |
- os: windows-2019 | |
rust_target: x86_64-apple-darwin | |
- os: ubuntu-20.04 | |
rust_target: x86_64-msvc | |
- os: ubuntu-20.04 | |
rust_target: x86_64-apple-darwin | |
channel: | |
- stable | |
- beta | |
- nightly | |
os: | |
- macos-10.15 | |
- ubuntu-20.04 | |
- windows-2019 | |
rust_target: | |
- x86_64-gnu | |
- x86_64-msvc | |
- x86_64-apple-darwin | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Rust Toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
override: true | |
profile: minimal | |
toolchain: ${{ matrix.channel }}-${{ matrix.rust_target }} | |
- name: Install cargo-hack | |
run: cargo install cargo-hack | |
- name: Docs | |
run: cargo test --all-features --doc | |
- name: Examples | |
run: cargo test --all-features --examples | |
- name: Each version feature | |
run: cargo hack test --lib --each-feature | |
- name: All features | |
run: cargo hack test --lib --all-features | |
stable: | |
name: "Tests / Stable" | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: All features | |
run: cargo test --all-features | |
msrv: | |
name: "Tests / MSRV" | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: 1.57.0 | |
override: true | |
- name: Version features | |
run: cargo test --features "$VERSION_FEATURES" | |
wasm: | |
name: Tests / WebAssembly | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Default features | |
run: wasm-pack test --node | |
- name: Version features | |
run: wasm-pack test --node -- --features "$VERION_FEATURES $DEP_FEATURES js" | |
- name: Fast RNG | |
run: wasm-pack test --node -- --features "js v4 fast-rng" | |
mips: | |
name: Tests / MIPS (Big Endian) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Install Cross | |
run: cargo install cross | |
- name: Default features | |
run: cross test --target mips-unknown-linux-gnu | |
embedded: | |
name: Build / Embedded | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
target: thumbv6m-none-eabi | |
override: true | |
- name: No features | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: -Z avoid-dev-deps --target thumbv6m-none-eabi --no-default-features | |
- name: Version features | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: -Z avoid-dev-deps --target thumbv6m-none-eabi --no-default-features --features "v1 v3 v5 v6 serde" | |
nodeps: | |
name: Build / No deps | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: "--cfg uuid_unstable" | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
override: true | |
- name: Install cargo-hack | |
run: cargo install cargo-hack | |
- name: Powerset | |
run: cargo hack check --each-feature -Z avoid-dev-deps |