expressive/.github/workflows/ci.yml

237 lines
5.4 KiB
YAML
Raw Normal View History

2023-04-13 11:54:01 +00:00
name: CI
2021-06-02 14:04:49 +00:00
2023-04-13 11:54:01 +00:00
on:
pull_request:
push:
2021-06-02 14:04:49 +00:00
2023-04-13 11:54:01 +00:00
env:
RUSTFLAGS: -Dwarnings
2021-06-02 14:04:49 +00:00
2023-04-13 11:54:01 +00:00
jobs:
precheck_default:
name: Check default
runs-on: ${{ matrix.os }}
2021-06-02 14:04:49 +00:00
strategy:
matrix:
2023-04-13 11:54:01 +00:00
os: [ubuntu-latest]
rust: [stable]
2021-06-02 14:04:49 +00:00
steps:
2023-04-13 11:54:01 +00:00
- 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
2021-06-02 14:04:49 +00:00
with:
2023-04-13 11:54:01 +00:00
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]
2021-06-02 14:04:49 +00:00
2023-04-13 11:54:01 +00:00
steps:
- uses: actions/checkout@master
- name: Install ${{ matrix.rust }}
2021-06-02 15:00:50 +00:00
uses: actions-rs/toolchain@v1
2021-06-02 14:04:49 +00:00
with:
2023-04-13 11:54:01 +00:00
toolchain: ${{ matrix.rust }}
2021-06-02 14:21:55 +00:00
override: true
2021-06-02 14:04:49 +00:00
2023-04-13 11:54:01 +00:00
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}
- name: Check
2022-03-16 14:26:11 +00:00
uses: actions-rs/cargo@v1
with:
2023-04-13 11:54:01 +00:00
command: check
2023-04-13 11:57:39 +00:00
args: --all-features --all --bins --examples --tests --lib
2023-04-13 11:54:01 +00:00
check_msrv:
needs: [precheck_default, precheck_all_features]
name: Check MSRV with all features
2023-04-13 12:46:44 +00:00
runs-on: ubuntu-latest
2023-04-13 11:54:01 +00:00
steps:
- uses: actions/checkout@master
2023-04-13 12:46:44 +00:00
- name: Install MSRV toolchain
2023-04-13 11:54:01 +00:00
uses: actions-rs/toolchain@v1
with:
2023-04-13 12:46:44 +00:00
toolchain: 1.56.1
2023-04-13 11:54:01 +00:00
override: true
- name: Rust cache
uses: Swatinem/rust-cache@v2
2022-03-16 14:26:11 +00:00
2023-04-13 11:54:01 +00:00
- name: Check
2021-06-02 14:04:49 +00:00
uses: actions-rs/cargo@v1
with:
2023-04-13 11:54:01 +00:00
command: check
2023-04-13 11:57:39 +00:00
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
2021-06-02 15:00:50 +00:00
2023-04-13 12:00:55 +00:00
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
2023-04-13 11:54:01 +00:00
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]
2021-06-02 15:00:50 +00:00
steps:
2023-04-13 11:54:01 +00:00
- 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
2021-06-02 15:00:50 +00:00
with:
2023-04-13 11:54:01 +00:00
key: ${{ matrix.os }}
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
2023-04-13 11:57:39 +00:00
args: --all-features --all --bins --examples --tests --lib
2023-04-13 11:54:01 +00:00
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
2021-06-02 15:00:50 +00:00
2023-04-13 11:54:01 +00:00
- name: Install ${{ matrix.rust }}
2021-06-02 15:00:50 +00:00
uses: actions-rs/toolchain@v1
with:
2023-04-13 11:54:01 +00:00
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
2021-06-02 15:00:50 +00:00
override: true
2023-04-13 11:54:01 +00:00
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
2023-04-13 11:57:39 +00:00
args: --all-features --all --bins --examples --tests --lib
2023-04-13 11:54:01 +00:00
- name: Test
uses: actions-rs/cargo@v1
2021-06-02 15:00:50 +00:00
with:
2023-04-13 11:54:01 +00:00
command: test
args: --all-features --all
2021-06-02 15:00:50 +00:00
2023-04-13 11:54:01 +00:00
- name: Docs
2021-06-02 15:00:50 +00:00
uses: actions-rs/cargo@v1
with:
2023-04-13 11:54:01 +00:00
command: doc
args: --all-features
2021-06-02 15:00:50 +00:00
2023-04-13 11:54:01 +00:00
- name: Format
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
- name: Lint
uses: actions-rs/cargo@v1
2021-06-02 15:00:50 +00:00
with:
2023-04-13 11:54:01 +00:00
command: clippy
2023-04-13 12:31:57 +00:00
args: --all-features --bins --examples --tests --lib