Skip to content

Commit d2d8293

Browse files
authored
Tentative solution for CI (Clippy error, deprecated warning) (#117)
* ci.yml to use Node16 * `actions/checkout@v3` * `actions/setup-python@v4` * `actions-rs` is unmaintained: * actions-rs/toolchain#219 * actions-rs/cargo#222 * Library Checker: Rust 1.60 * https://judge.yosupo.jp/help * clippy allow renamed-and-removed-lints * https://doc.rust-lang.org/rustc/lints/listing/warn-by-default.html#renamed-and-removed-lints * `cargo`, `rustup` execute from `$PATH` * uses dtolnay/rust-toolchain@master
1 parent c03e2ca commit d2d8293

File tree

1 file changed

+38
-40
lines changed

1 file changed

+38
-40
lines changed

.github/workflows/ci.yml

+38-40
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@ jobs:
2222

2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@v2
25+
uses: actions/checkout@v3
2626

2727
- name: 'Setup `${{ matrix.toolchain }}`'
28-
uses: actions-rs/toolchain@v1
28+
uses: dtolnay/rust-toolchain@master
2929
with:
3030
toolchain: ${{ matrix.toolchain }}
31-
override: true
32-
profile: minimal
3331
components: rustfmt
3432

33+
- name: 'Override `${{ matrix.toolchain }}'
34+
run: |
35+
rustup override set ${{ matrix.toolchain }}
36+
3537
- name: cargo-fmt
36-
uses: actions-rs/cargo@v1
37-
with:
38-
command: fmt
39-
args: --all -- --check
38+
run: |
39+
cargo fmt --all -- --check
4040
4141
build:
4242
strategy:
@@ -66,33 +66,29 @@ jobs:
6666
if: matrix.os == 'windows-2019'
6767

6868
- name: Checkout
69-
uses: actions/checkout@v2
69+
uses: actions/checkout@v3
7070

7171
- name: 'Setup `${{ matrix.toolchain }}`'
72-
uses: actions-rs/toolchain@v1
72+
uses: dtolnay/rust-toolchain@master
7373
with:
7474
toolchain: ${{ matrix.toolchain }}
75-
override: true
76-
profile: minimal
7775
components: clippy
7876

77+
- name: 'Override `${{ matrix.toolchain }}`'
78+
run: |
79+
rustup override set ${{ matrix.toolchain }}
80+
7981
- name: cargo-clippy
80-
uses: actions-rs/cargo@v1
81-
with:
82-
command: clippy
83-
args: --workspace --all-targets -- -D warnings
82+
run: |
83+
cargo clippy --workspace --all-targets -- -A renamed-and-removed-lints -D warnings
8484
8585
- name: cargo-build
86-
uses: actions-rs/cargo@v1
87-
with:
88-
command: build
89-
args: --workspace --all-targets
86+
run: |
87+
cargo build --workspace --all-targets
9088
9189
- name: cargo-test
92-
uses: actions-rs/cargo@v1
93-
with:
94-
command: test
95-
args: --workspace --no-fail-fast
90+
run: |
91+
cargo test --workspace --no-fail-fast
9692
env:
9793
RUST_BACKTRACE: full
9894

@@ -112,18 +108,20 @@ jobs:
112108

113109
steps:
114110
- name: Checkout
115-
uses: actions/checkout@v2
111+
uses: actions/checkout@v3
116112

117113
- name: 'Setup `${{ matrix.toolchain }}`'
118-
uses: actions-rs/toolchain@v1
114+
uses: dtolnay/rust-toolchain@master
119115
with:
120116
toolchain: ${{ matrix.toolchain }}
121-
override: true
122-
profile: minimal
123117
components: rustfmt
124118

119+
- name: 'Override `${{ matrix.toolchain }}`'
120+
run: |
121+
rustup override set ${{ matrix.toolchain }}
122+
125123
- name: Setup Python ${{ matrix.python-version }}
126-
uses: actions/setup-python@v2
124+
uses: actions/setup-python@v4
127125
with:
128126
python-version: ${{ matrix.python-version }}
129127

@@ -136,28 +134,28 @@ jobs:
136134

137135
steps:
138136
- name: Checkout
139-
uses: actions/checkout@v2
137+
uses: actions/checkout@v3
140138

141-
- name: Setup `1.47.0-x86_64-unknown-linux-gnu`
142-
uses: actions-rs/toolchain@v1
139+
- name: Setup `1.60.0-x86_64-unknown-linux-gnu`
140+
uses: dtolnay/rust-toolchain@master
143141
with:
144-
toolchain: 1.47.0-x86_64-unknown-linux-gnu
145-
override: true
146-
profile: minimal
142+
toolchain: 1.60.0-x86_64-unknown-linux-gnu
143+
144+
- name: 'Override `1.60.0-x86_64-unknown-linux-gnu'
145+
run: |
146+
rustup override set 1.60.0-x86_64-unknown-linux-gnu
147147
148148
- name: Setup Python 3.9
149-
uses: actions/setup-python@v2
149+
uses: actions/setup-python@v4
150150
with:
151151
python-version: '3.9'
152152

153153
- name: Install `oj`
154154
run: pip install online-judge-tools
155155

156156
- name: cargo-build
157-
uses: actions-rs/cargo@v1
158-
with:
159-
command: build
160-
args: --release --examples
157+
run: |
158+
cargo build --release --examples
161159
162160
- name: Verify
163161
run: |

0 commit comments

Comments
 (0)