diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:47:55 +0000 |
commit | 2aadc03ef15cb5ca5cc2af8a7c08e070742f0ac4 (patch) | |
tree | 033cc839730fda84ff08db877037977be94e5e3a /ci | |
parent | Initial commit. (diff) | |
download | cargo-2aadc03ef15cb5ca5cc2af8a7c08e070742f0ac4.tar.xz cargo-2aadc03ef15cb5ca5cc2af8a7c08e070742f0ac4.zip |
Adding upstream version 0.70.1+ds1.upstream/0.70.1+ds1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/dump-environment.sh | 22 | ||||
-rwxr-xr-x | ci/fetch-smoke-test.sh | 27 | ||||
-rwxr-xr-x | ci/validate-man.sh | 26 |
3 files changed, 75 insertions, 0 deletions
diff --git a/ci/dump-environment.sh b/ci/dump-environment.sh new file mode 100755 index 0000000..b9b7ec5 --- /dev/null +++ b/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/ci/fetch-smoke-test.sh b/ci/fetch-smoke-test.sh new file mode 100755 index 0000000..17993d1 --- /dev/null +++ b/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/ci/validate-man.sh b/ci/validate-man.sh new file mode 100755 index 0000000..92df497 --- /dev/null +++ b/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 |