-
Notifications
You must be signed in to change notification settings - Fork 236
CI speed optimization #493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
b41ad8c
Add caching to CI jobs
matthiasbeyer 41defb0
Only run clippy with MSRV toolchain
matthiasbeyer 6be81bb
Only run checks on examples with one rust toolchain version
matthiasbeyer 4148198
Remove clippy from cargo-check call for examples
matthiasbeyer 1a6c6fd
Remove nightly from CI
matthiasbeyer a9a4852
Run rustfmt with MSRV toolchain
matthiasbeyer 47af095
Do not depend on changing toolchain version
matthiasbeyer 0e2c866
Do not allow changing rust toolchain breaking our CI
matthiasbeyer e695826
Remove dedicated example checking, non-MSRV checking
matthiasbeyer 5c4d4e9
Use nextest as test runner
matthiasbeyer 5943e2a
Do not depend on "check" phase for tests
matthiasbeyer 24e1e3c
Move cache job after toolchain installation
matthiasbeyer 20f0774
Revert "Use nextest as test runner"
matthiasbeyer abbd836
Run tests only with current stable toolchain
matthiasbeyer 40ede3d
Remove matrix builds
matthiasbeyer ccb305a
Execute tests on same toolchain as builds
matthiasbeyer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,130 +6,74 @@ jobs: | |
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: | ||
- 1.70.0 | ||
- stable | ||
- beta | ||
- nightly | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/[email protected] | ||
|
||
- 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/[email protected] | ||
|
||
- 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/[email protected] | ||
|
||
- 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/[email protected] | ||
|
||
- 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/[email protected] | ||
|
||
- name: Install toolchain | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
components: clippy | ||
|
||
- name: Run cargo check | ||
run: cargo check --examples | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.