Skip to content

Commit

Permalink
Split build job into separate jobs per feature configuration
Browse files Browse the repository at this point in the history
GitHub will run up to 20 jobs in parallel, so can get faster builds by
running jobs in parallel. With the extensive caching we use, this
should result in about the same load for GitHub.

Together with #399, this brings the time for running all tests down to
1.5 minutes, removing about 2 minutes from every PR.
  • Loading branch information
mgeisler committed Jun 27, 2021
1 parent 97c4f98 commit 8941425
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ jobs:
rust:
- stable
- nightly
features:
- name: no default features
flag: --no-default-features
- name: all features
flag: --all-features
- name: default features
flag: ''

steps:
- name: Checkout repository
Expand All @@ -34,14 +41,8 @@ jobs:

- uses: Swatinem/rust-cache@v1

- name: Test with default features
run: cargo test

- name: Test without default features
run: cargo test --no-default-features

- name: Test with all features
run: cargo test --all-features
- name: Test with ${{ matrix.features.name }}
run: cargo test ${{ matrix.features.flag }}

windows:
name: Build on Windows (stable)
Expand Down

0 comments on commit 8941425

Please sign in to comment.