ManyOf plugin #50
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: Rust | |
on: [push, pull_request] | |
permissions: | |
contents: read | |
env: | |
RUSTFLAGS: -Dwarnings | |
jobs: | |
build: | |
name: ${{format('Build ({0})', matrix.name || matrix.rust)}} | |
runs-on: ${{matrix.os || 'ubuntu'}}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: [stable, beta] | |
include: | |
- rust: nightly | |
components: rustc-dev | |
- rust: nightly | |
name: WebAssembly | |
target: wasm32-unknown-unknown | |
- rust: nightly | |
name: WASI | |
target: wasm32-wasi | |
- rust: nightly | |
name: Windows | |
os: windows | |
env: | |
target: ${{matrix.target && format('--target={0}', matrix.target)}} | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{matrix.rust}} | |
targets: ${{matrix.target}} | |
components: ${{matrix.components}} | |
- run: cargo check -p choco ${{env.target}} | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: llvm-tools, rustc-dev | |
- run: sudo apt-get install librust-atk-dev && sudo apt-get install libgtk-3-dev | |
- run: cargo test --workspace --all-targets | |
doc: | |
name: Doc | |
runs-on: ubuntu-latest | |
env: | |
RUSTDOCFLAGS: --cfg=doc_cfg -Dbroken_intra_doc_links | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
- run: sudo apt-get install librust-atk-dev && sudo apt-get install libgtk-3-dev | |
- run: cargo test --workspace --doc | |
- run: cargo doc --workspace | |
miri: | |
name: Miri | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@miri | |
- env: | |
MIRIFLAGS: -Zmiri-strict-provenance | |
run: cargo miri test | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: clippy, rustc-dev | |
- run: sudo apt-get install librust-atk-dev && sudo apt-get install libgtk-3-dev | |
- run: cargo clippy --workspace --all-targets -- -Dclippy::all -Dclippy::pedantic | |
fmt: | |
name: Fmt | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt, rustc-dev | |
- run: cargo fmt --all -- --check |