这是indexloc提供的服务,不要输入任何密码
Skip to content

CI

CI #1067

Workflow file for this run

name: CI
on:
pull_request:
push:
schedule:
- cron: '29 1 * * *' # *-*-* 01:29:00 UTC
permissions:
contents: read
env:
RUST_BACKTRACE: full
RUSTFLAGS: -Dwarnings
jobs:
test:
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
rust: [nightly, beta, stable]
os: [ubuntu-latest, macos-latest, windows-latest]
name: Test ${{ matrix.rust }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust ${{ matrix.rust }}
run: |
rustup update --no-self-update beta
rustup default ${{ matrix.rust }}
rustup component add rust-analyzer
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@cargo-hack
# `cargo build` doesn't pull in [dev-dependencies].
- name: Build
run: cargo hack build --each-feature
- name: Doc test
run: cargo hack test --each-feature --doc
- name: Test
run: cargo hack test --each-feature --all-targets
- name: Test examples
run: cargo test --all-features --examples -- --ignored
msrv:
timeout-minutes: 15
name: MSRV
strategy:
fail-fast: false
matrix:
# FIXME: MacOS' `sed` is incompatible with `gnused`.
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
# Sync with Cargo.toml!
- name: Install Rust
run: |
rustup update --no-self-update
rustup toolchain add nightly
# Sync with Cargo.toml!
rustup default 1.66
- uses: taiki-e/install-action@cargo-minimal-versions
- uses: taiki-e/install-action@cargo-hack
- name: Build
env:
CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: fallback
run: cargo minimal-versions build --direct --all-features
clippy:
name: Clippy
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
run: |
rustup update --no-self-update stable
rustup default stable
- run: |
cargo clippy --all-targets --all-features -- -Dclippy::all
docs:
name: Docs
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
run: |
rustup update --no-self-update stable
rustup default stable
- name: cargo doc
env:
RUSTDOCFLAGS: --cfg docsrs_ -Dwarnings
run: cargo doc --all-features