From 59115418f60f52caa6c0e555a2c90efa1359d54f Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 24 Nov 2022 21:35:28 -0800 Subject: [PATCH] Time out workflows after 45 minutes GitHub's default timeout is 6 hours. Recently some of my GitHub Actions jobs have started randomly stalling for that long, which is inconvenient because it ties up a chunk of my runner quota. It apepars to be very rare for a job to recover after stalling. It's better to time out quicker and retry on a different runner. --- .github/workflows/build.yml | 1 + .github/workflows/ci.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 731c5b2..7d57485 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,6 +25,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: write + timeout-minutes: 45 steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b3d894..524faaf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,7 @@ jobs: install: name: Rust ${{matrix.rust}} runs-on: ubuntu-latest + timeout-minutes: 45 steps: - uses: actions/checkout@v3 - uses: ./