Skip to content

Commit 045cf3f

Browse files
authored
Upgrade GHA workflows to remove deprecation warnings (#477)
1 parent d13461b commit 045cf3f

File tree

4 files changed

+88
-140
lines changed

4 files changed

+88
-140
lines changed

.github/workflows/ci-master.yml

Lines changed: 43 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
if: matrix.target.os == 'macos-latest'
3030
run: sudo ifconfig lo0 alias 127.0.0.3
3131

32-
- uses: actions/checkout@v2
32+
- uses: actions/checkout@v3
3333

3434
# install OpenSSL on Windows
3535
- name: Set vcpkg root
@@ -43,11 +43,10 @@ jobs:
4343
run: vcpkg install openssl:x86-windows
4444

4545
- name: Install ${{ matrix.version }}
46-
uses: actions-rs/toolchain@v1
47-
with:
48-
toolchain: ${{ matrix.version }}-${{ matrix.target.triple }}
49-
profile: minimal
50-
override: true
46+
run: |
47+
rustup set profile minimal
48+
rustup install ${{ matrix.version }}-${{ matrix.target.triple }}
49+
rustup override set ${{ matrix.version }}-${{ matrix.target.triple }}
5150
5251
# - name: Install MSYS2
5352
# if: matrix.target.triple == 'x86_64-pc-windows-gnu'
@@ -59,43 +58,34 @@ jobs:
5958
# msys2 -c 'pacman --noconfirm -S base-devel pkg-config'
6059

6160
# - name: Generate Cargo.lock
62-
# uses: actions-rs/cargo@v1
63-
# with: { command: generate-lockfile }
61+
# run: cargo generate-lockfile
6462
# - name: Cache Dependencies
65-
# uses: Swatinem/rust-cache@v1.2.0
63+
# uses: Swatinem/rust-cache@v2.2.0
6664

6765
- name: Install cargo-hack
68-
uses: actions-rs/cargo@v1
69-
with:
70-
command: install
71-
args: cargo-hack
66+
run: cargo install cargo-hack
7267

7368
- name: check lib
7469
if: >
7570
matrix.target.os != 'ubuntu-latest'
7671
&& matrix.target.triple != 'x86_64-pc-windows-gnu'
77-
uses: actions-rs/cargo@v1
78-
with: { command: ci-check-lib }
72+
run: cargo ci-check-lib
7973
- name: check lib
8074
if: matrix.target.os == 'ubuntu-latest'
81-
uses: actions-rs/cargo@v1
82-
with: { command: ci-check-lib-linux }
75+
run: cargo ci-check-lib-linux
8376
- name: check lib
8477
if: matrix.target.triple == 'x86_64-pc-windows-gnu'
85-
uses: actions-rs/cargo@v1
86-
with: { command: ci-check-min }
87-
78+
run: cargo ci-check-min
79+
8880
- name: check full
8981
# TODO: compile OpenSSL and run tests on MinGW
9082
if: >
9183
matrix.target.os != 'ubuntu-latest'
9284
&& matrix.target.triple != 'x86_64-pc-windows-gnu'
93-
uses: actions-rs/cargo@v1
94-
with: { command: ci-check }
85+
run: cargo ci-check
9586
- name: check all
9687
if: matrix.target.os == 'ubuntu-latest'
97-
uses: actions-rs/cargo@v1
98-
with: { command: ci-check-linux }
88+
run: cargo ci-check-linux
9989

10090
- name: tests
10191
if: >
@@ -116,95 +106,74 @@ jobs:
116106
name: coverage
117107
runs-on: ubuntu-latest
118108
steps:
119-
- uses: actions/checkout@v2
109+
- uses: actions/checkout@v3
120110

121111
- name: Install Rust (nightly)
122-
uses: actions-rs/toolchain@v1
123-
with:
124-
toolchain: nightly
125-
profile: minimal
126-
override: true
112+
run: |
113+
rustup set profile minimal
114+
rustup install nightly
115+
rustup override set nightly
127116
128117
- name: Generate Cargo.lock
129-
uses: actions-rs/cargo@v1
130-
with: { command: generate-lockfile }
118+
run: cargo generate-lockfile
131119
- name: Cache Dependencies
132-
uses: Swatinem/rust-cache@v1.3.0
133-
120+
uses: Swatinem/rust-cache@v2.2.0
121+
134122
- name: Generate coverage file
135123
if: github.ref == 'refs/heads/master'
136124
run: |
137125
cargo install cargo-tarpaulin
138126
cargo tarpaulin --out Xml --verbose
139127
- name: Upload to Codecov
140128
if: github.ref == 'refs/heads/master'
141-
uses: codecov/codecov-action@v1
142-
with: { file: cobertura.xml }
129+
uses: codecov/codecov-action@v3
130+
with: { files: cobertura.xml }
143131

144132
minimal-versions:
145133
name: minimal versions
146134
runs-on: ubuntu-latest
147135
steps:
148-
- uses: actions/checkout@v2
136+
- uses: actions/checkout@v3
149137

150138
- name: Install Rust (nightly)
151-
uses: actions-rs/toolchain@v1
152-
with:
153-
toolchain: nightly
154-
profile: minimal
155-
override: true
139+
run: |
140+
rustup set profile minimal
141+
rustup install nightly
142+
rustup override set nightly
156143
157144
- name: Generate Cargo.lock
158-
uses: actions-rs/cargo@v1
159-
with: { command: generate-lockfile }
145+
run: cargo generate-lockfile
160146
- name: Cache Dependencies
161-
uses: Swatinem/rust-cache@v1.3.0
147+
uses: Swatinem/rust-cache@v2.2.0
162148

163149
- name: Install cargo-minimal-versions
164-
uses: actions-rs/cargo@v1
165-
with:
166-
command: install
167-
args: cargo-minimal-versions
150+
run: cargo install cargo-minimal-versions
168151

169152
- name: Install cargo-hack
170-
uses: actions-rs/cargo@v1
171-
with:
172-
command: install
173-
args: cargo-hack
153+
run: cargo install cargo-hack
174154

175155
- name: Check With Minimal Versions
176-
uses: actions-rs/cargo@v1
177-
with:
178-
command: minimal-versions
179-
args: check
156+
run: cargo minimal-versions check
180157

181158
nextest:
182159
name: nextest
183160
runs-on: ubuntu-latest
184161
steps:
185-
- uses: actions/checkout@v2
162+
- uses: actions/checkout@v3
186163

187164
- name: Install Rust
188-
uses: actions-rs/toolchain@v1
189-
with:
190-
toolchain: stable
191-
profile: minimal
192-
override: true
165+
run: |
166+
rustup set profile minimal
167+
rustup install stable
168+
rustup override set stable
193169
194170
- name: Generate Cargo.lock
195-
uses: actions-rs/cargo@v1
196-
with: { command: generate-lockfile }
171+
run: cargo generate-lockfile
197172
- name: Cache Dependencies
198-
uses: Swatinem/rust-cache@v1.3.0
173+
uses: Swatinem/rust-cache@v2.2.0
199174

200175
- name: Install cargo-nextest
201-
uses: actions-rs/cargo@v1
202-
with:
203-
command: install
204-
args: cargo-nextest
176+
run: cargo install cargo-nextest
205177

206178
- name: Test with cargo-nextest
207-
uses: actions-rs/cargo@v1
208-
with:
209-
command: nextest
210-
args: run
179+
run: cargo nextest run

.github/workflows/ci.yml

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
if: matrix.target.os == 'macos-latest'
3333
run: sudo ifconfig lo0 alias 127.0.0.3
3434

35-
- uses: actions/checkout@v2
35+
- uses: actions/checkout@v3
3636

3737
# install OpenSSL on Windows
3838
- name: Set vcpkg root
@@ -46,11 +46,10 @@ jobs:
4646
run: vcpkg install openssl:x86-windows
4747

4848
- name: Install ${{ matrix.version }}
49-
uses: actions-rs/toolchain@v1
50-
with:
51-
toolchain: ${{ matrix.version }}-${{ matrix.target.triple }}
52-
profile: minimal
53-
override: true
49+
run: |
50+
rustup set profile minimal
51+
rustup install ${{ matrix.version }}-${{ matrix.target.triple }}
52+
rustup override set ${{ matrix.version }}-${{ matrix.target.triple }}
5453
5554
# - name: Install MSYS2
5655
# if: matrix.target.triple == 'x86_64-pc-windows-gnu'
@@ -62,10 +61,9 @@ jobs:
6261
# msys2 -c 'pacman --noconfirm -S base-devel pkg-config'
6362

6463
# - name: Generate Cargo.lock
65-
# uses: actions-rs/cargo@v1
66-
# with: { command: generate-lockfile }
64+
# run: cargo generate-lockfile
6765
# - name: Cache Dependencies
68-
# uses: Swatinem/rust-cache@v1.2.0
66+
# uses: Swatinem/rust-cache@v2.2.0
6967

7068
- name: Install cargo-hack
7169
if: matrix.version != '1.59.0'
@@ -84,8 +82,7 @@ jobs:
8482
cargo add [email protected] --dev -p=actix-server
8583
8684
- name: Generate Cargo.lock
87-
uses: actions-rs/cargo@v1
88-
with: { command: generate-lockfile }
85+
run: cargo generate-lockfile
8986

9087
- name: workaround MSRV issues
9188
if: matrix.version != 'stable'
@@ -96,28 +93,23 @@ jobs:
9693
if: >
9794
matrix.target.os != 'ubuntu-latest'
9895
&& matrix.target.triple != 'x86_64-pc-windows-gnu'
99-
uses: actions-rs/cargo@v1
100-
with: { command: ci-check-lib }
96+
run: cargo ci-check-lib
10197
- name: check lib
10298
if: matrix.target.os == 'ubuntu-latest'
103-
uses: actions-rs/cargo@v1
104-
with: { command: ci-check-lib-linux }
99+
run: cargo ci-check-lib-linux
105100
- name: check lib
106101
if: matrix.target.triple == 'x86_64-pc-windows-gnu'
107-
uses: actions-rs/cargo@v1
108-
with: { command: ci-check-min }
102+
run: cargo ci-check-min
109103

110104
- name: check full
111105
# TODO: compile OpenSSL and run tests on MinGW
112106
if: >
113107
matrix.target.os != 'ubuntu-latest'
114108
&& matrix.target.triple != 'x86_64-pc-windows-gnu'
115-
uses: actions-rs/cargo@v1
116-
with: { command: ci-check }
109+
run: cargo ci-check
117110
- name: check all
118111
if: matrix.target.os == 'ubuntu-latest'
119-
uses: actions-rs/cargo@v1
120-
with: { command: ci-check-linux }
112+
run: cargo ci-check-linux
121113

122114
- name: tests
123115
if: matrix.target.os == 'macos-latest'
@@ -143,20 +135,18 @@ jobs:
143135
runs-on: ubuntu-latest
144136

145137
steps:
146-
- uses: actions/checkout@v2
138+
- uses: actions/checkout@v3
147139

148140
- name: Install Rust (nightly)
149-
uses: actions-rs/toolchain@v1
150-
with:
151-
toolchain: nightly-x86_64-unknown-linux-gnu
152-
profile: minimal
153-
override: true
141+
run: |
142+
rustup set profile minimal
143+
rustup install nightly
144+
rustup override set nightly
154145
155146
- name: Generate Cargo.lock
156-
uses: actions-rs/cargo@v1
157-
with: { command: generate-lockfile }
147+
run: cargo generate-lockfile
158148
- name: Cache Dependencies
159-
uses: Swatinem/rust-cache@v1.3.0
149+
uses: Swatinem/rust-cache@v2.2.0
160150

161151
- name: doc tests io-uring
162152
run: |

.github/workflows/clippy-fmt.yml

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,30 @@ jobs:
88
fmt:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v3
1212

1313
- name: Install Rust
14-
uses: actions-rs/toolchain@v1
15-
with:
16-
toolchain: stable
17-
profile: minimal
18-
components: rustfmt
19-
override: true
14+
run: |
15+
rustup set profile minimal
16+
rustup install stable
17+
rustup override set stable
18+
rustup component add rustfmt
2019
- name: Rustfmt Check
21-
uses: actions-rs/cargo@v1
22-
with:
23-
command: fmt
24-
args: --all -- --check
20+
run: cargo fmt --all -- --check
2521

2622
clippy:
2723
runs-on: ubuntu-latest
2824
steps:
29-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v3
3026

3127
- name: Install Rust
32-
uses: actions-rs/toolchain@v1
33-
with:
34-
toolchain: stable
35-
profile: minimal
36-
components: clippy
37-
override: true
38-
- name: Clippy Check
39-
uses: actions-rs/clippy-check@v1
28+
run: |
29+
rustup set profile minimal
30+
rustup install stable
31+
rustup override set stable
32+
rustup component add clippy
33+
- uses: giraffate/clippy-action@v1
4034
with:
41-
token: ${{ secrets.GITHUB_TOKEN }}
42-
args: --workspace --all-features --tests --examples --bins -- -Dclippy::todo
35+
reporter: "github-pr-check"
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
clippy_flags: --workspace --all-features --tests --examples --bins -- -Dclippy::todo

0 commit comments

Comments
 (0)