From ea89d8d7e723a92601bbdb0cce89c28eaa30a5fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vlastimil=20Slint=C3=A1k?= Date: Sat, 4 Jul 2026 20:40:57 +0200 Subject: [PATCH] ci: cancel superseded PR runs and add job timeouts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pushing to a PR branch now cancels the previous in-progress run instead of queueing a duplicate ~40 minute build. Runs on branches (master included) are never cancelled. Also drop the unused RADIO_TOOL_VERSION env var. Signed-off-by: Vlastimil Slinták --- .github/workflows/main.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ffa42f91..713c7ea7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,12 +5,18 @@ on: pull_request: env: - RADIO_TOOL_VERSION: 0.2.2 - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} DEVCONTAINER_NAME: ghcr.io/openrtx/openrtx-devcontainer + +# Cancel superseded runs of the same PR, keep all runs on branches +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: unit-test: runs-on: ubuntu-22.04 + timeout-minutes: 30 steps: - name: Checkout uses: actions/checkout@v4 @@ -47,6 +53,7 @@ jobs: cat build/coverage/coverage.md >> $GITHUB_STEP_SUMMARY build-zephyr: runs-on: ubuntu-22.04 + timeout-minutes: 45 steps: - name: Checkout uses: actions/checkout@v4 @@ -80,6 +87,7 @@ jobs: app/build/openrtx_*.uf2 build: runs-on: ubuntu-24.04 + timeout-minutes: 120 steps: - name: Checkout uses: actions/checkout@v4