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.
This commit is contained in:
David Tolnay 2022-11-25 18:56:19 -08:00
parent f510eb0ba9
commit ac1dbf5d85
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -15,6 +15,7 @@ jobs:
test:
name: Tests
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
@ -43,6 +44,7 @@ jobs:
os: windows
env:
target: ${{matrix.target && format('--target={0}', matrix.target)}}
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
@ -71,6 +73,7 @@ jobs:
examples:
name: Examples
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
@ -84,6 +87,7 @@ jobs:
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: --cfg=doc_cfg -Dbroken_intra_doc_links
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
@ -93,6 +97,7 @@ jobs:
codegen:
name: Codegen
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
@ -102,6 +107,7 @@ jobs:
msrv:
name: Minimal versions
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
@ -111,6 +117,7 @@ jobs:
fuzz:
name: Fuzz
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
@ -120,6 +127,7 @@ jobs:
miri:
name: Miri
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@miri
@ -131,6 +139,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
@ -142,6 +151,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