@@ -2,16 +2,16 @@ name: CI
22
33on :
44 push :
5- branches : [ "master" ]
5+ branches : ["master"]
66 pull_request :
7- branches : [ "master" ]
7+ branches : ["master"]
88
99env :
1010 CARGO_TERM_COLOR : always
1111
1212jobs :
13- build-test :
14- name : Build & Test
13+ build-test-blocking :
14+ name : Build & Test Blocking
1515 runs-on : ubuntu-latest
1616 strategy :
1717 matrix :
@@ -25,45 +25,138 @@ jobs:
2525 - blocking-https-rustls
2626 - blocking-https-native
2727 - blocking-https-bundled
28+ steps :
29+ - name : Checkout
30+ uses : actions/checkout@v4
31+ - name : Generate cache key
32+ run : echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key
33+ - name : Rust Cache
34+ uses : actions/cache@v3
35+ with :
36+ path : |
37+ ~/.cargo/registry
38+ ~/.cargo/git
39+ target
40+ key : ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
41+ - name : Install Rust Toolchain
42+ uses : dtolnay/rust-toolchain@v1
43+ with :
44+ toolchain : ${{ matrix.rust.version }}
45+ - name : Set profile
46+ run : rustup set profile minimal
47+ - name : Update toolchain
48+ run : rustup update
49+ - name : Pin dependencies for MSRV
50+ if : matrix.rust.version == '1.63.0'
51+ run : |
52+ cargo update -p zstd-sys --precise "2.0.8+zstd.1.5.5"
53+ cargo update -p time --precise "0.3.20"
54+ cargo update -p home --precise 0.5.5
55+ cargo update -p url --precise "2.5.0"
56+ cargo update -p tokio --precise "1.38.1"
57+ 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
62+
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"
107+ - 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
111+
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 :
28121 - async
29122 - async-https
30123 - async-https-native
31124 - async-https-rustls
32125 - async-https-rustls-manual-roots
33126 steps :
34- - name : Checkout
35- uses : actions/checkout@v4
36- - name : Generate cache key
37- run : echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key
38- - name : Rust Cache
39- uses : actions/cache@v3
40- with :
41- path : |
42- ~/.cargo/registry
43- ~/.cargo/git
44- target
45- key : ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
46- - name : Install Rust Toolchain
47- uses : dtolnay/rust-toolchain@v1
48- with :
49- toolchain : ${{ matrix.rust.version }}
50- - name : Set profile
51- run : rustup set profile minimal
52- - name : Update toolchain
53- run : rustup update
54- - name : Pin dependencies for MSRV
55- if : matrix.rust.version == '1.63.0'
56- run : |
57- cargo update -p zstd-sys --precise "2.0.8+zstd.1.5.5"
58- cargo update -p time --precise "0.3.20"
59- cargo update -p home --precise 0.5.5
60- cargo update -p url --precise "2.5.0"
61- cargo update -p tokio --precise "1.38.1"
62- cargo update -p tokio-util --precise "0.7.11"
63- - name : Build
64- run : cargo build --features ${{ matrix.features }} --no-default-features
65- - name : Test
66- run : cargo test --features ${{ matrix.features }} --no-default-features -- --test-threads=1
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
158+ - name : Test
159+ run : cargo test --features ${{ matrix.features }} async-std --no-default-features -- --test-threads=1
67160
68161 fmt :
69162 name : Rust Formatting
74167 - name : Install Rust Toolchain
75168 uses : dtolnay/rust-toolchain@v1
76169 with :
77- toolchain : nightly
78- components : rustfmt
170+ toolchain : nightly
171+ components : rustfmt
79172 - name : Check fmt
80173 run : cargo fmt --all --check
81174
88181 - name : Install Rust Toolchain
89182 uses : dtolnay/rust-toolchain@v1
90183 with :
91- toolchain : stable
92- components : clippy
184+ toolchain : stable
185+ components : clippy
93186 - name : Rust Cache
94187 uses : actions/cache@v3
95188 with :
0 commit comments