diff options
| author | Josh Stone <jistone@redhat.com> | 2023-04-25 18:10:10 -0700 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2023-04-26 13:42:10 -0700 |
| commit | 16dfd8986268ea476e0701a825a587e0078268a9 (patch) | |
| tree | f16197d17c5b400c46f3d36be93c9b9f7d0cd631 /src/ci/docker/scripts | |
| parent | d7d67d83fffea8944e86f8e6ae9493f54df69d65 (diff) | |
| download | rust-16dfd8986268ea476e0701a825a587e0078268a9.tar.gz rust-16dfd8986268ea476e0701a825a587e0078268a9.zip | |
ci: refactor crosstool-ng to use mini-defconfig
Diffstat (limited to 'src/ci/docker/scripts')
| -rwxr-xr-x | src/ci/docker/scripts/crosstool-ng-build.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/ci/docker/scripts/crosstool-ng-build.sh b/src/ci/docker/scripts/crosstool-ng-build.sh new file mode 100755 index 00000000000..c813d10eb9d --- /dev/null +++ b/src/ci/docker/scripts/crosstool-ng-build.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +set -ex + +if [ $UID -eq 0 ]; then + exec su rustbuild -c "$0" +fi + +hide_output() { + set +x + on_err=" +echo ERROR: An error was encountered with the build. +cat /tmp/build.log +exit 1 +" + trap "$on_err" ERR + bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & + PING_LOOP_PID=$! + "$@" &> /tmp/build.log + rm /tmp/build.log + trap - ERR + kill $PING_LOOP_PID + set -x +} + +mkdir build +cd build +cp ../crosstool.defconfig .config +ct-ng olddefconfig +hide_output ct-ng build +cd .. +rm -rf build |
