Bump common version (#69) #197
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 CI | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- cli-support/src/** | |
- cli-support/examples/** | |
- cli-support/Cargo.toml | |
- common/src/** | |
- common/examples/** | |
- common/Cargo.toml | |
- macro/src/** | |
- macro/examples/** | |
- macro/Cargo.toml | |
- examples/** | |
- docs/guide/** | |
- src/** | |
- .github/** | |
- Cargo.toml | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
branches: | |
- main | |
paths: | |
- cli-support/src/** | |
- cli-support/examples/** | |
- cli-support/Cargo.toml | |
- common/src/** | |
- common/examples/** | |
- common/Cargo.toml | |
- macro/src/** | |
- macro/examples/** | |
- macro/Cargo.toml | |
- examples/** | |
- docs/guide/** | |
- src/** | |
- .github/** | |
- Cargo.toml | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_INCREMENTAL: 0 | |
# RUSTFLAGS: -Dwarnings | |
RUST_BACKTRACE: 1 | |
RUSTUP_WINDOWS_PATH_ADD_BIN: 1 | |
# Change to specific Rust release to pin | |
rust_stable: stable | |
rust_nightly: nightly-2024-07-01 | |
rust_clippy: "1.79" | |
# When updating this, also update relevant msrvs (readme, cargo.toml etc): | |
rust_min: "1.79.0" | |
jobs: | |
check: | |
if: github.event.pull_request.draft == false | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: sudo apt-get update | |
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev | |
- uses: actions/checkout@v4 | |
- run: cargo check --all --examples --tests | |
test: | |
if: github.event.pull_request.draft == false | |
name: Test Suite | |
runs-on: ubuntu-latest | |
steps: | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: sudo apt-get update | |
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev | |
- uses: actions/checkout@v4 | |
- run: cargo test --lib --bins --tests --examples --workspace | |
fmt: | |
if: github.event.pull_request.draft == false | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: rustup component add rustfmt | |
- uses: actions/checkout@v4 | |
- run: cargo fmt --all -- --check | |
clippy: | |
if: github.event.pull_request.draft == false | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: sudo apt-get update | |
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev | |
- run: rustup component add clippy | |
- uses: actions/checkout@v4 | |
- run: cargo clippy --workspace --examples --tests -- -D warnings | |
docs: | |
if: github.event.pull_request.draft == false | |
name: Docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust ${{ env.rust_nightly }} | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ env.rust_nightly }} | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-all-crates: "true" | |
save-if: ${{ github.ref == 'refs/heads/main' }} | |
- run: sudo apt-get update | |
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev nasm | |
- name: "doc --lib --all-features" | |
run: | | |
cargo doc --workspace --lib --no-deps --all-features --document-private-items | |
env: | |
RUSTFLAGS: --cfg docsrs | |
RUSTDOCFLAGS: --cfg docsrs -Dwarnings |