diff --git a/ci/env.sh b/ci/env.sh index d075b25999..df7ed1ce6a 100644 --- a/ci/env.sh +++ b/ci/env.sh @@ -74,10 +74,13 @@ else export CI_BUILD_ID= export CI_COMMIT= export CI_JOB_ID= - export CI_OS_NAME= export CI_PULL_REQUEST= export CI_REPO_SLUG= export CI_TAG= + # Don't override ci/run-local.sh + if [[ -z $CL_LOCAL_RUN ]]; then + export CI_OS_NAME= + fi fi cat <&2 + exit 1 + ;; +esac + +steps=() +steps+=(test-sanity) +steps+=(shellcheck) +steps+=(test-checks) +steps+=(test-coverage) +steps+=(test-stable) +steps+=(test-stable-perf) +steps+=(test-downstream-builds) +steps+=(test-bench) +steps+=(test-local-cluster) + +step_index=0 +if [[ -n "$1" ]]; then + start_step="$1" + while [[ $step_index -lt ${#steps[@]} ]]; do + step="${steps[$step_index]}" + if [[ "$step" = "$start_step" ]]; then + break + fi + step_index=$((step_index + 1)) + done + if [[ $step_index -eq ${#steps[@]} ]]; then + echo "unexpected start step: \"$start_step\"" 1>&2 + exit 1 + else + echo "** starting at step: \"$start_step\" **" + echo + fi +fi + +while [[ $step_index -lt ${#steps[@]} ]]; do + step="${steps[$step_index]}" + cmd="ci/${step}.sh" + $cmd + step_index=$((step_index + 1)) +done diff --git a/ci/test-downstream-builds.sh b/ci/test-downstream-builds.sh new file mode 100755 index 0000000000..0a45db80d2 --- /dev/null +++ b/ci/test-downstream-builds.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +cd "$(dirname "$0")/.." + +export CI_LOCAL_RUN=true + +set -ex + +scripts/build-downstream-projects.sh diff --git a/ci/test-stable.sh b/ci/test-stable.sh index 1d7cbc1bce..46032eb238 100755 --- a/ci/test-stable.sh +++ b/ci/test-stable.sh @@ -57,7 +57,7 @@ test-stable-perf) # Enable persistence mode to keep the CUDA kernel driver loaded, avoiding a # lengthy and unexpected delay the first time CUDA is involved when the driver # is not yet loaded. - sudo --non-interactive ./net/scripts/enable-nvidia-persistence-mode.sh + sudo --non-interactive ./net/scripts/enable-nvidia-persistence-mode.sh || true rm -rf target/perf-libs ./fetch-perf-libs.sh diff --git a/sdk/bpf/c/bpf.mk b/sdk/bpf/c/bpf.mk index 3f850d988e..83b722fdd1 100644 --- a/sdk/bpf/c/bpf.mk +++ b/sdk/bpf/c/bpf.mk @@ -191,6 +191,7 @@ endef define TEST_EXEC_RULE $1: $2 + LD_LIBRARY_PATH=$(TESTFRAMEWORK_RPATH) \ $2$(\n) endef