diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:41:41 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:41:41 +0000 |
commit | 10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87 (patch) | |
tree | bdffd5d80c26cf4a7a518281a204be1ace85b4c1 /src/tools/cargo/ci | |
parent | Releasing progress-linux version 1.70.0+dfsg1-9~progress7.99u1. (diff) | |
download | rustc-10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87.tar.xz rustc-10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87.zip |
Merging upstream version 1.70.0+dfsg2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/cargo/ci')
-rwxr-xr-x | src/tools/cargo/ci/clean-test-output.sh | 8 | ||||
-rwxr-xr-x | src/tools/cargo/ci/dump-environment.sh | 22 | ||||
-rwxr-xr-x | src/tools/cargo/ci/fetch-smoke-test.sh | 27 | ||||
-rwxr-xr-x | src/tools/cargo/ci/validate-man.sh | 26 |
4 files changed, 83 insertions, 0 deletions
diff --git a/src/tools/cargo/ci/clean-test-output.sh b/src/tools/cargo/ci/clean-test-output.sh new file mode 100755 index 000000000..f1f2ec61c --- /dev/null +++ b/src/tools/cargo/ci/clean-test-output.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# This script remove test and benchmark output and displays disk usage. + +set -euo pipefail + +df -h +rm -rf target/tmp +df -h diff --git a/src/tools/cargo/ci/dump-environment.sh b/src/tools/cargo/ci/dump-environment.sh new file mode 100755 index 000000000..b9b7ec56c --- /dev/null +++ b/src/tools/cargo/ci/dump-environment.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# This script dumps information about the build environment to stdout. + +set -euo pipefail +IFS=$'\n\t' + +echo "environment variables:" +printenv | sort +echo + +echo "disk usage:" +df -h +echo + +echo "CPU info:" +if [[ "${OSTYPE}" = "darwin"* ]]; then + system_profiler SPHardwareDataType || true + sysctl hw || true +else + cat /proc/cpuinfo || true + cat /proc/meminfo || true +fi diff --git a/src/tools/cargo/ci/fetch-smoke-test.sh b/src/tools/cargo/ci/fetch-smoke-test.sh new file mode 100755 index 000000000..17993d1fd --- /dev/null +++ b/src/tools/cargo/ci/fetch-smoke-test.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# This script builds with static curl, and verifies that fetching works. + +set -ex + +if [[ -z "$RUNNER_TEMP" ]] +then + echo "RUNNER_TEMP must be set" + exit 1 +fi + +if [ ! -f Cargo.toml ]; then + echo "Must be run from root of project." + exit 1 +fi + + +# Building openssl on Windows is a pain. +if [[ $(rustc -Vv | grep host:) != *windows* ]]; then + FEATURES='vendored-openssl,curl-sys/static-curl,curl-sys/force-system-lib-on-osx' + export LIBZ_SYS_STATIC=1 +fi + +cargo build --features "$FEATURES" +export CARGO_HOME=$RUNNER_TEMP/chome +target/debug/cargo fetch +rm -rf $CARGO_HOME diff --git a/src/tools/cargo/ci/validate-man.sh b/src/tools/cargo/ci/validate-man.sh new file mode 100755 index 000000000..92df49781 --- /dev/null +++ b/src/tools/cargo/ci/validate-man.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# This script validates that there aren't any changes to the man pages. + +set -e + +cd src/doc + +changes=$(git status --porcelain) +if [ -n "$changes" ] +then + echo "git directory must be clean before running this script." + exit 1 +fi + +./build-man.sh + +changes=$(git status --porcelain) +if [ -n "$changes" ] +then + echo "Detected changes in man pages:" + echo "$changes" + echo + echo "Please run './build-man.sh' in the src/doc directory to rebuild the" + echo "man pages, and commit the changes." + exit 1 +fi |