-
Notifications
You must be signed in to change notification settings - Fork 489
45 lines (41 loc) · 1.19 KB
/
ci_unused_deps.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
name: Unused Rust crate check
permissions:
contents: read
concurrency:
group: dep-check-${{ github.head_ref || 'ci_unused_deps' }}
cancel-in-progress: true
on:
push:
branches: [master]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
unused_deps_check:
name: Rust check ${{ matrix.check }} (${{ matrix.rust-target }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
rust: [nightly]
rust-target: [x86_64-unknown-linux-gnu]
check: [unused-dependencies]
env:
RUST_BACKTRACE: full
RUSTV: ${{ matrix.rust }}
TARGET: ${{ matrix.rust-target }}
steps:
- uses: actions/checkout@v4
- name: Install Rust ${{ matrix.rust }} toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.rust-target }}
- name: Install Zig
run: ./actions/zig-install.sh ${{ matrix.os }}
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.rust-target }}-${{ matrix.check }}
- name: Unused dependencies test
if: ${{ matrix.check == 'unused-dependencies' }}
run: make check-udeps