From d685762382860b5cf34b571b42fdcceacd806558 Mon Sep 17 00:00:00 2001 From: shinyobjectz Date: Fri, 13 Nov 2026 10:25:44 -0800 Subject: [PATCH 1/3] release.yml: the compile cache's script comes from the workflow's own commit (a sparse checkout into .workflow), not the tag's tree: a dispatched dry run that fills the cache builds an older tag (v0.1.3-rc3), whose tree has no tools/release/compile-cache.sh, so its Linux and Windows jobs stopped at 'Use the compile cache' with exit 127 --- .github/workflows/release.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3468889b..30355ed7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -117,9 +117,19 @@ jobs: - name: Compile cache (sccache) if: env.RAEA_PROMOTED_FROM == '' && env.AWS_ACCESS_KEY_ID != '' uses: mozilla-actions/sccache-action@v0.0.9 + # the script from this workflow's own commit: a dispatched run (a dry run that fills the cache) builds an older + # tag, whose tree may not have it + - name: The compile cache's script + if: env.RAEA_PROMOTED_FROM == '' && env.AWS_ACCESS_KEY_ID != '' + uses: actions/checkout@v4 + with: + ref: ${{ github.sha }} + path: .workflow + sparse-checkout: tools/release/compile-cache.sh + sparse-checkout-cone-mode: false - name: Use the compile cache if: env.RAEA_PROMOTED_FROM == '' && env.AWS_ACCESS_KEY_ID != '' - run: bash tools/release/compile-cache.sh + run: bash .workflow/tools/release/compile-cache.sh - name: Build if: env.RAEA_PROMOTED_FROM == '' run: | @@ -245,9 +255,19 @@ jobs: - name: Compile cache (sccache, as build's) if: env.RAEA_PROMOTED_FROM == '' && env.AWS_ACCESS_KEY_ID != '' uses: mozilla-actions/sccache-action@v0.0.9 + # the script from this workflow's own commit: a dispatched run (a dry run that fills the cache) builds an older + # tag, whose tree may not have it + - name: The compile cache's script + if: env.RAEA_PROMOTED_FROM == '' && env.AWS_ACCESS_KEY_ID != '' + uses: actions/checkout@v4 + with: + ref: ${{ github.sha }} + path: .workflow + sparse-checkout: tools/release/compile-cache.sh + sparse-checkout-cone-mode: false - name: Use the compile cache if: env.RAEA_PROMOTED_FROM == '' && env.AWS_ACCESS_KEY_ID != '' - run: bash tools/release/compile-cache.sh + run: bash .workflow/tools/release/compile-cache.sh - name: Build if: env.RAEA_PROMOTED_FROM == '' run: | From cae6d2201c48cd7ad81dd2d61c8886890d4893b8 Mon Sep 17 00:00:00 2001 From: shinyobjectz Date: Fri, 13 Nov 2026 10:37:07 -0800 Subject: [PATCH 2/3] release.yml: the build jobs run on a faster runner when the repo names one (vars RELEASE_MAC_RUNNER, RELEASE_LINUX_RUNNER, RELEASE_WINDOWS_RUNNER; a third party's), else GitHub's own as before. GitHub's macOS runner is a 3-core M1 with 7 GB: a cold release build took 183 minutes there, Linux 105 and Windows 142 (0.1.2-rc5) --- .github/workflows/release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 30355ed7..e2bc42b6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -60,7 +60,9 @@ jobs: - os: ubuntu-24.04 lib: libraea_bundle.so extra: raea-perceive - runs-on: ${{ matrix.os }} + # a faster runner when the repo names one (a third party's, say): vars RELEASE_MAC_RUNNER, RELEASE_LINUX_RUNNER; else + # GitHub's own (a 3-core M1 with 7 GB, where a cold build took 3 hours) + runs-on: ${{ (matrix.os == 'macos-15' && vars.RELEASE_MAC_RUNNER) || (matrix.os == 'ubuntu-24.04' && vars.RELEASE_LINUX_RUNNER) || matrix.os }} # a cold thin-LTO build of raea-cli with the plugin catalog is the long part; GitHub's own limit is 6 hours timeout-minutes: 340 env: @@ -205,7 +207,7 @@ jobs: # accept no licence and download no Microsoft files). The C runtime is the DLL one (the VC++ redistributable): ort's # prebuilt ONNX Runtime is built against it, so crt-static doesn't link (LNK2019 on __imp_ symbols, 10-29). windows: - runs-on: windows-latest + runs-on: ${{ vars.RELEASE_WINDOWS_RUNNER || 'windows-latest' }} timeout-minutes: 350 env: # the compile cache, as build's From 08a39041276d65b521e4ec970342222a89e34732 Mon Sep 17 00:00:00 2001 From: shinyobjectz Date: Fri, 13 Nov 2026 10:43:48 -0800 Subject: [PATCH 3/3] release.yml: Namespace runners for the release build, by repo variable: RELEASE_*_RUNNER hold runs-on label lists (a machine and a cache volume), RELEASE_RUNNER_CACHE=1 keeps the build folder and cargo's downloads on the volume between runs (nscloud-cache-action, after the tag's checkout), so a candidate rebuilds what changed and links. The cleanup that deletes target/ is skipped there (a bind mount on Linux), and the Mac's Xcode pruning runs only on GitHub's runner. sccache on R2 stays for the workspace's own crates, which a fresh checkout's file times mark as changed --- .github/workflows/release.yml | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e2bc42b6..30319ed3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -60,9 +60,10 @@ jobs: - os: ubuntu-24.04 lib: libraea_bundle.so extra: raea-perceive - # a faster runner when the repo names one (a third party's, say): vars RELEASE_MAC_RUNNER, RELEASE_LINUX_RUNNER; else - # GitHub's own (a 3-core M1 with 7 GB, where a cold build took 3 hours) - runs-on: ${{ (matrix.os == 'macos-15' && vars.RELEASE_MAC_RUNNER) || (matrix.os == 'ubuntu-24.04' && vars.RELEASE_LINUX_RUNNER) || matrix.os }} + # a faster runner when the repo names one: vars RELEASE_MAC_RUNNER, RELEASE_LINUX_RUNNER, RELEASE_WINDOWS_RUNNER hold + # a JSON list of runs-on labels (Namespace's: a machine and a cache volume); else GitHub's + # own, a 3-core M1 with 7 GB on the Mac, where a cold build took 3 hours + runs-on: ${{ (matrix.os == 'macos-15' && vars.RELEASE_MAC_RUNNER && fromJSON(vars.RELEASE_MAC_RUNNER)) || (matrix.os == 'ubuntu-24.04' && vars.RELEASE_LINUX_RUNNER && fromJSON(vars.RELEASE_LINUX_RUNNER)) || matrix.os }} # a cold thin-LTO build of raea-cli with the plugin catalog is the long part; GitHub's own limit is 6 hours timeout-minutes: 340 env: @@ -102,7 +103,7 @@ jobs: # rc3's build left 576 MB of macos-15's 320 GB free, and rc4's dSYMs (#88) ran it out linking raea-page-host # (ld: write() failed, errno=28): the image's other Xcodes and the Android and .NET SDKs go first - name: Room for the build - if: runner.os == 'macOS' && env.RAEA_PROMOTED_FROM == '' + if: runner.os == 'macOS' && env.RAEA_PROMOTED_FROM == '' && vars.RELEASE_MAC_RUNNER == '' run: | df -h . | tail -1 keep=$(cd "$(xcode-select -p)/../.." && pwd -P) @@ -116,6 +117,17 @@ jobs: # A bucket is read by every tag. A cold build fills it; a candidate after a small change compiles only the crates # that changed and the ones above them. Linking (thin LTO) and build scripts' runs aren't cached. With no secrets # (a fork) the build runs as before, uncached. + # the build folder and cargo's downloads kept between runs on the runner's cache volume (Namespace: vars + # RELEASE_RUNNER_CACHE=1 when the runner labels attach one), so a candidate rebuilds only what changed and links; + # sccache below still serves the workspace's own crates, which a fresh checkout's file times mark as changed + - name: The build folder, kept on the runner's cache volume + if: env.RAEA_PROMOTED_FROM == '' && vars.RELEASE_RUNNER_CACHE == '1' + uses: namespacelabs/nscloud-cache-action@v1 + with: + path: | + ${{ github.workspace }}/target + ~/.cargo/registry + ~/.cargo/git - name: Compile cache (sccache) if: env.RAEA_PROMOTED_FROM == '' && env.AWS_ACCESS_KEY_ID != '' uses: mozilla-actions/sccache-action@v0.0.9 @@ -154,6 +166,8 @@ jobs: run: bash tools/release/promoted-bins.sh "$RAEA_PROMOTED_FROM" ship # the packing and its checks need only ship/, and macos-15's disk ran out packing rc1 with target/ kept - name: Free the build's disk + # not the cache volume's build folder, which the next candidate starts from (a bind mount on Linux) + if: vars.RELEASE_RUNNER_CACHE != '1' run: | df -h . | tail -1 rm -rf target @@ -207,7 +221,7 @@ jobs: # accept no licence and download no Microsoft files). The C runtime is the DLL one (the VC++ redistributable): ort's # prebuilt ONNX Runtime is built against it, so crt-static doesn't link (LNK2019 on __imp_ symbols, 10-29). windows: - runs-on: ${{ vars.RELEASE_WINDOWS_RUNNER || 'windows-latest' }} + runs-on: ${{ (vars.RELEASE_WINDOWS_RUNNER && fromJSON(vars.RELEASE_WINDOWS_RUNNER)) || 'windows-latest' }} timeout-minutes: 350 env: # the compile cache, as build's @@ -254,6 +268,14 @@ jobs: done < <(tr -d '\r' < tools/release/models.tsv) # the app targets' hosts a cargo call each: with raea-cli's crates in one call taffy's features unify and # rune-taffy doesn't build; raea-perceive (`raea song`'s map, #43) a call of its own too + - name: The build folder, kept on the runner's cache volume (as build's) + if: env.RAEA_PROMOTED_FROM == '' && vars.RELEASE_RUNNER_CACHE == '1' + uses: namespacelabs/nscloud-cache-action@v1 + with: + path: | + ${{ github.workspace }}/target + ~/.cargo/registry + ~/.cargo/git - name: Compile cache (sccache, as build's) if: env.RAEA_PROMOTED_FROM == '' && env.AWS_ACCESS_KEY_ID != '' uses: mozilla-actions/sccache-action@v0.0.9