243 lines
5.5 KiB
YAML
243 lines
5.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
|
|
env:
|
|
RUSTFLAGS: -Dwarnings
|
|
|
|
jobs:
|
|
precheck_default:
|
|
name: Check default
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
rust: [stable]
|
|
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Install ${{ matrix.rust }}
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
override: true
|
|
|
|
- name: Rust cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
key: ${{ matrix.os }}
|
|
|
|
- name: Check
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: check
|
|
args: --all --bins --examples --lib
|
|
|
|
precheck_all_features:
|
|
name: Check all features
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
rust: [stable]
|
|
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Install ${{ matrix.rust }}
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
override: true
|
|
|
|
- name: Rust cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
key: ${{ matrix.os }}
|
|
|
|
- name: Check
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: check
|
|
args: --all-features --all --bins --examples --tests --lib
|
|
|
|
check_msrv:
|
|
needs: [precheck_default, precheck_all_features]
|
|
name: Check MSRV with all features
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ ubuntu-latest ]
|
|
rust: [ 1.56.1 ]
|
|
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Install ${{ matrix.rust }}
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
override: true
|
|
|
|
- name: Rust cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
key: ${{ matrix.os }}
|
|
|
|
- name: Check
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: check
|
|
args: --all-features --all --bins --examples --tests --lib
|
|
|
|
check_benches:
|
|
needs: [precheck_default, precheck_all_features]
|
|
name: Check benches with all features
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ ubuntu-latest ]
|
|
rust: [ nightly ]
|
|
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Install ${{ matrix.rust }}
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
override: true
|
|
|
|
- name: Rust cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
key: ${{ matrix.os }}
|
|
|
|
- name: Check
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: check
|
|
args: --all-features --all --bins --benches --examples --tests --lib
|
|
|
|
check_sync_readme:
|
|
needs: [precheck_default, precheck_all_features]
|
|
name: Check sync readme
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ ubuntu-latest ]
|
|
rust: [ stable ]
|
|
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Install ${{ matrix.rust }}
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
override: true
|
|
|
|
- name: Rust cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
key: ${{ matrix.os }}
|
|
|
|
- name: Install cargo-sync-readme
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: install
|
|
args: cargo-sync-readme
|
|
|
|
- name: Sync readme check
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: sync-readme
|
|
args: --check
|
|
|
|
check_platform_compatibility:
|
|
needs: [precheck_default, precheck_all_features]
|
|
name: Check platform compatibility
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macOS-latest, windows-latest]
|
|
rust: [stable]
|
|
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Install ${{ matrix.rust }}
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
override: true
|
|
|
|
- name: Rust cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
key: ${{ matrix.os }}
|
|
|
|
- name: Check
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: check
|
|
args: --all-features --all --bins --examples --tests --lib
|
|
|
|
detailed_tests:
|
|
needs: [precheck_default, precheck_all_features]
|
|
name: Check, test, doc, format and lint with all features
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
rust: [stable, beta, nightly]
|
|
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Install ${{ matrix.rust }}
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
components: rustfmt, clippy
|
|
override: true
|
|
|
|
- name: Rust cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
key: ${{ matrix.os }}
|
|
|
|
- name: Check
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: check
|
|
args: --all-features --all --bins --examples --tests --lib
|
|
|
|
- name: Test
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --all-features --all
|
|
|
|
- name: Docs
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: doc
|
|
args: --all-features
|
|
|
|
- name: Format
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: -- --check
|
|
|
|
- name: Lint
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: clippy
|
|
args: --all-features --bins --examples --tests --lib |