Skip to content

Commit

Permalink
Make dcou faster and check lib targets as well (#2127)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun authored Aug 8, 2024
1 parent e8dfc9a commit 08f72d2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
5 changes: 3 additions & 2 deletions ci/buildkite-pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ wait_step() {

all_test_steps() {
command_step checks1 "ci/docker-run-default-image.sh ci/test-checks.sh" 20 check
command_step checks2 "ci/docker-run-default-image.sh ci/test-dev-context-only-utils.sh check-bins" 15 check
command_step checks3 "ci/docker-run-default-image.sh ci/test-dev-context-only-utils.sh check-all-targets" 15 check
command_step dcou-1-of-3 "ci/docker-run-default-image.sh ci/test-dev-context-only-utils.sh --partition 1/3" 15 check
command_step dcou-2-of-3 "ci/docker-run-default-image.sh ci/test-dev-context-only-utils.sh --partition 2/3" 15 check
command_step dcou-3-of-3 "ci/docker-run-default-image.sh ci/test-dev-context-only-utils.sh --partition 3/3" 15 check
command_step miri "ci/docker-run-default-image.sh ci/test-miri.sh" 5 check
command_step frozen-abi "ci/docker-run-default-image.sh ./test-abi.sh" 15 check
wait_step
Expand Down
3 changes: 2 additions & 1 deletion ci/test-dev-context-only-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

set -eo pipefail

scripts/check-dev-context-only-utils.sh "$@"
scripts/check-dev-context-only-utils.sh check-all-targets "$@"
scripts/check-dev-context-only-utils.sh check-bins-and-lib "$@"
10 changes: 6 additions & 4 deletions scripts/check-dev-context-only-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ printf -v allowed '"%s",' "${tainted_packages[@]}"
allowed="${allowed%,}"

mode=${1:-full}
# consume the mode, so that other arguments are forwarded to cargo-hack
shift
case "$mode" in
tree | check-bins | check-all-targets | full)
tree | check-bins-and-lib | check-all-targets | full)
;;
*)
echo "$0: unrecognized mode: $mode";
Expand Down Expand Up @@ -156,9 +158,9 @@ fi
# consistency with other CI steps and for the possibility of new similar lints.
export RUSTFLAGS="-D warnings -Z threads=8 $RUSTFLAGS"

if [[ $mode = "check-bins" || $mode = "full" ]]; then
_ cargo "+${rust_nightly}" hack check --bins
if [[ $mode = "check-bins-and-lib" || $mode = "full" ]]; then
_ cargo "+${rust_nightly}" hack "$@" check
fi
if [[ $mode = "check-all-targets" || $mode = "full" ]]; then
_ cargo "+${rust_nightly}" hack check --all-targets
_ cargo "+${rust_nightly}" hack "$@" check --all-targets
fi

0 comments on commit 08f72d2

Please sign in to comment.