@@ -2,16 +2,15 @@ name: Rust
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 :
1313 build-test :
14-
1514 runs-on : ubuntu-latest
1615 strategy :
1716 matrix :
@@ -27,53 +26,95 @@ jobs:
2726 - async-https-native
2827 - async-https-rustls
2928 - async-https-rustls-manual-roots
29+ steps :
30+ - uses : actions/checkout@v3
31+
32+ - name : Generate cache key
33+ run : echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key
34+
35+ - name : cache
36+ uses : actions/cache@v3
37+ with :
38+ path : |
39+ ~/.cargo/registry
40+ ~/.cargo/git
41+ target
42+ key : ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
43+
44+ - name : Set default toolchain
45+ run : rustup default ${{ matrix.rust.version }}
46+
47+ - name : Set profile
48+ run : rustup set profile minimal
49+
50+ - name : Add clippy
51+ if : ${{ matrix.rust.clippy }}
52+ run : rustup component add clippy
53+
54+ - name : Update toolchain
55+ run : rustup update
56+
57+ - name : pin dependencies
58+ if : matrix.rust.version == '1.63.0'
59+ run : |
60+ cargo update -p home --precise 0.5.5
61+
62+ - name : Build
63+ run : cargo build --features ${{ matrix.features }} --no-default-features
64+
65+ - name : Clippy
66+ if : ${{ matrix.rust.clippy }}
67+ run : cargo clippy --all-targets --features ${{ matrix.features }} --no-default-features -- -D warnings
68+
69+ - name : Test
70+ run : cargo test --features ${{ matrix.features }} --no-default-features
71+
72+ build-arti-hyper-feature-test :
73+ # It has it's own job to running tests, because arti-client does not support the MSRV.
74+ runs-on : ubuntu-latest
75+ strategy :
76+ matrix :
77+ rust :
78+ - version : stable # STABLE
79+ clippy : true
80+ features :
3081 - async-arti-hyper
3182 - async-arti-hyper-native
3283 - async-arti-hyper-rustls
3384 steps :
34- - uses : actions/checkout@v3
35- - name : Generate cache key
36- run : echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key
37- - name : cache
38- uses : actions/cache@v3
39- with :
40- path : |
41- ~/.cargo/registry
42- ~/.cargo/git
43- target
44- key : ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
45- - name : Set default toolchain
46- run : rustup default ${{ matrix.rust.version }}
47- - name : Set profile
48- run : rustup set profile minimal
49- - name : Add clippy
50- if : ${{ matrix.rust.clippy }}
51- run : rustup component add clippy
52- - name : Update toolchain
53- run : rustup update
54- - name : pin dependencies
55- if : matrix.rust.version == '1.63.0'
56- run : |
57- cargo update -p home --precise 0.5.5
58- cargo update -p tor-dirclient --precise 0.6.3
59- cargo update -p tor-config --precise 0.8.0
60- cargo update -p tor-netdoc --precise 0.6.3
61- cargo update -p tor-dirmgr --precise 0.9.3
62- cargo update -p regex --precise 1.9.6
63- cargo update -p zstd-sys --precise 2.0.8+zstd.1.5.5
64- cargo update -p time:0.3.31 --precise 0.3.20
65- cargo update -p tor-error --precise 0.4.1
66- cargo update -p toml:0.7.8 --precise 0.7.3
67- cargo update -p toml_edit --precise 0.19.8
68- cargo update -p winnow --precise 0.4.1
69- cargo update -p serde_spanned --precise 0.6.1
70- cargo update -p backtrace --precise 0.3.68
71- cargo update -p toml_datetime --precise 0.6.1
72- cargo update -p tinystr --precise 0.7.1
73- - name : Build
74- run : cargo build --features ${{ matrix.features }} --no-default-features
75- - name : Clippy
76- if : ${{ matrix.rust.clippy }}
77- run : cargo clippy --all-targets --features ${{ matrix.features }} --no-default-features -- -D warnings
78- - name : Test
79- run : cargo test --features ${{ matrix.features }} --no-default-features -- --include-ignored
85+ - uses : actions/checkout@v3
86+
87+ - name : Generate cache key
88+ run : echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key
89+
90+ - name : cache
91+ uses : actions/cache@v3
92+ with :
93+ path : |
94+ ~/.cargo/registry
95+ ~/.cargo/git
96+ target
97+ key : ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
98+
99+ - name : Set default toolchain
100+ run : rustup default ${{ matrix.rust.version }}
101+
102+ - name : Set profile
103+ run : rustup set profile minimal
104+
105+ - name : Add clippy
106+ if : ${{ matrix.rust.clippy }}
107+ run : rustup component add clippy
108+
109+ - name : Update toolchain
110+ run : rustup update
111+
112+ - name : Build
113+ run : cargo build --features ${{ matrix.features }} --no-default-features
114+
115+ - name : Clippy
116+ if : ${{ matrix.rust.clippy }}
117+ run : cargo clippy --all-targets --features ${{ matrix.features }} --no-default-features -- -D warnings
118+
119+ - name : Test
120+ run : cargo test --features ${{ matrix.features }} --no-default-features -- --include-ignored
0 commit comments