Skip to content

Commit 2695a8e

Browse files
committed
Use the test runner to avoid hitting the CI hard limit mid-test suite
1 parent 7aa68a6 commit 2695a8e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/common.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ jobs:
8181
build-and-test:
8282
env:
8383
QCHECK_MSG_INTERVAL: '60'
84+
TIMEOUT: ${{ inputs.timeout }}
8485
DUNE_PROFILE: ${{ inputs.dune_profile }}
8586
OCAMLRUNPARAM: ${{ inputs.runparam }}
8687
ONLY_TEST: ${{ inputs.only_test }}
@@ -118,6 +119,10 @@ jobs:
118119
echo "LDFLAGS=-L/usr/lib/i386-linux-gnu/" >> $GITHUB_ENV
119120
fi
120121
122+
# Compute a deadline to respect time-out
123+
echo "DEADLINE=$(date -d "now + $((TIMEOUT - 3)) minutes" +%s)" >> "$GITHUB_ENV"
124+
cat "$GITHUB_ENV"
125+
121126
# Generate an OPAM config for a custom compiler
122127
if [ -n "$CUSTOM_COMPILER_VERSION" ]; then
123128
if [ -z "$CUSTOM_COMPILER_SRC" ]; then

0 commit comments

Comments
 (0)