-
Notifications
You must be signed in to change notification settings - Fork 71
142 lines (135 loc) · 4.44 KB
/
cont_integration.yml
File metadata and controls
142 lines (135 loc) · 4.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
on: [push, pull_request]
name: CI
env:
CARGO_TERM_COLOR: always
jobs:
build-test:
name: Build & Test
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- version: stable # STABLE
- version: 1.63.0 # MSRV
features:
- default
- blocking
- blocking-https
- blocking-https-rustls
- blocking-https-native
- blocking-https-bundled
- async
- async-https
- async-https-native
- async-https-rustls
- async-https-rustls-manual-roots
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate cache key
run: echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key
- name: Rust Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust.version }}
- name: Set profile
run: rustup set profile minimal
- name: Update toolchain
run: rustup update
- name: Pin dependencies for MSRV
if: matrix.rust.version == '1.63.0'
run: |
cargo update -p reqwest --precise "0.12.4"
cargo update -p minreq --precise "2.13.2"
cargo update -p home --precise "0.5.5"
cargo update -p url --precise "2.5.0"
cargo update -p tokio --precise "1.38.1"
cargo update -p security-framework-sys --precise "2.11.1"
cargo update -p native-tls --precise "0.2.13"
cargo update -p ring --precise "0.17.12"
cargo update -p flate2 --precise "1.0.35"
cargo update -p once_cell --precise "1.20.3"
cargo update -p tracing --precise "0.1.41"
cargo update -p tracing-core --precise "0.1.33"
cargo update -p parking_lot --precise "0.12.3"
cargo update -p parking_lot_core --precise "0.9.10"
cargo update -p lock_api --precise "0.4.12"
cargo update -p socket2@0.6.1 --precise "0.5.10"
cargo update -p webpki-roots@1.0.4 --precise "1.0.1"
cargo update -p openssl --precise "0.10.73"
cargo update -p openssl-sys --precise "0.9.109"
cargo update -p syn --precise "2.0.106"
cargo update -p quote --precise "1.0.41"
cargo update -p log --precise "0.4.28"
cargo update -p bzip2-sys --precise "0.1.12+1.0.8" # dev-dependency
- name: Build
run: cargo build --features ${{ matrix.features }} --no-default-features
- name: Test
run: cargo test --features ${{ matrix.features }} --no-default-features -- --test-threads=1
fmt:
name: Rust Formatting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
components: rustfmt
- name: Check fmt
run: cargo fmt --all --check
clippy:
name: Rust Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: clippy
- name: Rust Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
- name: Check clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets -- -D warnings
docs:
name: Rust Docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
- name: Rust Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-docs-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
- name: Build documentation
run: cargo doc --all-features --no-deps
env:
RUSTDOCFLAGS: -D warnings