Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 31 additions & 21 deletions ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,28 @@ function echo_cmd {
function print_usage {
echo "usage: $(basename $0) <cmd>"
echo
echo_cmd "ec2" "Launch an ec2 instance and './bootstrap.sh ci' on it.\n" \
"Exactly what Github Action's does, but doesn't touch GA."
echo_cmd "ec2-no-cache" "Same as ec2, but perform a full build and test (disable build and test cache)."
echo_cmd "ec2-test" "Same as ec2, but run all tests (disable test cache)."
echo_cmd "ec2-grind" "Same as ec2-test, but run over N instances."
echo_cmd "ec2-shell" "Launch an ec2 instance, clone the repo and drop into a shell."
echo_cmd "local" "Clone your last commit into a fresh container and bootstrap on local hardware."
echo_cmd "run" "Same as calling trigger, then rlog."
echo_cmd "shell" "Jump into a new shell on the current running build instance.\n" \
"Can provide a command to run instead of dropping into a shell, e.g. 'ci shell ls'."
echo_cmd "trigger" "Trigger the GA workflow on the PR associated with the current branch.\n" \
"Effectively the same as ec2, only the results will be tracked on your PR."
echo_cmd "rlog" "Will tail the logs of the latest GA run, or tail/dump the given GA run id."
echo_cmd "ilog" "Will tail the logs of the current running build instance."
echo_cmd "dlog" "Display the log of the given denoise log id."
echo_cmd "llog" "Tail the live log of a given log id."
echo_cmd "tlog" "Display the last log of the given test command as output by test_cmds."
echo_cmd "tilog" "Tail the live log of a given test command as output by test_cmds."
echo_cmd "shell-host" "Connect to host instance of the current running build."
echo_cmd "draft" "Mark current PR as draft (no automatic CI runs when pushing)."
echo_cmd "ready" "Mark current PR as ready (enable automatic CI runs when pushing)."
echo_cmd "ec2" "Launch an ec2 instance and './bootstrap.sh ci' on it.\n" \
"Exactly what Github Action's does, but doesn't touch GA."
echo_cmd "ec2-no-cache" "Same as ec2, but perform a full build and test (disable build and test cache)."
echo_cmd "ec2-test" "Same as ec2, but run all tests (disable test cache)."
echo_cmd "ec2-grind" "Same as ec2-test, but run over N instances."
echo_cmd "ec2-shell" "Launch an ec2 instance, clone the repo and drop into a shell."
echo_cmd "local" "Clone your last commit into a fresh container and bootstrap on local hardware."
echo_cmd "run" "Same as calling trigger, then rlog."
echo_cmd "shell" "Jump into a new shell on the current running build instance.\n" \
"Can provide a command to run instead of dropping into a shell, e.g. 'ci shell ls'."
echo_cmd "trigger" "Trigger the GA workflow on the PR associated with the current branch.\n" \
"Effectively the same as ec2, only the results will be tracked on your PR."
echo_cmd "rlog" "Will tail the logs of the latest GA run, or tail/dump the given GA run id."
echo_cmd "ilog" "Will tail the logs of the current running build instance."
echo_cmd "dlog" "Display the log of the given denoise log id."
echo_cmd "llog" "Tail the live log of a given log id."
echo_cmd "tlog" "Display the last log of the given test command as output by test_cmds."
echo_cmd "tilog" "Tail the live log of a given test command as output by test_cmds."
echo_cmd "shell-host" "Connect to host instance of the current running build."
echo_cmd "draft" "Mark current PR as draft (no automatic CI runs when pushing)."
echo_cmd "uncached-tests" "List tests that will run/did not finish in a CI pass for this commit."
echo_cmd "ready" "Mark current PR as ready (enable automatic CI runs when pushing)."
}

[ -n "$cmd" ] && shift
Expand Down Expand Up @@ -238,6 +239,15 @@ case "$cmd" in
"help"|"")
print_usage
;;
"uncached-tests")
if [ -z "$CI_REDIS_AVAILABLE" ]; then
echo "Not connected to CI redis."
exit 1
fi
./bootstrap.sh test_cmds | \
grep -Ev -f <(yq e '.tests[] | select(.skip == true) | .regex' $root/.test_patterns.yml) | \
USE_TEST_CACHE=1 filter_cached_test_cmd
;;
*)
echo "Unknown command: $cmd, see ./ci.sh help"
exit 1
Expand Down