Skip to content

armgit / raea

Public Imported from GitHub
0

Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.

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

shinyobjectz08a39041276d
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/[email protected]
@@ -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/[email protected]