Skip to content

Commit 78df81f

Browse files
authored
ci: Split jobs into 'fast' and 'slow' workflows (#1365)
This change sets up CI to add support for the boring meshtls backend. We put most of the fast jobs into a single workflow and move slower jobs into another workflow. Unit tests are updated to exclude all app-level crates, which take a while to compile; and the integration test job now runs all of these app tests.
1 parent 696e731 commit 78df81f

File tree

7 files changed

+214
-160
lines changed

7 files changed

+214
-160
lines changed

.github/workflows/check-release.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/check.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

.github/workflows/deps.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/fast.yml

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Each job should typically run in under 5 minutes.
2+
name: fast
3+
4+
on:
5+
pull_request: {}
6+
7+
env:
8+
CARGO_INCREMENTAL: 0
9+
CARGO_NET_RETRY: 10
10+
RUST_BACKTRACE: short
11+
RUSTUP_MAX_RETRIES: 10
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
18+
# Linting
19+
check-clippy:
20+
timeout-minutes: 10
21+
runs-on: ubuntu-latest
22+
container:
23+
image: docker://rust:1.56.0-buster
24+
steps:
25+
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
26+
- run: rustup component add clippy
27+
- run: cargo clippy --all
28+
29+
# Enforce automated formatting.
30+
check-fmt:
31+
timeout-minutes: 10
32+
runs-on: ubuntu-latest
33+
container:
34+
image: docker://rust:1.56.0-buster
35+
steps:
36+
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
37+
- run: rustup component add rustfmt
38+
- run: make check-fmt
39+
40+
# Generate docs.
41+
check-docs:
42+
timeout-minutes: 10
43+
runs-on: ubuntu-latest
44+
container:
45+
image: docker://rust:1.56.0-buster
46+
steps:
47+
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
48+
- run: |
49+
cargo doc --all --no-deps \
50+
--exclude=linkerd-meshtls \
51+
--exclude=linkerd-meshtls-rustls
52+
53+
# Test the meshtls backends.
54+
test-meshtls:
55+
timeout-minutes: 10
56+
runs-on: ubuntu-latest
57+
container:
58+
image: docker://rust:1.56.0-buster
59+
steps:
60+
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
61+
- working-directory: ./linkerd/meshtls
62+
run: cargo test --all-features --no-run
63+
- working-directory: ./linkerd/meshtls
64+
run: cargo test --all-features
65+
- working-directory: ./linkerd/meshtls
66+
run: |
67+
cargo test --no-run \
68+
--package=linkerd-meshtls-rustls
69+
- working-directory: ./linkerd/meshtls
70+
run: |
71+
cargo test \
72+
--package=linkerd-meshtls-rustls
73+
- working-directory: linkerd/meshtls
74+
run: |
75+
cargo doc --all-features --no-deps \
76+
--package=linkerd-meshtls \
77+
--package=linkerd-meshtls-rustls
78+
79+
# Run non-integration tests. This should be quick.
80+
test-unit:
81+
timeout-minutes: 10
82+
runs-on: ubuntu-latest
83+
container:
84+
image: docker://rust:1.56.0-buster
85+
steps:
86+
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
87+
- run: |
88+
cargo test --all --no-run \
89+
--exclude=linkerd-app \
90+
--exclude=linkerd-app-admin \
91+
--exclude=linkerd-app-core \
92+
--exclude=linkerd-app-gateway \
93+
--exclude=linkerd-app-inbound \
94+
--exclude=linkerd-app-integration \
95+
--exclude=linkerd-app-outbound \
96+
--exclude=linkerd-app-test \
97+
--exclude=linkerd-meshtls \
98+
--exclude=linkerd-meshtls-rustls \
99+
--exclude=linkerd2-proxy
100+
- run: |
101+
cargo test --all \
102+
--exclude=linkerd-app \
103+
--exclude=linkerd-app-admin \
104+
--exclude=linkerd-app-core \
105+
--exclude=linkerd-app-gateway \
106+
--exclude=linkerd-app-inbound \
107+
--exclude=linkerd-app-integration \
108+
--exclude=linkerd-app-outbound \
109+
--exclude=linkerd-app-test \
110+
--exclude=linkerd-meshtls \
111+
--exclude=linkerd-meshtls-rustls \
112+
--exclude=linkerd2-proxy
113+
114+
# Check for security advisories.
115+
#
116+
# TODO(ver): This should open issues against the linkerd2 repo (and be run in a cron).
117+
deps-advisories:
118+
timeout-minutes: 10
119+
runs-on: ubuntu-latest
120+
# Prevent sudden announcement of a new advisory from failing Ci.
121+
continue-on-error: true
122+
steps:
123+
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
124+
- uses: EmbarkStudios/cargo-deny-action@0ca727bbae7b7b578b9a5f98186caac35aa2a00d
125+
with:
126+
command: check advisories
127+
128+
# Audit licenses, unreleased crates, and unexpected duplicate versions.
129+
deps-bans:
130+
timeout-minutes: 10
131+
runs-on: ubuntu-latest
132+
steps:
133+
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
134+
- uses: EmbarkStudios/cargo-deny-action@0ca727bbae7b7b578b9a5f98186caac35aa2a00d
135+
with:
136+
command: check bans licenses sources

.github/workflows/fuzzers.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ jobs:
3535
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
3636
- run: rustup toolchain add nightly
3737
- run: cargo install cargo-fuzz
38-
# Iterate through all fuzz crates to ensure each compiles independently.
39-
- run: cd linkerd/${{matrix.dir}}/fuzz && cargo +nightly fuzz build
38+
- working-directory: linkerd/${{matrix.dir}}/fuzz
39+
run: cargo +nightly fuzz build

.github/workflows/slow.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Each job typically runs for more than 5 minutes.
2+
name: slow
3+
4+
on:
5+
pull_request: {}
6+
7+
env:
8+
CARGO_INCREMENTAL: 0
9+
CARGO_NET_RETRY: 10
10+
RUST_BACKTRACE: short
11+
RUSTUP_MAX_RETRIES: 10
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
18+
# Iterate through all (non-fuzzer) sub-crates to ensure each compiles independently.
19+
check-each-crate:
20+
timeout-minutes: 20
21+
runs-on: ubuntu-latest
22+
container:
23+
image: docker://rust:1.56.0-buster
24+
steps:
25+
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
26+
- run: |
27+
for toml in $(find . -mindepth 2 \
28+
-not -path '*/fuzz/*' \
29+
-name Cargo.toml \
30+
| sort -r)
31+
do
32+
d="${toml%/*}"
33+
echo "# $d"
34+
(cd $d ; cargo check --all-targets)
35+
done
36+
37+
check-release:
38+
timeout-minutes: 20
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
42+
- env:
43+
CARGO_RELEASE: "1"
44+
run: make build
45+
46+
# Run only the app-level tests. These may take longer to compile (usually due to very large stack
47+
# types) and have the potential to be flakey as they depend on opening sockets and may have timing
48+
# sensitivity.
49+
test-integration:
50+
timeout-minutes: 20
51+
runs-on: ubuntu-latest
52+
container:
53+
image: docker://rust:1.56.0-buster
54+
steps:
55+
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
56+
- run: |
57+
cargo test --no-run \
58+
--package=linkerd-app \
59+
--package=linkerd-app-admin \
60+
--package=linkerd-app-core \
61+
--package=linkerd-app-gateway \
62+
--package=linkerd-app-inbound \
63+
--package=linkerd-app-integration \
64+
--package=linkerd-app-outbound \
65+
--package=linkerd-app-test
66+
- run: |
67+
cargo test \
68+
--package=linkerd-app \
69+
--package=linkerd-app-admin \
70+
--package=linkerd-app-core \
71+
--package=linkerd-app-gateway \
72+
--package=linkerd-app-inbound \
73+
--package=linkerd-app-integration \
74+
--package=linkerd-app-outbound \
75+
--package=linkerd-app-test
76+

.github/workflows/test.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)