7
7
types : [released]
8
8
9
9
jobs :
10
+
11
+ check :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - uses : actions/checkout@v4
15
+ - uses : dtolnay/rust-toolchain@stable
16
+ id : " rust-toolchain"
17
+ - name : install cargo-hack
18
+ uses : taiki-e/install-action@cargo-hack
19
+ - uses : actions/cache@v4
20
+ with :
21
+ path : |
22
+ ~/.cargo/git
23
+ ~/.cargo/registry
24
+ target
25
+ key : " ${{runner.os}} Rust check ${{steps.rust-toolchain.outputs.cachekey}} Lock ${{hashFiles('Cargo.lock')}}"
26
+ - run : cargo hack check --feature-powerset --at-least-one-of aws-lc-rs,ring --locked
27
+ env :
28
+ RUST_BACKTRACE : 1
29
+
10
30
test :
31
+ needs : [check]
11
32
runs-on : ubuntu-latest
12
33
steps :
13
- - uses : actions/checkout@v3
34
+ - uses : actions/checkout@v4
14
35
- run : sudo apt-get update -y && sudo apt-get install -y knot-dnsutils
15
36
- uses : dtolnay/rust-toolchain@stable
16
37
id : " rust-toolchain"
17
38
- name : install cargo-hack
18
39
uses : taiki-e/install-action@cargo-hack
19
- - uses : actions/cache@v3
40
+ - uses : actions/cache@v4
20
41
with :
21
42
path : |
22
43
~/.cargo/git
23
44
~/.cargo/registry
24
45
target
25
- key : " ${{runner.os}} Rust ${{steps.rust-toolchain.outputs.cachekey}} Lock ${{hashFiles('Cargo.lock')}}"
26
- - run : cargo hack test --feature-powerset --at-least-one-of aws-lc-rs,ring --locked -- --include-ignored
46
+ key : " ${{runner.os}} Rust test ${{steps.rust-toolchain.outputs.cachekey}} Lock ${{hashFiles('Cargo.lock')}}"
47
+ - run : cargo hack test --feature-powerset --at-least-one-of aws-lc-rs,ring --mutually-exclusive-features aws-lc-rs,ring --skip __debug_parser,default,native-roots,webpki-roots -- locked -- --include-ignored
27
48
env :
28
49
RUST_BACKTRACE : 1
29
50
30
51
rustfmt :
31
52
runs-on : ubuntu-latest
32
53
steps :
33
- - uses : actions/checkout@v3
54
+ - uses : actions/checkout@v4
34
55
- uses : dtolnay/rust-toolchain@nightly
35
56
with :
36
57
components : rustfmt
37
58
- run : cargo fmt --all -- --check
38
59
39
60
benchmark :
61
+ needs : [check]
40
62
name : bench
41
63
runs-on : ubuntu-latest
42
64
steps :
43
- - uses : actions/checkout@v3
65
+ - uses : actions/checkout@v4
44
66
- uses : dtolnay/rust-toolchain@nightly
45
- - uses : actions/cache@v3
67
+ - uses : actions/cache@v4
46
68
with :
47
69
path : |
48
70
~/.cargo/git
57
79
needs : [test]
58
80
runs-on : ubuntu-latest
59
81
steps :
60
- - uses : actions/checkout@v3
82
+ - uses : actions/checkout@v4
61
83
- uses : dtolnay/rust-toolchain@stable
62
84
- uses : msrd0/cargo-publish-action@v1
63
85
with :
@@ -75,26 +97,26 @@ jobs:
75
97
runs-on : ubuntu-latest
76
98
needs : [test]
77
99
steps :
78
- - uses : actions/checkout@v3
100
+ - uses : actions/checkout@v4
79
101
- uses : dtolnay/rust-toolchain@stable
80
102
id : " rust-toolchain"
81
103
- name : install cross
82
104
uses : baptiste0928/cargo-install@v2
83
105
with :
84
106
crate : cross
85
- - uses : actions/cache@v3
107
+ - uses : actions/cache@v4
86
108
with :
87
109
path : |
88
110
~/.cargo/git
89
111
~/.cargo/registry
90
112
target
91
113
key : " ${{runner.os}} Target ${{ matrix.target }} Rust ${{steps.rust-toolchain.outputs.cachekey}} Lock ${{hashFiles('Cargo.lock')}}"
92
- - run : cross build --release --locked --no-default-features --features ${{ matrix.roots }} --target ${{ matrix.target }}
114
+ - run : cross build --release --locked --no-default-features --features ring, ${{ matrix.roots }} --target ${{ matrix.target }}
93
115
env :
94
116
RUST_BACKTRACE : 1
95
117
- run : tree
96
118
- name : ' Upload Artifact'
97
- uses : actions/upload-artifact@v3
119
+ uses : actions/upload-artifact@v4
98
120
with :
99
121
name : " ${{ matrix.target }}--${{ matrix.roots }}"
100
122
path : |
@@ -110,21 +132,21 @@ jobs:
110
132
name : x86_64-apple-darwin--${{ matrix.roots }}
111
133
needs : [test]
112
134
steps :
113
- - uses : actions/checkout@v3
135
+ - uses : actions/checkout@v4
114
136
- uses : dtolnay/rust-toolchain@stable
115
137
id : " rust-toolchain"
116
- - uses : actions/cache@v3
138
+ - uses : actions/cache@v4
117
139
with :
118
140
path : |
119
141
~/.cargo/git
120
142
~/.cargo/registry
121
143
target
122
144
key : " ${{runner.os}} Rust ${{steps.rust-toolchain.outputs.cachekey}} Lock ${{hashFiles('Cargo.lock')}}"
123
- - run : cargo build --release --all- features
145
+ - run : cargo build --release --features ring,${{ matrix.roots }}
124
146
env :
125
147
RUST_BACKTRACE : 1
126
148
- name : ' Upload Artifact'
127
- uses : actions/upload-artifact@v3
149
+ uses : actions/upload-artifact@v4
128
150
with :
129
151
name : " x86_64-apple-darwin--${{ matrix.roots }}"
130
152
path : target/release/crab-hole
@@ -134,8 +156,8 @@ jobs:
134
156
needs : [cross_build]
135
157
steps :
136
158
- name : Checkout repository
137
- uses : actions/checkout@v3
138
- - uses : actions/download-artifact@v3
159
+ uses : actions/checkout@v4
160
+ - uses : actions/download-artifact@v4
139
161
with :
140
162
path : github_artifacts
141
163
- name : docker
@@ -151,8 +173,8 @@ jobs:
151
173
if : ${{ github.event_name == 'release' }}
152
174
steps :
153
175
- name : Checkout repository # needed to get github.event.release.tag_name
154
- uses : actions/checkout@v3
155
- - uses : actions/download-artifact@v3
176
+ uses : actions/checkout@v4
177
+ - uses : actions/download-artifact@v4
156
178
with :
157
179
path : github_artifacts
158
180
- name : Upload Release Artifacts
0 commit comments