From e035699d6bacadf6840b72697db9c2983ba01202 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 25 Nov 2022 18:56:17 -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/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e399cef..d16faca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,7 @@ jobs: fail-fast: false matrix: rust: [nightly, beta, stable, 1.36.0] + timeout-minutes: 45 steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@master @@ -38,6 +39,7 @@ jobs: miri: name: Miri runs-on: ubuntu-latest + timeout-minutes: 45 steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@miri @@ -49,6 +51,7 @@ jobs: name: Clippy runs-on: ubuntu-latest if: github.event_name != 'pull_request' + timeout-minutes: 45 steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@clippy @@ -57,6 +60,7 @@ jobs: fuzz: name: Fuzz runs-on: ubuntu-latest + timeout-minutes: 45 steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@nightly @@ -67,6 +71,7 @@ jobs: name: Outdated runs-on: ubuntu-latest if: github.event_name != 'pull_request' + timeout-minutes: 45 steps: - uses: actions/checkout@v3 - uses: dtolnay/install@cargo-outdated