From e9c674d3198ed4d1ace493a9f97e3c181910d07d Mon Sep 17 00:00:00 2001 From: Spotandjake Date: Thu, 15 Oct 2026 11:42:48 -0400 Subject: [PATCH] feat(ci): Timeout long running actions This pr adds actions timeouts to our ci runs, the motivation for this pr was hangs we are seeing on windows, instead of running for 6 hours and cancelling manually when we notice it makes more sense to just set high upper limits. The idea here is that these are upper limits, we should never be timing out builds except for cases where something has hung. Opam: looking over the recent runs most builds seem to take between 20 and 3- minutes, we give 90 minutes to leave a bit of a buffer (primarly for windows). Esy: looking over the recent runs most builds seem to take between 20 and 90 minutes, we give 120 minutes to leave a bit of a buffer (primarly for windows). JS: Generating binaryen.js bindings is normally quick, and not a place that is problematic, so we leave an upper limit of an hour which gives plenty of time for run to run variance. --- .github/workflows/esy.yml | 2 ++ .github/workflows/js.yml | 2 ++ .github/workflows/opam.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/.github/workflows/esy.yml b/.github/workflows/esy.yml index 0251e32..89ce3d9 100644 --- a/.github/workflows/esy.yml +++ b/.github/workflows/esy.yml @@ -16,6 +16,8 @@ jobs: build: name: Build and test runs-on: ${{ matrix.os }} + # Most runs take between 20 and 90 minutes, but we leave some extra time, notably because windows is a bit inconsistent and can take longer to build. + timeout-minutes: 120 strategy: fail-fast: false diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml index 28f3a02..1770b13 100644 --- a/.github/workflows/js.yml +++ b/.github/workflows/js.yml @@ -13,6 +13,8 @@ jobs: build: name: "Build with emsdk" runs-on: ubuntu-latest + # Most runs take between 10 and 15 minutes, but we leave some extra buffer. + timeout-minutes: 60 steps: - name: Setup node.js diff --git a/.github/workflows/opam.yml b/.github/workflows/opam.yml index 2464296..444d709 100644 --- a/.github/workflows/opam.yml +++ b/.github/workflows/opam.yml @@ -13,6 +13,8 @@ jobs: build: name: Build and test runs-on: ${{ matrix.os }} + # Most runs take between 20 and 30 minutes, but we leave some extra time, notably because windows is a bit inconsistent and can take longer to build. + timeout-minutes: 90 strategy: fail-fast: false