Make roaming an opt-in goose-cli feature (default-off, stays in-tree) (#11516)

Signed-off-by: Michael Neale <michael.neale@gmail.com>
Co-authored-by: Michael Neale <14976+michaelneale@users.noreply.github.com>
Co-authored-by: pstayets <philip@vulturelabs.com>
Co-authored-by: pstayet <philipstayetski2416@gmail.com>
Co-authored-by: Colin Gauvin <colin@gauvin.id>
This commit is contained in:
Michael Neale
2026-08-25 07:22:46 +00:00
committed by GitHub
parent f1d32e8dbb
commit bcbf3c7723
40 changed files with 7327 additions and 102 deletions
+24
View File
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# v8-goose downloads a prebuilt librusty_v8 archive into target/<profile>/gn_out
# and emits a rustc-link-search pointing at it. Cargo caches that build script
# output and replays it on later builds instead of re-running the script, but
# the Rust cache action prunes target/ before saving, so a restored cache can
# keep the replayed link-search while the 131MB archive is gone. Linking then
# fails with "could not find native static library `rusty_v8`".
#
# Drop the cached build script output whenever a directory it advertises is
# missing, which forces the script to re-run and download the archive again.
set -euo pipefail
[ -d target ] || exit 0
find target -type f -path '*/build/v8-goose-*/output' -print0 |
while IFS= read -r -d '' output; do
while IFS= read -r dir; do
[ -n "$dir" ] || continue
[ -d "$dir" ] && continue
echo "v8-goose build output references missing $dir; forcing a rebuild"
rm -rf "$(dirname "$output")"
break
done < <(sed -n 's/^cargo:rustc-link-search=\(.*\)$/\1/p' "$output")
done
+40
View File
@@ -59,6 +59,9 @@ jobs:
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
- name: Repair stale v8 prebuilt marker
run: .github/scripts/repair-v8-prebuilt.sh
- name: Install Dependencies
run: |
sudo apt update -y
@@ -137,6 +140,37 @@ jobs:
RUST_MIN_STACK: 8388608
rust-build-and-test-roaming:
name: Build and Test Roaming Feature
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.code == 'true' || github.event_name != 'pull_request'
steps:
- name: Checkout Code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
- name: Install Dependencies
run: |
sudo apt update -y
sudo apt install -y libdbus-1-dev gnome-keyring libxcb1-dev
- name: Cache Cargo artifacts
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
key: roaming
- name: Build and Test with roaming
run: |
gnome-keyring-daemon --components=secrets --daemonize --unlock <<< 'foobar'
export CARGO_INCREMENTAL=0
cargo test -p goose-roaming
cargo build -p goose-cli --features roaming
cargo test -p goose-cli --features roaming --test roam_acp_client
env:
RUST_MIN_STACK: 8388608
rust-build-windows:
name: Build Rust Project on Windows
runs-on: windows-latest
@@ -189,6 +223,9 @@ jobs:
sudo apt update -y
sudo apt install -y libdbus-1-dev libxcb1-dev
- name: Repair stale v8 prebuilt marker
run: .github/scripts/repair-v8-prebuilt.sh
- name: Check with MSRV toolchain
run: cargo check --workspace --locked --all-targets
env:
@@ -204,6 +241,9 @@ jobs:
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
- name: Repair stale v8 prebuilt marker
run: .github/scripts/repair-v8-prebuilt.sh
- name: Lint
run: |
source ./bin/activate-hermit