Files
third_party_rust_mio/.github/workflows/ci.yml
T
Thomas de Zeeuw 1abc6ddf30 Compile Cargo hack using debug profile
The performance of it doesn't really matter much.
2022-07-19 21:45:35 +00:00

108 lines
2.8 KiB
YAML

name: CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
CI: true
jobs:
Test:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install Cargo-hack
run: cargo install --debug cargo-hack
- name: Check all features
run: cargo hack check --feature-powerset
- name: Tests
run: cargo test --all-features
MinimalVersions:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: Install minimal verions
run: cargo update -Zminimal-versions
- name: Tests
run: cargo test --all-features
Clippy:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings -A clippy::cognitive-complexity
Docs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Check docs
run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features
Rustfmt:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- name: Check formatting
# FIXME: for some reason this doesn't actually check all files.
# So instead we run `rustfmt` directly on each file.
#cargo fmt --all -- --check
run: find src tests examples -type f -iname "*.rs" | xargs rustfmt --check
CheckTargets:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- name: Install all targets
run: make install_targets
- name: Install Cargo-hack
run: cargo install --debug cargo-hack
- name: Check all targets
run: make check_all_targets