forked from hickory-dns/hickory-dns
-
Notifications
You must be signed in to change notification settings - Fork 0
211 lines (176 loc) · 5.49 KB
/
test.yml
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
name: test
on:
push:
branches:
- main
- release/**
- "*_dev"
paths-ignore:
- "conformance/**"
pull_request:
branches:
- main
- release/**
paths-ignore:
- "conformance/**"
schedule:
- cron: "0 3 * * 4"
env:
CARGO_WS_VERSION: "0.2.44"
jobs:
## Run all default oriented feature sets across all platforms.
platform-matrix:
name: platform
runs-on: ${{ matrix.os }}
strategy:
matrix:
#os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: extractions/setup-just@v2
- name: cargo install cargo-workspaces
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-workspaces
version: ${{ env.CARGO_WS_VERSION }}
- name: just all-features
run: just all-features
## Run all default oriented feature sets across all platforms.
code-coverage:
name: coverage
needs: platform-matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: llvm-tools-preview
- uses: extractions/setup-just@v2
- name: cargo install cargo-llvm-cov
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-llvm-cov
- name: just coverage
run: just coverage
- name: upload coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
#files: target/llvm-cov-target/hickory-dns-coverage.json
## Work through all of the variations of the different features, only on linux to save concurrent resources
exhaustive-features-matrix:
name: exhaustive
# Let's wait for the all-features cache
needs: platform-matrix
runs-on: ubuntu-latest
strategy:
matrix:
# feature: [default-features, no-default-features, dns-over-rustls, dns-over-https-rustls, dns-over-native-tls, dns-over-openssl, dnssec-openssl, dnssec-ring, mdns, async-std]
feature:
[
default,
no-default-features,
dns-over-rustls,
dns-over-https-rustls,
dns-over-quic,
dns-over-h3,
dns-over-native-tls,
dnssec-openssl,
dnssec-ring,
doc,
]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: extractions/setup-just@v2
- name: cargo install cargo-workspaces
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-workspaces
version: ${{ env.CARGO_WS_VERSION }}
- name: just
run: just ${{ matrix.feature }}
## Check past and future versions
## this enforces the minimum version of rust this project works with
past-future-matrix:
name: past-future
# Let's wait for the all-features cache
needs: platform-matrix
runs-on: ubuntu-latest
strategy:
matrix:
version: ["1.67.0", beta, "nightly-2024-05-23"]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.version }}
- uses: extractions/setup-just@v2
- name: cargo install cargo-workspaces
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-workspaces
version: ${{ env.CARGO_WS_VERSION }}
- name: just no-default-features
run: just no-default-features
- name: just build-bench
if: contains( matrix.version, 'nightly' )
run: just build-bench
## Execute the clippy checks
cleanliness:
name: cleanliness
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# not using the cargo cache here, since this differs significantly
- name: cargo-all cache
uses: actions/cache@v4
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-all-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-all-${{ hashFiles('**/Cargo.toml') }}
${{ runner.os }}-cargo-all
${{ runner.os }}-cargo
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
- uses: extractions/setup-just@v2
- name: cargo install cargo-workspaces
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-workspaces
version: ${{ env.CARGO_WS_VERSION }}
# Clippy
- name: just clippy
run: just clippy
# Rustfmt
- name: just fmt
run: just fmt
# Audit
- name: cargo audit
run: just audit
# Build and run bind to test our compatibility with standard name servers
compatibility:
name: compatibility
# wait for the cache from all-features
needs: platform-matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: extractions/setup-just@v2
- name: target/bind cache
uses: actions/cache@v4
with:
path: target/bind
key: ${{ runner.os }}-bind-${{ hashFiles('**/justfile') }}
restore-keys: |
${{ runner.os }}-bind-${{ hashFiles('**/justfile') }}
${{ runner.os }}-bind
- name: just compatibility
run: just compatibility