From 81ffb1d5cc72f242daa9c410d5ebdbd7d45dbd96 Mon Sep 17 00:00:00 2001 From: gentlegiantJGC Date: Sat, 27 Sep 2025 20:53:47 +0100 Subject: [PATCH] Add 90 minute limit for tests (#5851) Occasionally a test will get stuck and run for 6 hours until Github cancels the workflow. This reduces the timeout to 90 minutes to not waste resources. Pybind11's tests seem to run in 30 minutes so this should be plenty of time. --- .github/workflows/ci.yml | 15 +++++++++++++++ .github/workflows/reusable-standard.yml | 1 + 2 files changed, 16 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9798f3aee..460cd82e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -179,6 +179,7 @@ jobs: name: "๐Ÿ ${{ matrix.python-version }} โ€ข ${{ matrix.runs-on }} โ€ข x64 inplace C++14" runs-on: ${{ matrix.runs-on }} + timeout-minutes: 90 steps: - uses: actions/checkout@v5 @@ -277,6 +278,7 @@ jobs: name: "๐Ÿ ${{ matrix.python-version }}${{ matrix.python-debug && '-dbg' || '' }} (deadsnakes)${{ matrix.valgrind && ' โ€ข Valgrind' || '' }} โ€ข x64" runs-on: ubuntu-latest + timeout-minutes: 90 steps: - uses: actions/checkout@v5 @@ -364,6 +366,7 @@ jobs: name: "๐Ÿ 3 โ€ข Clang ${{ matrix.clang }} โ€ข C++${{ matrix.std }} โ€ข x64${{ matrix.cxx_flags && ' โ€ข cxx_flags' || '' }}" container: "silkeh/clang:${{ matrix.clang }}${{ matrix.container_suffix }}" + timeout-minutes: 90 steps: - uses: actions/checkout@v5 @@ -401,6 +404,7 @@ jobs: runs-on: ubuntu-latest name: "๐Ÿ 3.10 โ€ข CUDA 12.2 โ€ข Ubuntu 22.04" container: nvidia/cuda:12.2.0-devel-ubuntu22.04 + timeout-minutes: 90 steps: - uses: actions/checkout@v5 @@ -468,6 +472,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-22.04 name: "๐Ÿ 3 โ€ข NVHPC 23.5 โ€ข C++17 โ€ข x64" + timeout-minutes: 90 env: # tzdata will try to ask for the timezone, so set the DEBIAN_FRONTEND @@ -532,6 +537,7 @@ jobs: name: "๐Ÿ 3 โ€ข GCC ${{ matrix.gcc }} โ€ข C++${{ matrix.std }} โ€ข x64${{ matrix.cxx_flags && ' โ€ข cxx_flags' || '' }}" container: "gcc:${{ matrix.gcc }}" + timeout-minutes: 90 steps: - uses: actions/checkout@v5 @@ -593,6 +599,7 @@ jobs: icc: if: github.event.pull_request.draft == false runs-on: ubuntu-22.04 + timeout-minutes: 90 name: "๐Ÿ 3 โ€ข ICC latest โ€ข x64" @@ -707,6 +714,7 @@ jobs: name: "๐Ÿ 3 โ€ข ${{ matrix.container }} โ€ข x64" container: "${{ matrix.container }}" + timeout-minutes: 90 steps: - name: Latest actions/checkout @@ -765,6 +773,7 @@ jobs: name: "๐Ÿ 3.9 โ€ข Debian โ€ข x86 โ€ข Install" runs-on: ubuntu-latest container: i386/debian:bullseye + timeout-minutes: 90 steps: - uses: actions/checkout@v1 # v1 is required to run inside docker @@ -809,6 +818,7 @@ jobs: if: github.event.pull_request.draft == false name: "Documentation build test" runs-on: ubuntu-latest + timeout-minutes: 90 steps: - uses: actions/checkout@v5 @@ -855,6 +865,7 @@ jobs: name: "๐Ÿ ${{ matrix.python }} โ€ข MSVC 2022 โ€ข x86 ${{ matrix.args }}" runs-on: windows-2022 + timeout-minutes: 90 steps: - uses: actions/checkout@v5 @@ -907,6 +918,7 @@ jobs: name: "๐Ÿ ${{ matrix.python }} โ€ข MSVC 2022 (Debug) โ€ข x86 ${{ matrix.args }}" runs-on: windows-2022 + timeout-minutes: 90 steps: - uses: actions/checkout@v5 @@ -955,6 +967,7 @@ jobs: name: "๐Ÿ ${{ matrix.python }} โ€ข MSVC 2022 C++20 โ€ข x64" runs-on: windows-2022 + timeout-minutes: 90 steps: - uses: actions/checkout@v5 @@ -1012,6 +1025,7 @@ jobs: if: github.event.pull_request.draft == false name: "๐Ÿ 3 โ€ข windows-latest โ€ข ${{ matrix.sys }}" runs-on: windows-latest + timeout-minutes: 90 defaults: run: shell: msys2 {0} @@ -1125,6 +1139,7 @@ jobs: python: ['3.10'] runs-on: "${{ matrix.os }}" + timeout-minutes: 90 name: "๐Ÿ ${{ matrix.python }} โ€ข ${{ matrix.os }} โ€ข clang-latest" diff --git a/.github/workflows/reusable-standard.yml b/.github/workflows/reusable-standard.yml index 36cad8d5a..8bd0d340e 100644 --- a/.github/workflows/reusable-standard.yml +++ b/.github/workflows/reusable-standard.yml @@ -28,6 +28,7 @@ jobs: standard: name: ๐Ÿงช runs-on: ${{ inputs.runs-on }} + timeout-minutes: 90 steps: - uses: actions/checkout@v5