Skip to content

Commit

Permalink
ci: Fix fuzzer listing
Browse files Browse the repository at this point in the history
The fuzzer tests in CI were broken in CI by a change to the file-listing
action. This change fixes CI for fuzzer changes.

It does not actually fix the fuzzer suites.
  • Loading branch information
olix0r committed Nov 10, 2023
1 parent dd64109 commit 837a1a0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .github/fuzzers-list.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/usr/bin/env bash

set -euo pipefail

## Lists the fuzzers that should be run given a set of changed files.

# Find the nearest fuzzer crate, or nothing.
find_fuzz_dir() {
d=${1%/*}
if [ "$d" = . ]; then
if ! [[ "$d" =~ / ]]; then
return
elif [ -d "$d" ] && [[ "$d" = */fuzz ]]; then
echo "$d"
Expand Down
4 changes: 2 additions & 2 deletions .github/list-crates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
set -eu

if [ $# -eq 0 ]; then
echo "Usage: $0 <changed-files>"
exit 1
echo '[]'
exit 0
fi

# Find the nearest Cargo.toml (except the root).
Expand Down
12 changes: 4 additions & 8 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,10 @@ fuzzers:
echo "fuzzers must be run with nightly" >&2
exit 1
fi
for dir in $(find . -type d -name fuzz); do
echo "cd $dir && {{ _cargo }} fuzz build"
(
cd $dir
@{{ _cargo }} fuzz build \
{{ if profile == "release" { "--release" } else { "" } }}
)
for dir in $(find ./linkerd -type d -name fuzz); do
echo "cd $dir && cargo +nightly fuzz build"
( cd $dir ; cargo +nightly fuzz build \
{{ if profile == "release" { "--release" } else { "" } }} )
done
export DOCKER_BUILDX_CACHE_DIR := env_var_or_default('DOCKER_BUILDX_CACHE_DIR', '')
Expand Down

0 comments on commit 837a1a0

Please sign in to comment.