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

chore(ci): quiet the warnings when verifying the generated header file #2507

Merged
merged 1 commit into from
Apr 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion capi/gen_header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,15 @@ cd "${WORK_DIR}" || exit 2
if ! output=$(RUSTFLAGS='--cfg hyper_unstable_ffi' cargo rustc -- -Z unstable-options --pretty=expanded 2>&1 > expanded.rs); then
# As of April 2021 the script above prints a lot of warnings/errors, and
# exits with a nonzero return code, but hyper.h still gets generated.
echo "$output"
#
# However, on Github Actions, this will result in automatic "annotations"
# being added to files not related to a PR, so if this is `--verify` mode,
# then don't show it.
#
# But yes show it when using it locally.
if [[ "--verify" != "$1" ]]; then
echo "$output"
fi
fi

# Replace the previous copy with the single expanded file
Expand Down