Skip to content

Commit dae07f4

Browse files
authored
ci: Use a matrix of fuzzer targets (#1007)
The fuzzer build CI takes >2x as long as any other CI task. This change moves the fuzzer building CI task to use a matrix of targets so that they may be built in parallel. Furthermore, fuzzers are now excluded from the check task.
1 parent 27b6af3 commit dae07f4

File tree

1 file changed

+22
-16
lines changed

1 file changed

+22
-16
lines changed

.github/workflows/rust.yml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Rust PR
22

33
on:
4-
push:
5-
branches:
6-
- master
74
pull_request: {}
85

96
jobs:
@@ -50,26 +47,35 @@ jobs:
5047
image: docker://rust:1.52.1-buster
5148
steps:
5249
- uses: actions/checkout@v2
53-
# Iterate through all subcrates to ensure each compiles indpendently.
54-
- run: for d in $(for toml in $(find . -name Cargo.toml) ; do echo ${toml%/*} ; done | sort -r ) ; do echo "# $d" ; (cd $d ; cargo check --all-targets) ; done
50+
# Iterate through all (non-fuzzer) sub-crates to ensure each compiles independently.
51+
- run: for d in $(for toml in $(find . -mindepth 2 -name Cargo.toml -not -path '*/fuzz/*') ; do echo ${toml%/*} ; done | sort -r ) ; do echo "# $d" ; (cd $d ; cargo check --all-targets) ; done
5552

56-
build-fuzz:
53+
test:
54+
timeout-minutes: 15
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v2
58+
- run: make test
59+
60+
fuzzers:
5761
timeout-minutes: 40
5862
runs-on: ubuntu-latest
5963
container:
6064
image: docker://rust:1.52.1-buster
65+
strategy:
66+
matrix:
67+
dir:
68+
- addr
69+
- app/inbound
70+
- dns
71+
- proxy/http
72+
- tls
73+
- transport-header
6174
steps:
6275
- uses: actions/checkout@v2
6376
- run: rustup toolchain add nightly
6477
- run: cargo install cargo-fuzz
65-
# Iterate through all fuzz crates to ensure each compiles indpendently.
66-
- run: for d in $(find . -name fuzz | sort -r) ; do echo "# $d" ; (cd $d ; cargo +nightly fuzz build) ; done
67-
# Error if the repo isn't clean (i.e. because lockfiles were modified).
78+
# Iterate through all fuzz crates to ensure each compiles independently.
79+
- run: cd linkerd/${{matrix.dir}}/fuzz && cargo +nightly fuzz build
80+
# Error if the repo isn't clean (i.e. because lock files were modified).
6881
- run: git status && git diff-index --quiet HEAD
69-
70-
test:
71-
timeout-minutes: 15
72-
runs-on: ubuntu-latest
73-
steps:
74-
- uses: actions/checkout@v2
75-
- run: make test

0 commit comments

Comments
 (0)