From 2922a8ec2f37b9b7d7b9f4fe6011c1c2ac544fe5 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 25 Nov 2022 18:56:18 -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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index acef31c..5e67515 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,7 @@ jobs: fail-fast: false matrix: rust: [stable, beta, 1.56.0] + timeout-minutes: 45 steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@master @@ -30,6 +31,7 @@ jobs: nightly: name: Rust nightly runs-on: ubuntu-latest + timeout-minutes: 45 steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@nightly @@ -42,6 +44,7 @@ jobs: msrv: name: Rust 1.31.0 runs-on: ubuntu-latest + timeout-minutes: 45 steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@1.31.0 @@ -53,6 +56,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@nightly @@ -63,6 +67,7 @@ jobs: miri: name: Miri runs-on: ubuntu-latest + timeout-minutes: 45 steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@miri @@ -74,6 +79,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