[openssh-commits] [openssh] 03/03: Replace shell-level timeout with dedicated command.
git+noreply at mindrot.org
git+noreply at mindrot.org
Tue Jun 2 19:00:31 AEST 2026
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit 7e5590cf8ff732a946629b6f766c7a2c9b2ac425
Author: Darren Tucker <dtucker at dtucker.net>
AuthorDate: Tue Jun 2 18:49:02 2026 +1000
Replace shell-level timeout with dedicated command.
It turns out the systems we run this workflow on all have timeout(1),
---
.github/setup_ci.sh | 25 ++++---------------------
.github/workflows/c-cpp.yml | 4 +++-
2 files changed, 7 insertions(+), 22 deletions(-)
diff --git a/.github/setup_ci.sh b/.github/setup_ci.sh
index 22f0a6668..63c61f9a0 100755
--- a/.github/setup_ci.sh
+++ b/.github/setup_ci.sh
@@ -2,29 +2,14 @@
config="$1"
target="$2"
-retry="$3"
-
-timeout=3600
-
-fail () { trap '' 0; exit 1; }
-success () { trap '' 0; exit 0; }
-
-if [ "${retry}" != "retry" ]; then
- echo Set trap for single retry with timeout at $timeout seconds.
- trap "exec $0 $1 $2 retry" HUP
- (sleep $timeout; kill -HUP $$) &
- trap "kill $!; sleep 120; exec $0 $1 $2 retry" 0
-else
- echo "$0: retrying"
-fi
PACKAGES="tmux"
echo Running as:
id
-echo Environment saved to env.txt
-set >env.txt
+echo Saving environment to runner-env.txt
+set >runner-env.txt
. .github/configs ${config}
@@ -84,7 +69,7 @@ if [ ! -z "$SUDO" ]; then
fi
if ! "$SUDO" -u nobody -S test -x ~ </dev/null; then
echo "Still can't sudo to nobody."
- fail
+ exit 1
fi
fi
@@ -193,7 +178,7 @@ for TARGET in $TARGETS; do
zlib-*)
;;
*) echo "Invalid option '${TARGET}'"
- fail
+ exit 1
;;
esac
done
@@ -316,5 +301,3 @@ if [ ! -z "${EPHEMERAL_VM}" ]; then
;;
esac
fi
-
-success
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
index 64300b45b..1136f1e27 100644
--- a/.github/workflows/c-cpp.yml
+++ b/.github/workflows/c-cpp.yml
@@ -139,7 +139,9 @@ jobs:
CYGWIN: "winsymlinks:native"
- uses: actions/checkout at main
- name: setup CI system
- run: sh ./.github/setup_ci.sh ${{ matrix.config }} ${{ matrix.target }}
+ run: |
+ timeout 1200 sh .github/setup_ci.sh ${{ matrix.config }} ${{ matrix.target }} || \
+ sh .github/setup_ci.sh ${{ matrix.config }} ${{ matrix.target }}
env:
CYGWIN_SETUP: ${{ steps.cygwin_install.outputs.setup }}
- name: autoreconf
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list