summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2024-02-01 07:53:14 +0100
committerGitHub <noreply@github.com>2024-02-01 07:53:14 +0100
commit292d3310450a4c83f3259942878097927393935f (patch)
tree803264ffc1ada6388317f143fee81e1f5e1caf30
parentc9c8c733d3c168ff4dff488ee197c8f7380ea938 (diff)
parentccb305a57562d8f1124f8d05f02149b7906453d2 (diff)
Merge pull request #493 from matthiasbeyer/ci-optimization
CI speed optimization
-rw-r--r--.github/workflows/msrv.yml86
1 files changed, 15 insertions, 71 deletions
diff --git a/.github/workflows/msrv.yml b/.github/workflows/msrv.yml
index 49b3356..723c1ce 100644
--- a/.github/workflows/msrv.yml
+++ b/.github/workflows/msrv.yml
@@ -6,14 +6,6 @@ jobs:
check:
name: Check
runs-on: ubuntu-latest
- strategy:
- matrix:
- rust:
- - 1.70.0
- - stable
- - beta
- - nightly
-
steps:
- name: Checkout sources
uses: actions/checkout@v4.1.1
@@ -21,28 +13,17 @@ jobs:
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
- toolchain: ${{ matrix.rust }}
+ toolchain: 1.70.0
- - name: Run cargo check
- if: matrix.rust != 'nightly'
- run: cargo check --all-features
+ - name: Cache
+ uses: Swatinem/rust-cache@v2
- - name: Run cargo check (nightly)
- if: matrix.rust == 'nightly'
- continue-on-error: true
- run: cargo check --all-features
+ - name: Run cargo check
+ run: cargo check --all-features --examples --tests
test:
- needs: [check]
name: Test Suite
runs-on: ubuntu-latest
- strategy:
- matrix:
- rust:
- - 1.70.0
- - stable
- - beta
- - nightly
steps:
- name: Checkout sources
uses: actions/checkout@v4.1.1
@@ -50,31 +31,18 @@ jobs:
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
- toolchain: ${{ matrix.rust }}
-
- - name: Run cargo test
- if: matrix.rust != 'nightly' && matrix.rust != '1.56.1'
- run: cargo test --all-features
+ toolchain: 1.70.0
- - name: Run cargo test (nightly)
- if: matrix.rust == '1.66.0'
- continue-on-error: true
- run: cargo test --tests --all-features
+ - name: Cache
+ uses: Swatinem/rust-cache@v2
- - name: Run cargo test (nightly)
- if: matrix.rust == 'nightly'
- continue-on-error: true
+ - name: Run cargo test
run: cargo test --all-features
fmt:
needs: [check]
name: Rustfmt
runs-on: ubuntu-latest
- strategy:
- matrix:
- rust:
- - stable
- - beta
steps:
- name: Checkout sources
uses: actions/checkout@v4.1.1
@@ -82,21 +50,17 @@ jobs:
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
- toolchain: ${{ matrix.rust }}
+ toolchain: 1.70.0
components: rustfmt
- name: Run cargo fmt
+ continue-on-error: ${{ matrix.rust == 'beta' }}
run: cargo fmt --all -- --check
clippy:
needs: [check]
name: Clippy
runs-on: ubuntu-latest
- strategy:
- matrix:
- rust:
- - 1.70.0
- - 1.73.0
steps:
- name: Checkout sources
uses: actions/checkout@v4.1.1
@@ -104,32 +68,12 @@ jobs:
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
- toolchain: ${{ matrix.rust }}
+ toolchain: 1.70.0
components: clippy
+ - name: Cache
+ uses: Swatinem/rust-cache@v2
+
- name: Run cargo clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- check-examples:
- name: Check examples
- needs: [check]
- runs-on: ubuntu-latest
- strategy:
- matrix:
- rust:
- - 1.70.0
- - 1.73.0
-
- steps:
- - name: Checkout sources
- uses: actions/checkout@v4.1.1
-
- - name: Install toolchain
- uses: dtolnay/rust-toolchain@master
- with:
- toolchain: ${{ matrix.rust }}
- components: clippy
-
- - name: Run cargo check
- run: cargo check --examples
-