-
Notifications
You must be signed in to change notification settings - Fork 271
70 lines (63 loc) · 2.06 KB
/
check-each.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
# Check each crate independently. Helps to catch dependency issues.
#
# Code changes are exercised via the `test` and `lint` workflows. This workflow just checks that
# each crate's `Cargo.toml` is configured sufficiently so that each crate can be compiled on its
# own.
name: check-each
permissions:
contents: read
on:
pull_request:
paths:
- "**/Cargo.toml"
- "**/*.rs"
- .github/workflows/check-each.yml
- .github/list-crates.sh
- justfile
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
RUSTFLAGS: "-D warnings -A deprecated -C debuginfo=0"
jobs:
cleanup:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa
with:
all_but_latest: true
access_token: ${{ github.token }}
list-changed-crates:
timeout-minutes: 10
runs-on: ubuntu-latest
container: docker://ghcr.io/linkerd/dev:v43-rust
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- run: git config --global --add safe.directory "$PWD" # actions/runner#2033
- uses: tj-actions/changed-files@800a2825992141ddde1a8bca8ad394cec34d3188
id: changed-files
with:
files: |
**/Cargo.toml
**/*.rs
.github/workflows/check-each.yml
- name: List changed crates
id: changed-crates
run: ./.github/list-crates.sh ${{ steps.changed-files.outputs.all_changed_files }}
outputs:
crates: ${{ steps.changed-crates.outputs.crates }}
check-each:
needs: list-changed-crates
timeout-minutes: 20
runs-on: ubuntu-latest
container: ghcr.io/linkerd/dev:v43-rust
strategy:
matrix:
crate: ${{ fromJson(needs.list-changed-crates.outputs.crates) }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- run: git config --global --add safe.directory "$PWD" # actions/runner#2033
- run: just fetch
- run: just check-crate ${{ matrix.crate }}