From 1643e448491ed6f0f6bc9d1a76915e51a39f8f0b Mon Sep 17 00:00:00 2001 From: CosmicHorror Date: Thu, 23 Nov 2023 18:48:16 -0700 Subject: [PATCH] Run CI on more platforms/channels (#45) * Bundle existing CI jobs into one * Run CI on more platforms * Use `dtolnay/rust-toolchain` action * Setup CI caching * Run CI on stable and beta --- .github/workflows/ci.yml | 40 +++++++++++++++------------------------- 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b547550..2dce770 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,38 +10,28 @@ env: CARGO_TERM_COLOR: always jobs: - check: - runs-on: ${{ matrix.os }} + validation: strategy: matrix: - os: [windows-latest, macos-latest, ubuntu-latest] + os: [ubuntu-latest, macos-latest, windows-latest] + toolchain: [stable, beta] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - name: Clippy + - name: Install ${{ matrix.toolchain }} toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.toolchain }} + components: clippy, rustfmt + - name: Setup cache + uses: Swatinem/rust-cache@v2 + - name: Commune with clippy run: cargo clippy --all -- -D warnings - - fmt: - needs: check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - name: Check formatting run: cargo fmt --all -- --check - - test: - needs: fmt - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Check formatting + - name: Run test suite run: cargo test - - docs: - needs: fmt - runs-on: ubuntu-latest - env: - RUSTDOCFLAGS: -Dwarnings - steps: - - uses: actions/checkout@v3 - name: Check docs + env: + RUSTDOCFLAGS: -Dwarnings run: cargo doc --all --no-deps