From 1b99c184efed01ba1202475a3f20e7bf18ebbc76 Mon Sep 17 00:00:00 2001 From: FredApps <153173854+FredApps@users.noreply.github.com> Date: Tue, 10 Nov 2026 16:45:35 +0100 Subject: [PATCH] ci: one macOS and one Windows release build per branch at a time, with job time limits (#2809) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This changes release workflows (house rule 9). It only adds limits, but it needs a maintainer's look before merging. ## Problem `artcraft-macos-publish.yml` and `artcraft-windows-publish.yml` have no `concurrency` and no `timeout-minutes`. `artcraft-linux-publish.yml` already has both. - **Overlapping builds:** two pushes to `release` or `artcraft-release` in quick succession start two builds of the same platform side by side. Both create or update the same `artcraft-v` draft release through `tauri-action`. Nothing stops this today. It happens whenever a second push lands while a 10-36 minute build is still running. (The two runs on 2026-11-07 were 35 minutes apart and did not overlap.) - **Hung builds:** a build that hangs runs until GitHub's 6-hour default. The Windows run on 2026-06-12 did exactly that and was cancelled at 360 minutes. Successful builds take far less: | workflow | successful builds, last 15 runs (2026-04 to 2026-11) | |---|---| | macOS publish | 10-22 min | | Windows publish | 17-36 min | ## Change Two files, limits only. Triggers, steps, secrets, signing, release settings and action versions are unchanged. - **Concurrency:** `concurrency: { group: macos-release-${{ github.ref }}, cancel-in-progress: false }`, and likewise `windows-release-…`. This is the same pattern as `artcraft-linux-publish.yml` (`linux-release-${{ github.ref }}`). - A release build that is already running is **never cancelled**, since it may already have uploaded to the draft release. - One GitHub behaviour to be aware of: a concurrency group holds one running and one pending run. If a third push lands while one build runs and another waits, GitHub replaces the waiting run with the newest. So the next build is always of the latest commit on that branch, and an intermediate commit may not get its own build. For a release branch I think that is what we want. If every commit must get a build, this PR shouldn't be merged as it is; tell me and I'll change it. - The groups are per platform and per branch, so macOS, Windows and Linux still build in parallel with each other. - **Timeouts:** `timeout-minutes: 60` for macOS and `90` for Windows. That is about 2.5-3× the slowest successful build, and Windows matches the Linux build job's 90. A hang now stops after an hour or an hour and a half instead of six. Not changed: `dtolnay/rust-toolchain@stable` and `tauri-apps/tauri-action@v0` are still unpinned tags. Pinning them would change which action code builds a release, so it should be a separate decision. ## Verification - `actionlint` is clean on the three publish workflows. - These workflows only run on pushes to `release`, `artcraft-release`, `artcraft-macos` and `artcraft-windows`, so this PR's checks don't exercise them. The new settings take effect on the next release push. - I didn't trigger a release build. ## Summary by CodeRabbit * **Chores** * Release builds for macOS and Windows now finish in progress without being cancelled by newer runs. When multiple builds are queued for the same branch or ref, only the newest pending build is kept. * Publishing jobs now have maximum run times of 60 minutes for macOS and 90 minutes for Windows. Co-authored-by: FredApps --- .github/workflows/artcraft-macos-publish.yml | 9 +++++++++ .github/workflows/artcraft-windows-publish.yml | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/.github/workflows/artcraft-macos-publish.yml b/.github/workflows/artcraft-macos-publish.yml index 63484b6a75..59ca9a9532 100644 --- a/.github/workflows/artcraft-macos-publish.yml +++ b/.github/workflows/artcraft-macos-publish.yml @@ -10,6 +10,13 @@ on: # This workflow creates Universal macOS builds with signing certificate support. # On each push to the release branches it will create or update a GitHub release, build your app, and upload the artifacts to the release. +# One release build per branch at a time. A run in progress is never cancelled, because it may +# already have created or uploaded to the draft release. If more pushes arrive while one runs, +# GitHub keeps only the newest as pending, so the next build is of the latest commit. +concurrency: + group: macos-release-${{ github.ref }} + cancel-in-progress: false + jobs: publish-artcraft: permissions: @@ -28,6 +35,8 @@ jobs: # args: '' runs-on: ${{ matrix.platform }} + # Successful builds took 10-22 min (2026-04 to 2026-11). + timeout-minutes: 60 steps: - uses: actions/checkout@v7 diff --git a/.github/workflows/artcraft-windows-publish.yml b/.github/workflows/artcraft-windows-publish.yml index e814bb8216..cb07d151a7 100644 --- a/.github/workflows/artcraft-windows-publish.yml +++ b/.github/workflows/artcraft-windows-publish.yml @@ -10,6 +10,13 @@ on: # This workflow creates Windows builds. # On each push to the release branches it will create or update a GitHub release, build your app, and upload the artifacts to the release. +# One release build per branch at a time. A run in progress is never cancelled, because it may +# already have created or uploaded to the draft release. If more pushes arrive while one runs, +# GitHub keeps only the newest as pending, so the next build is of the latest commit. +concurrency: + group: windows-release-${{ github.ref }} + cancel-in-progress: false + jobs: publish-artcraft-windows: permissions: @@ -23,6 +30,8 @@ jobs: args: '' runs-on: ${{ matrix.platform }} + # Successful builds took 17-36 min (2026-04 to 2026-11); one hung run used the full 6-hour default. + timeout-minutes: 90 steps: - uses: actions/checkout@v7