Skip to content

Commit 18307cf

Browse files
authored
Optimize CI (#1344)
Parameterize cargo flags into matrix for parallel building and better caching
1 parent db78cba commit 18307cf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
mingw64,
3232
windows-2019,
3333
]
34+
cargo_flags: ['', '--release', '--features parallel']
3435
include:
3536
- build: stable
3637
os: ubuntu-latest
@@ -135,9 +136,7 @@ jobs:
135136
if: startsWith(matrix.build, 'windows-clang')
136137
- run: cargo update
137138
- uses: Swatinem/rust-cache@v2
138-
- run: cargo test ${{ matrix.no_run }} --workspace --target ${{ matrix.target }}
139-
- run: cargo test ${{ matrix.no_run }} --workspace --target ${{ matrix.target }} --release
140-
- run: cargo test ${{ matrix.no_run }} --workspace --target ${{ matrix.target }} --features parallel
139+
- run: cargo test ${{ matrix.no_run }} --workspace --target ${{ matrix.target }} ${{ matrix.cargo_flags }}
141140

142141
# This is separate from the matrix above because there is no prebuilt rust-std component for these targets.
143142
check-tvos:

0 commit comments

Comments
 (0)