Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make dcou faster and check lib targets as well #2127

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
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
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 "$@"
Comment on lines +5 to +6
Copy link
Member Author

@ryoqun ryoqun Aug 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks to the new --partition flag, i've changed to shard both modes check-bins (now called check-bins-and-lib) and check-all-targets more evenly.

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