Skip to content

Commit adc2d40

Browse files
committed
Combine blocking and tokio into a matrix
1 parent 3f88bf4 commit adc2d40

File tree

1 file changed

+14
-101
lines changed

1 file changed

+14
-101
lines changed

.github/workflows/cont_integration.yml

Lines changed: 14 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,25 @@ env:
1010
CARGO_TERM_COLOR: always
1111

1212
jobs:
13-
build-test-blocking:
14-
name: Build & Test Blocking
13+
build-test:
14+
name: Build & Test ${{ matrix.runtime }}
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
1818
rust:
1919
- version: stable # STABLE
2020
- version: 1.63.0 # MSRV
21+
runtime:
22+
- blocking
23+
- tokio
24+
- async-std
2125
features:
2226
- default
27+
- async
28+
- async-https
29+
- async-https-native
30+
- async-https-rustls
31+
- async-https-rustls-manual-roots
2332
- blocking
2433
- blocking-https
2534
- blocking-https-rustls
@@ -29,7 +38,7 @@ jobs:
2938
- name: Checkout
3039
uses: actions/checkout@v4
3140
- name: Generate cache key
32-
run: echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key
41+
run: echo "${{ matrix.rust.version }} ${{ matrix.runtime }} ${{ matrix.features }}" | tee .cache_key
3342
- name: Rust Cache
3443
uses: actions/cache@v3
3544
with:
@@ -55,108 +64,12 @@ jobs:
5564
cargo update -p url --precise "2.5.0"
5665
cargo update -p tokio --precise "1.38.1"
5766
cargo update -p tokio-util --precise "0.7.11"
58-
- name: Build
59-
run: cargo build --features ${{ matrix.features }} --no-default-features
60-
- name: Test
61-
run: cargo test --features ${{ matrix.features }} --no-default-features -- --test-threads=1
6267
63-
build-test-tokio:
64-
name: Build & Test Tokio
65-
runs-on: ubuntu-latest
66-
strategy:
67-
matrix:
68-
rust:
69-
- version: stable # STABLE
70-
- version: 1.63.0 # MSRV
71-
features:
72-
- async
73-
- async-https
74-
- async-https-native
75-
- async-https-rustls
76-
- async-https-rustls-manual-roots
77-
steps:
78-
- name: Checkout
79-
uses: actions/checkout@v4
80-
- name: Generate cache key
81-
run: echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key
82-
- name: Rust Cache
83-
uses: actions/cache@v3
84-
with:
85-
path: |
86-
~/.cargo/registry
87-
~/.cargo/git
88-
target
89-
key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
90-
- name: Install Rust Toolchain
91-
uses: dtolnay/rust-toolchain@v1
92-
with:
93-
toolchain: ${{ matrix.rust.version }}
94-
- name: Set profile
95-
run: rustup set profile minimal
96-
- name: Update toolchain
97-
run: rustup update
98-
- name: Pin dependencies for MSRV
99-
if: matrix.rust.version == '1.63.0'
100-
run: |
101-
cargo update -p zstd-sys --precise "2.0.8+zstd.1.5.5"
102-
cargo update -p time --precise "0.3.20"
103-
cargo update -p home --precise 0.5.5
104-
cargo update -p url --precise "2.5.0"
105-
cargo update -p tokio --precise "1.38.1"
106-
cargo update -p tokio-util --precise "0.7.11"
10768
- name: Build
108-
run: cargo build --features ${{ matrix.features }} tokio --no-default-features
109-
- name: Test
110-
run: cargo test --features ${{ matrix.features }} tokio --no-default-features -- --test-threads=1
69+
run: cargo build --features ${{ matrix.features }},${{ matrix.runtime != 'blocking' && matrix.runtime || '' }} --no-default-features
11170

112-
build-test-async-std:
113-
name: Build & Test Async-std
114-
runs-on: ubuntu-latest
115-
strategy:
116-
matrix:
117-
rust:
118-
- version: stable # STABLE
119-
- version: 1.63.0 # MSRV
120-
features:
121-
- async
122-
- async-https
123-
- async-https-native
124-
- async-https-rustls
125-
- async-https-rustls-manual-roots
126-
steps:
127-
- name: Checkout
128-
uses: actions/checkout@v4
129-
- name: Generate cache key
130-
run: echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key
131-
- name: Rust Cache
132-
uses: actions/cache@v3
133-
with:
134-
path: |
135-
~/.cargo/registry
136-
~/.cargo/git
137-
target
138-
key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
139-
- name: Install Rust Toolchain
140-
uses: dtolnay/rust-toolchain@v1
141-
with:
142-
toolchain: ${{ matrix.rust.version }}
143-
- name: Set profile
144-
run: rustup set profile minimal
145-
- name: Update toolchain
146-
run: rustup update
147-
- name: Pin dependencies for MSRV
148-
if: matrix.rust.version == '1.63.0'
149-
run: |
150-
cargo update -p zstd-sys --precise "2.0.8+zstd.1.5.5"
151-
cargo update -p time --precise "0.3.20"
152-
cargo update -p home --precise 0.5.5
153-
cargo update -p url --precise "2.5.0"
154-
cargo update -p tokio --precise "1.38.1"
155-
cargo update -p tokio-util --precise "0.7.11"
156-
- name: Build
157-
run: cargo build --features ${{ matrix.features }} async-std --no-default-features
15871
- name: Test
159-
run: cargo test --features ${{ matrix.features }} async-std --no-default-features -- --test-threads=1
72+
run: cargo test --features ${{ matrix.features }},${{ matrix.runtime != 'blocking' && matrix.runtime || '' }} --no-default-features -- --test-threads=1
16073

16174
fmt:
16275
name: Rust Formatting

0 commit comments

Comments
 (0)