mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
chore(identity): merge main and renumber migrations
Signed-off-by: Cea Stapleton Cordasco <261786559+cea-block@users.noreply.github.com>
This commit is contained in:
@@ -1044,7 +1044,7 @@ jobs:
|
||||
git log -1 --format=%s | grep -qx smoke
|
||||
echo "Host bash resolved and functional; git commit round-trip passed"
|
||||
- name: Check (Tauri crate)
|
||||
run: cargo check --manifest-path desktop/src-tauri/Cargo.toml --target $env:TARGET
|
||||
run: cargo check --manifest-path desktop/src-tauri/Cargo.toml --workspace --all-targets --target $env:TARGET
|
||||
env:
|
||||
CMAKE_POLICY_VERSION_MINIMUM: "3.5"
|
||||
- name: Test (Tauri crate)
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
name: Desktop release cache tag-scope proof
|
||||
|
||||
# Dispatch from a cache-proof-* tag at the same trusted-main SHA warmed by all
|
||||
# four canaries. Every job restores only and requires an exact cache hit.
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
macos:
|
||||
name: Prove macOS ${{ matrix.target }} cache visibility
|
||||
if: github.repository == 'block/buzz'
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 15
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- target: aarch64-apple-darwin
|
||||
features: mesh-llm
|
||||
- target: x86_64-apple-darwin
|
||||
features: default
|
||||
steps:
|
||||
- name: Require cache proof tag
|
||||
run: '[[ "$GITHUB_REF" == refs/tags/cache-proof-* ]] || { echo "::error::Expected cache-proof-* tag; got $GITHUB_REF"; exit 1; }'
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: cashapp/activate-hermit@cea9af7913204a965fd488637a8d1811bba2e616 # v1
|
||||
- name: Patch proof dependency graph
|
||||
run: |
|
||||
cd desktop && node scripts/set-version-from-tag.mjs "0.0.0-cache-proof"
|
||||
cd src-tauri && cargo update --workspace
|
||||
- name: Resolve native toolchain identity
|
||||
id: native_toolchain
|
||||
run: echo "id=$(scripts/desktop-native-toolchain-id.sh macos)" >> "$GITHUB_OUTPUT"
|
||||
- name: Compute exact release cache key
|
||||
id: rust_cache_key
|
||||
env:
|
||||
CACHE_TARGET: ${{ matrix.target }}
|
||||
CACHE_FEATURES: ${{ matrix.features }}
|
||||
NATIVE_TOOLCHAIN_ID: ${{ steps.native_toolchain.outputs.id }}
|
||||
run: |
|
||||
KEY=$(scripts/desktop-release-cache-key.py --platform "$RUNNER_OS" --target "$CACHE_TARGET" --features "$CACHE_FEATURES" --native-inputs "$NATIVE_TOOLCHAIN_ID")
|
||||
echo "key=$KEY" >> "$GITHUB_OUTPUT"
|
||||
- name: Restore exact default-branch cache from tag
|
||||
id: rust_cache
|
||||
uses: actions/cache/restore@caa296126883cff596d87d8935842f9db880ef25 # v5
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
desktop/src-tauri/target
|
||||
!desktop/src-tauri/target/**/release/bundle
|
||||
key: ${{ steps.rust_cache_key.outputs.key }}
|
||||
- name: Require exact cache hit
|
||||
env:
|
||||
CACHE_HIT: ${{ steps.rust_cache.outputs.cache-hit }}
|
||||
CACHE_KEY: ${{ steps.rust_cache.outputs.cache-primary-key }}
|
||||
EXPECTED_KEY: ${{ steps.rust_cache_key.outputs.key }}
|
||||
run: '[[ "$CACHE_HIT" == true && "$CACHE_KEY" == "$EXPECTED_KEY" ]] || { echo "::error::Exact tag cache miss (hit=$CACHE_HIT restored=$CACHE_KEY expected=$EXPECTED_KEY)"; exit 1; }'
|
||||
|
||||
linux:
|
||||
name: Prove Linux cache visibility
|
||||
if: github.repository == 'block/buzz'
|
||||
runs-on: ubuntu-latest
|
||||
container: ubuntu:24.04@sha256:4fbb8e6a8395de5a7550b33509421a2bafbc0aab6c06ba2cef9ebffbc7092d90
|
||||
timeout-minutes: 15
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
steps:
|
||||
- name: Require cache proof tag and install release native tools
|
||||
run: |
|
||||
[[ "$GITHUB_REF" == refs/tags/cache-proof-* ]] || { echo "::error::Expected cache-proof-* tag; got $GITHUB_REF"; exit 1; }
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends build-essential ca-certificates curl git libasound2-dev libayatana-appindicator3-dev libgtk-3-dev librsvg2-dev libssl-dev libwebkit2gtk-4.1-dev libxdo-dev patchelf pkg-config
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
- uses: cashapp/activate-hermit@cea9af7913204a965fd488637a8d1811bba2e616 # v1
|
||||
- name: Patch proof dependency graph
|
||||
run: |
|
||||
cd desktop && node scripts/set-version-from-tag.mjs "0.0.0-cache-proof"
|
||||
cd src-tauri && cargo update --workspace
|
||||
- name: Resolve native toolchain identity
|
||||
id: native_toolchain
|
||||
run: echo "id=$(scripts/desktop-native-toolchain-id.sh linux)" >> "$GITHUB_OUTPUT"
|
||||
- name: Compute exact release cache key
|
||||
id: rust_cache_key
|
||||
env:
|
||||
NATIVE_TOOLCHAIN_ID: ${{ steps.native_toolchain.outputs.id }}
|
||||
run: |
|
||||
KEY=$(scripts/desktop-release-cache-key.py --platform "$RUNNER_OS" --target x86_64-unknown-linux-gnu --features mesh-llm --native-inputs "$NATIVE_TOOLCHAIN_ID")
|
||||
echo "key=$KEY" >> "$GITHUB_OUTPUT"
|
||||
- name: Restore exact default-branch cache from tag
|
||||
id: rust_cache
|
||||
uses: actions/cache/restore@caa296126883cff596d87d8935842f9db880ef25 # v5
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
desktop/src-tauri/target
|
||||
!desktop/src-tauri/target/**/release/bundle
|
||||
key: ${{ steps.rust_cache_key.outputs.key }}
|
||||
- name: Require exact cache hit
|
||||
env:
|
||||
CACHE_HIT: ${{ steps.rust_cache.outputs.cache-hit }}
|
||||
CACHE_KEY: ${{ steps.rust_cache.outputs.cache-primary-key }}
|
||||
EXPECTED_KEY: ${{ steps.rust_cache_key.outputs.key }}
|
||||
run: '[[ "$CACHE_HIT" == true && "$CACHE_KEY" == "$EXPECTED_KEY" ]] || { echo "::error::Exact tag cache miss (hit=$CACHE_HIT restored=$CACHE_KEY expected=$EXPECTED_KEY)"; exit 1; }'
|
||||
|
||||
windows:
|
||||
name: Prove Windows cache visibility
|
||||
if: github.repository == 'block/buzz'
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- name: Require cache proof tag
|
||||
shell: bash
|
||||
run: '[[ "$GITHUB_REF" == refs/tags/cache-proof-* ]] || { echo "::error::Expected cache-proof-* tag; got $GITHUB_REF"; exit 1; }'
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Patch proof dependency graph
|
||||
shell: bash
|
||||
run: |
|
||||
cd desktop && node scripts/set-version-from-tag.mjs "0.0.0-cache-proof"
|
||||
cd src-tauri && cargo update --workspace
|
||||
- name: Resolve native toolchain identity
|
||||
id: native_toolchain
|
||||
shell: bash
|
||||
run: echo "id=$(scripts/desktop-native-toolchain-id.sh windows)" >> "$GITHUB_OUTPUT"
|
||||
- name: Compute exact release cache key
|
||||
id: rust_cache_key
|
||||
shell: bash
|
||||
env:
|
||||
NATIVE_TOOLCHAIN_ID: ${{ steps.native_toolchain.outputs.id }}
|
||||
run: |
|
||||
KEY=$(scripts/desktop-release-cache-key.py --platform "$RUNNER_OS" --target x86_64-pc-windows-msvc --features default --native-inputs "$NATIVE_TOOLCHAIN_ID")
|
||||
echo "key=$KEY" >> "$GITHUB_OUTPUT"
|
||||
- name: Restore exact default-branch cache from tag
|
||||
id: rust_cache
|
||||
uses: actions/cache/restore@caa296126883cff596d87d8935842f9db880ef25 # v5
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
desktop/src-tauri/target
|
||||
!desktop/src-tauri/target/**/release/bundle
|
||||
key: ${{ steps.rust_cache_key.outputs.key }}
|
||||
- name: Require exact cache hit
|
||||
shell: bash
|
||||
env:
|
||||
CACHE_HIT: ${{ steps.rust_cache.outputs.cache-hit }}
|
||||
CACHE_KEY: ${{ steps.rust_cache.outputs.cache-primary-key }}
|
||||
EXPECTED_KEY: ${{ steps.rust_cache_key.outputs.key }}
|
||||
run: '[[ "$CACHE_HIT" == true && "$CACHE_KEY" == "$EXPECTED_KEY" ]] || { echo "::error::Exact tag cache miss (hit=$CACHE_HIT restored=$CACHE_KEY expected=$EXPECTED_KEY)"; exit 1; }'
|
||||
@@ -7,8 +7,8 @@ name: Linux Canary
|
||||
# Design notes vs. signed-macos-canary.yml:
|
||||
# - fix-appimage.sh is run without signing env vars; the script detects
|
||||
# their absence and skips re-signing, repacking only (documented inline).
|
||||
# - mold linker added (rui314/setup-mold) to reduce link time, matching
|
||||
# the Linux Rust CI jobs in ci.yml.
|
||||
# - Build tools match release.yml; cache keys derive the concrete linker and
|
||||
# native library identity rather than assuming the moving runner image.
|
||||
# - pnpm store restore/save pattern mirrors ci.yml:149-196.
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -83,18 +83,6 @@ jobs:
|
||||
|
||||
- uses: cashapp/activate-hermit@cea9af7913204a965fd488637a8d1811bba2e616 # v1
|
||||
|
||||
- uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1
|
||||
|
||||
# Rust cache covering both the workspace sidecar build and the Tauri
|
||||
# crate build. shared-key scoped to linux-canary-release so canary runs
|
||||
# warm each other without colliding with CI's debug-profile keys.
|
||||
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
|
||||
with:
|
||||
workspaces: |
|
||||
.
|
||||
desktop/src-tauri
|
||||
shared-key: linux-canary-release
|
||||
|
||||
- name: Install appimagetool
|
||||
run: |
|
||||
case "$(uname -m)" in
|
||||
@@ -154,6 +142,38 @@ jobs:
|
||||
cd desktop && node scripts/set-version-from-tag.mjs "$VERSION"
|
||||
cd src-tauri && cargo update --workspace
|
||||
|
||||
- name: Resolve native toolchain identity
|
||||
id: native_toolchain
|
||||
run: echo "id=$(scripts/desktop-native-toolchain-id.sh linux)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
# Compute this after cargo update so the key describes the graph that is
|
||||
# actually compiled. The helper normalizes only Buzz Desktop's release
|
||||
# version, allowing a canary to warm an otherwise identical tag build.
|
||||
- name: Compute exact release cache key
|
||||
id: rust_cache_key
|
||||
env:
|
||||
NATIVE_TOOLCHAIN_ID: ${{ steps.native_toolchain.outputs.id }}
|
||||
run: |
|
||||
KEY=$(scripts/desktop-release-cache-key.py \
|
||||
--platform "$RUNNER_OS" \
|
||||
--target x86_64-unknown-linux-gnu \
|
||||
--features mesh-llm \
|
||||
--native-inputs "$NATIVE_TOOLCHAIN_ID")
|
||||
echo "key=$KEY" >> "$GITHUB_OUTPUT"
|
||||
echo "Release cache key: $KEY"
|
||||
|
||||
- name: Restore exact release Cargo cache
|
||||
id: rust_cache
|
||||
uses: actions/cache/restore@caa296126883cff596d87d8935842f9db880ef25 # v5
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
desktop/src-tauri/target
|
||||
!desktop/src-tauri/target/**/release/bundle
|
||||
key: ${{ steps.rust_cache_key.outputs.key }}
|
||||
|
||||
- name: Generate non-updating bundle config
|
||||
run: |
|
||||
cat > desktop/src-tauri/tauri.canary.conf.json <<'JSON'
|
||||
@@ -170,7 +190,7 @@ jobs:
|
||||
./scripts/bundle-sidecars.sh
|
||||
|
||||
- name: Build Linux Tauri app
|
||||
run: cd desktop && pnpm tauri build --ci --bundles deb,appimage --config src-tauri/tauri.canary.conf.json
|
||||
run: cd desktop && pnpm tauri build --ci --bundles deb,appimage --features mesh-llm --config src-tauri/tauri.canary.conf.json
|
||||
env:
|
||||
CMAKE_POLICY_VERSION_MINIMUM: "3.5"
|
||||
|
||||
@@ -190,6 +210,24 @@ jobs:
|
||||
fi
|
||||
bash desktop/scripts/fix-appimage.sh "${APPIMAGES[0]}"
|
||||
|
||||
- name: Measure release Cargo cache inputs
|
||||
if: always()
|
||||
run: du -sh ~/.cargo/registry ~/.cargo/git target desktop/src-tauri/target 2>/dev/null || true
|
||||
|
||||
# Only this trusted, main-bound canary writes the cache. Excluding bundle
|
||||
# output prevents installers from entering it.
|
||||
- name: Save exact release Cargo cache
|
||||
if: steps.rust_cache.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@caa296126883cff596d87d8935842f9db880ef25 # v5
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
desktop/src-tauri/target
|
||||
!desktop/src-tauri/target/**/release/bundle
|
||||
key: ${{ steps.rust_cache_key.outputs.key }}
|
||||
|
||||
- name: Save pnpm store cache
|
||||
uses: actions/cache/save@caa296126883cff596d87d8935842f9db880ef25 # v5
|
||||
with:
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
name: macOS Intel Canary
|
||||
|
||||
# Produces an unsigned Intel DMG from trusted main. Its release-equivalent
|
||||
# Cargo state warms the distinct x86_64 release target without signing or
|
||||
# publishing anything.
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build macOS Intel canary
|
||||
if: github.repository == 'block/buzz'
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 60
|
||||
env:
|
||||
TARGET: x86_64-apple-darwin
|
||||
steps:
|
||||
- name: Require main
|
||||
env:
|
||||
SOURCE_REF: ${{ github.ref }}
|
||||
run: |
|
||||
if [[ "$SOURCE_REF" != "refs/heads/main" ]]; then
|
||||
echo "::error::Canary builds must run from main; got $SOURCE_REF"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: cashapp/activate-hermit@cea9af7913204a965fd488637a8d1811bba2e616 # v1
|
||||
|
||||
- name: Add Rust target
|
||||
run: rustup target add "$TARGET"
|
||||
|
||||
- name: Install desktop dependencies
|
||||
run: just desktop-install-ci
|
||||
|
||||
- name: Derive and patch canary version
|
||||
run: |
|
||||
BASE_VERSION=$(node -p "require('./desktop/package.json').version")
|
||||
VERSION="${BASE_VERSION%%-*}-intel-test.${GITHUB_RUN_NUMBER}"
|
||||
cd desktop && node scripts/set-version-from-tag.mjs "$VERSION"
|
||||
cd src-tauri && cargo update --workspace
|
||||
|
||||
- name: Resolve native toolchain identity
|
||||
id: native_toolchain
|
||||
run: echo "id=$(scripts/desktop-native-toolchain-id.sh macos)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Compute exact release cache key
|
||||
id: rust_cache_key
|
||||
env:
|
||||
NATIVE_TOOLCHAIN_ID: ${{ steps.native_toolchain.outputs.id }}
|
||||
run: |
|
||||
KEY=$(scripts/desktop-release-cache-key.py \
|
||||
--platform "$RUNNER_OS" \
|
||||
--target "$TARGET" \
|
||||
--features default \
|
||||
--native-inputs "$NATIVE_TOOLCHAIN_ID")
|
||||
echo "key=$KEY" >> "$GITHUB_OUTPUT"
|
||||
echo "Release cache key: $KEY"
|
||||
|
||||
- name: Restore exact release Cargo cache
|
||||
id: rust_cache
|
||||
uses: actions/cache/restore@caa296126883cff596d87d8935842f9db880ef25 # v5
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
desktop/src-tauri/target
|
||||
!desktop/src-tauri/target/**/release/bundle
|
||||
key: ${{ steps.rust_cache_key.outputs.key }}
|
||||
|
||||
- name: Generate non-updating bundle config
|
||||
run: |
|
||||
cat > desktop/src-tauri/tauri.canary.conf.json <<'JSON'
|
||||
{"bundle":{"createUpdaterArtifacts":false,"macOS":{"minimumSystemVersion":"10.15"}}}
|
||||
JSON
|
||||
|
||||
- name: Build Intel sidecars
|
||||
run: |
|
||||
cargo build --release --target "$TARGET" -p buzz-acp -p buzz-agent -p buzz-backend-kubernetes -p buzz-dev-mcp -p git-credential-nostr -p buzz-cli
|
||||
./scripts/bundle-sidecars.sh "$TARGET"
|
||||
|
||||
- name: Build unsigned Intel DMG
|
||||
run: cd desktop && pnpm tauri build --verbose --no-sign --target "$TARGET" --bundles dmg --config src-tauri/tauri.canary.conf.json
|
||||
env:
|
||||
CMAKE_POLICY_VERSION_MINIMUM: "3.5"
|
||||
MACOSX_DEPLOYMENT_TARGET: "10.15"
|
||||
CMAKE_OSX_DEPLOYMENT_TARGET: "10.15"
|
||||
TAURI_BUNDLER_DMG_IGNORE_CI: "true"
|
||||
|
||||
- name: Locate fresh Intel DMG
|
||||
id: artifact
|
||||
run: |
|
||||
DMG=$(find "desktop/src-tauri/target/${TARGET}/release/bundle/dmg" -name '*.dmg' -type f | head -1)
|
||||
[[ -n "$DMG" ]] || { echo "::error::No Intel DMG found"; exit 1; }
|
||||
echo "dmg=$DMG" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Upload Intel canary
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
||||
with:
|
||||
name: buzz-macos-intel-canary-${{ github.sha }}
|
||||
path: ${{ steps.artifact.outputs.dmg }}
|
||||
if-no-files-found: error
|
||||
retention-days: 7
|
||||
|
||||
- name: Measure release Cargo cache inputs
|
||||
if: always()
|
||||
run: du -sh ~/.cargo/registry ~/.cargo/git target desktop/src-tauri/target 2>/dev/null || true
|
||||
|
||||
- name: Save exact release Cargo cache
|
||||
if: steps.rust_cache.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@caa296126883cff596d87d8935842f9db880ef25 # v5
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
desktop/src-tauri/target
|
||||
!desktop/src-tauri/target/**/release/bundle
|
||||
key: ${{ steps.rust_cache_key.outputs.key }}
|
||||
@@ -573,7 +573,7 @@ jobs:
|
||||
BUZZ_UPDATER_ENDPOINT: https://github.com/block/buzz/releases/download/buzz-desktop-latest/latest.json
|
||||
|
||||
- name: Build Linux Tauri app
|
||||
run: cd desktop && pnpm tauri build --verbose --ci --bundles deb,appimage --config src-tauri/tauri.release.conf.json
|
||||
run: cd desktop && pnpm tauri build --verbose --ci --bundles deb,appimage --features mesh-llm --config src-tauri/tauri.release.conf.json
|
||||
env:
|
||||
BUZZ_UPDATER_PUBLIC_KEY: ${{ secrets.BUZZ_UPDATER_PUBLIC_KEY || secrets.SPROUT_UPDATER_PUBLIC_KEY }}
|
||||
BUZZ_UPDATER_ENDPOINT: https://github.com/block/buzz/releases/download/buzz-desktop-latest/latest.json
|
||||
|
||||
@@ -34,16 +34,6 @@ jobs:
|
||||
|
||||
- uses: cashapp/activate-hermit@cea9af7913204a965fd488637a8d1811bba2e616 # v1
|
||||
|
||||
# Rust cache covering both the workspace sidecar build and the Tauri
|
||||
# crate build. shared-key scoped to macos-canary-release so canary runs
|
||||
# warm each other without colliding with CI's debug-profile keys.
|
||||
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
|
||||
with:
|
||||
workspaces: |
|
||||
.
|
||||
desktop/src-tauri
|
||||
shared-key: macos-canary-release
|
||||
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
run: echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
|
||||
@@ -78,6 +68,38 @@ jobs:
|
||||
cd desktop && node scripts/set-version-from-tag.mjs "$VERSION"
|
||||
cd src-tauri && cargo update --workspace
|
||||
|
||||
- name: Resolve native toolchain identity
|
||||
id: native_toolchain
|
||||
run: echo "id=$(scripts/desktop-native-toolchain-id.sh macos)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
# Compute this after cargo update so the key describes the graph that is
|
||||
# actually compiled. The helper normalizes only Buzz Desktop's release
|
||||
# version, allowing a canary to warm an otherwise identical tag build.
|
||||
- name: Compute exact release cache key
|
||||
id: rust_cache_key
|
||||
env:
|
||||
NATIVE_TOOLCHAIN_ID: ${{ steps.native_toolchain.outputs.id }}
|
||||
run: |
|
||||
KEY=$(scripts/desktop-release-cache-key.py \
|
||||
--platform "$RUNNER_OS" \
|
||||
--target aarch64-apple-darwin \
|
||||
--features mesh-llm \
|
||||
--native-inputs "$NATIVE_TOOLCHAIN_ID")
|
||||
echo "key=$KEY" >> "$GITHUB_OUTPUT"
|
||||
echo "Release cache key: $KEY"
|
||||
|
||||
- name: Restore exact release Cargo cache
|
||||
id: rust_cache
|
||||
uses: actions/cache/restore@caa296126883cff596d87d8935842f9db880ef25 # v5
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
desktop/src-tauri/target
|
||||
!desktop/src-tauri/target/**/release/bundle
|
||||
key: ${{ steps.rust_cache_key.outputs.key }}
|
||||
|
||||
- name: Generate non-updating bundle config
|
||||
run: |
|
||||
cat > desktop/src-tauri/tauri.canary.conf.json <<'JSON'
|
||||
@@ -210,6 +232,24 @@ jobs:
|
||||
if-no-files-found: error
|
||||
retention-days: 7
|
||||
|
||||
- name: Measure release Cargo cache inputs
|
||||
if: always()
|
||||
run: du -sh ~/.cargo/registry ~/.cargo/git target desktop/src-tauri/target 2>/dev/null || true
|
||||
|
||||
# Only this trusted, main-bound canary writes the cache. Excluding bundle
|
||||
# output prevents installers or signed artifacts from entering it.
|
||||
- name: Save exact release Cargo cache
|
||||
if: steps.rust_cache.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@caa296126883cff596d87d8935842f9db880ef25 # v5
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
desktop/src-tauri/target
|
||||
!desktop/src-tauri/target/**/release/bundle
|
||||
key: ${{ steps.rust_cache_key.outputs.key }}
|
||||
|
||||
- name: Save pnpm store cache
|
||||
uses: actions/cache/save@caa296126883cff596d87d8935842f9db880ef25 # v5
|
||||
with:
|
||||
|
||||
@@ -46,24 +46,9 @@ jobs:
|
||||
shell: bash
|
||||
run: rustup target add "$TARGET"
|
||||
|
||||
# Rust cache covering both the workspace sidecar build and the Tauri
|
||||
# crate build. shared-key scoped to windows-canary-release so canary
|
||||
# runs warm each other without colliding with CI's debug-profile key
|
||||
# (CI windows job does clippy/check, not --release).
|
||||
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
|
||||
with:
|
||||
workspaces: |
|
||||
.
|
||||
desktop/src-tauri
|
||||
shared-key: windows-canary-release
|
||||
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||
with:
|
||||
node-version: 24.14.1
|
||||
# Disable setup-node's built-in cache: we manage the pnpm store cache
|
||||
# explicitly below (restore before install, save after) to mirror the
|
||||
# pattern used by ci.yml and to keep caching logic consistent across
|
||||
# all three canary workflows.
|
||||
package-manager-cache: false
|
||||
|
||||
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0
|
||||
@@ -108,6 +93,40 @@ jobs:
|
||||
cd desktop && node scripts/set-version-from-tag.mjs "$VERSION"
|
||||
cd src-tauri && cargo update --workspace
|
||||
|
||||
- name: Resolve native toolchain identity
|
||||
id: native_toolchain
|
||||
shell: bash
|
||||
run: echo "id=$(scripts/desktop-native-toolchain-id.sh windows)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
# Compute this after cargo update so the key describes the graph that is
|
||||
# actually compiled. The helper normalizes only Buzz Desktop's release
|
||||
# version, allowing a canary to warm an otherwise identical tag build.
|
||||
- name: Compute exact release cache key
|
||||
id: rust_cache_key
|
||||
shell: bash
|
||||
env:
|
||||
NATIVE_TOOLCHAIN_ID: ${{ steps.native_toolchain.outputs.id }}
|
||||
run: |
|
||||
KEY=$(scripts/desktop-release-cache-key.py \
|
||||
--platform "$RUNNER_OS" \
|
||||
--target x86_64-pc-windows-msvc \
|
||||
--features default \
|
||||
--native-inputs "$NATIVE_TOOLCHAIN_ID")
|
||||
echo "key=$KEY" >> "$GITHUB_OUTPUT"
|
||||
echo "Release cache key: $KEY"
|
||||
|
||||
- name: Restore exact release Cargo cache
|
||||
id: rust_cache
|
||||
uses: actions/cache/restore@caa296126883cff596d87d8935842f9db880ef25 # v5
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
desktop/src-tauri/target
|
||||
!desktop/src-tauri/target/**/release/bundle
|
||||
key: ${{ steps.rust_cache_key.outputs.key }}
|
||||
|
||||
- name: Generate non-updating bundle config
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -152,6 +171,25 @@ jobs:
|
||||
if-no-files-found: error
|
||||
retention-days: 7
|
||||
|
||||
- name: Measure release Cargo cache inputs
|
||||
if: always()
|
||||
shell: bash
|
||||
run: du -sh ~/.cargo/registry ~/.cargo/git target desktop/src-tauri/target 2>/dev/null || true
|
||||
|
||||
# Only this trusted, main-bound canary writes the cache. Excluding bundle
|
||||
# output prevents installers from entering it.
|
||||
- name: Save exact release Cargo cache
|
||||
if: steps.rust_cache.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@caa296126883cff596d87d8935842f9db880ef25 # v5
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
desktop/src-tauri/target
|
||||
!desktop/src-tauri/target/**/release/bundle
|
||||
key: ${{ steps.rust_cache_key.outputs.key }}
|
||||
|
||||
- name: Save pnpm store cache
|
||||
uses: actions/cache/save@caa296126883cff596d87d8935842f9db880ef25 # v5
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user