2021-07-01 16:45:56 -04:00
|
|
|
name: ci
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- '**'
|
|
|
|
- '!/*.md'
|
|
|
|
- '!/docs/**'
|
|
|
|
- "!/LICENSE-*"
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
paths:
|
|
|
|
- '**'
|
|
|
|
- '!/*.md'
|
|
|
|
- '!/docs/**'
|
|
|
|
- "!/LICENSE-*"
|
|
|
|
schedule:
|
|
|
|
- cron: '3 3 3 * *'
|
|
|
|
jobs:
|
|
|
|
smoke:
|
|
|
|
name: Quick Check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
profile: minimal
|
2021-07-01 17:23:13 -04:00
|
|
|
override: true
|
2021-07-01 16:45:56 -04:00
|
|
|
- uses: Swatinem/rust-cache@v1
|
|
|
|
- name: Default features
|
|
|
|
run: cargo check --workspace --all-targets
|
|
|
|
- name: All features
|
|
|
|
run: cargo check --workspace --all-targets --all-features
|
|
|
|
- name: No-default features
|
|
|
|
run: cargo check --workspace --all-targets --no-default-features
|
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
needs: smoke
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
|
|
|
|
rust: ["stable", "beta"]
|
|
|
|
include:
|
|
|
|
- os: ubuntu-latest
|
|
|
|
rust: "nightly"
|
|
|
|
continue-on-error: ${{ matrix.rust != 'stable' }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: ${{ matrix.rust }}
|
|
|
|
profile: minimal
|
2021-07-01 17:23:13 -04:00
|
|
|
override: true
|
2021-07-01 16:45:56 -04:00
|
|
|
- uses: Swatinem/rust-cache@v1
|
|
|
|
- name: Default features
|
|
|
|
run: cargo test --workspace
|
|
|
|
- name: All features
|
|
|
|
run: cargo test --workspace --all-features
|
|
|
|
- name: No-default features
|
|
|
|
run: cargo test --workspace --no-default-features
|
|
|
|
msrv:
|
2021-07-01 16:49:34 -04:00
|
|
|
name: "Check MSRV: 1.53.0"
|
2021-07-01 16:45:56 -04:00
|
|
|
needs: smoke
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2021-07-01 16:49:34 -04:00
|
|
|
toolchain: 1.53.0 # MSRV
|
2021-07-01 16:45:56 -04:00
|
|
|
profile: minimal
|
2021-07-01 17:23:13 -04:00
|
|
|
override: true
|
2021-07-01 16:45:56 -04:00
|
|
|
- uses: Swatinem/rust-cache@v1
|
|
|
|
- name: Default features
|
|
|
|
run: cargo check --workspace --all-targets
|
|
|
|
- name: All features
|
|
|
|
run: cargo check --workspace --all-targets --all-features
|
|
|
|
- name: No-default features
|
|
|
|
run: cargo check --workspace --all-targets --no-default-features
|
|
|
|
docs:
|
|
|
|
name: Docs
|
|
|
|
needs: smoke
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
profile: minimal
|
2021-07-01 17:23:13 -04:00
|
|
|
override: true
|
2021-07-01 16:45:56 -04:00
|
|
|
- uses: Swatinem/rust-cache@v1
|
|
|
|
- name: Check documentation
|
|
|
|
env:
|
|
|
|
RUSTDOCFLAGS: -D warnings
|
|
|
|
run: cargo doc --no-deps --document-private-items --workspace
|
|
|
|
rustfmt:
|
|
|
|
name: rustfmt
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
profile: minimal
|
2021-07-01 17:23:13 -04:00
|
|
|
override: true
|
2021-07-01 16:45:56 -04:00
|
|
|
components: rustfmt
|
|
|
|
- uses: Swatinem/rust-cache@v1
|
|
|
|
- name: Check formatting
|
|
|
|
run: cargo fmt --all -- --check
|
|
|
|
clippy:
|
|
|
|
name: clippy
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2021-07-01 16:49:34 -04:00
|
|
|
toolchain: 1.53.0 # MSRV
|
2021-07-01 16:45:56 -04:00
|
|
|
profile: minimal
|
2021-07-01 17:23:13 -04:00
|
|
|
override: true
|
2021-07-01 16:45:56 -04:00
|
|
|
components: clippy
|
|
|
|
- uses: Swatinem/rust-cache@v1
|
|
|
|
- uses: actions-rs/clippy-check@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
args: --workspace --all-features --all-targets -- -D warnings
|
|
|
|
clippy-next:
|
|
|
|
name: clippy (next)
|
|
|
|
needs: clippy
|
|
|
|
continue-on-error: true
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
profile: minimal
|
2021-07-01 17:23:13 -04:00
|
|
|
override: true
|
2021-07-01 16:45:56 -04:00
|
|
|
components: clippy
|
|
|
|
- uses: Swatinem/rust-cache@v1
|
|
|
|
- uses: actions-rs/clippy-check@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
args: --workspace --all-features --all-targets -- -D warnings
|