Revert "chore: use hermit in goose" (#2759)

This commit is contained in:
Lifei Zhou
2025-06-03 09:50:01 +10:00
committed by GitHub
parent a89fa18502
commit e56354603f
34 changed files with 114 additions and 148 deletions

View File

@@ -48,8 +48,14 @@ jobs:
sed -i.bak 's/^version = ".*"/version = "'${{ inputs.version }}'"/' Cargo.toml
rm -f Cargo.toml.bak
- name: Setup Rust
uses: dtolnay/rust-toolchain@38b70195107dddab2c7bbd522bcf763bac00963b # pin@stable
with:
toolchain: stable
target: ${{ matrix.architecture }}-${{ matrix.target-suffix }}
- name: Install cross
run: source ./bin/activate-hermit && cargo install cross --git https://github.com/cross-rs/cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Build CLI
env:
@@ -58,7 +64,12 @@ jobs:
RUST_BACKTRACE: 1
CROSS_VERBOSE: 1
run: |
source ./bin/activate-hermit
# Install protoc if on macOS
if [ "${{ matrix.os }}" = "macos-latest" ]; then
brew install protobuf
export PROTOC=$(which protoc)
fi
export TARGET="${{ matrix.architecture }}-${{ matrix.target-suffix }}"
rustup target add "${TARGET}"
echo "Building for target: ${TARGET}"

View File

@@ -85,16 +85,20 @@ jobs:
# Update version in Cargo.toml
sed -i.bak 's/^version = ".*"/version = "'${{ inputs.version }}'"/' Cargo.toml
rm -f Cargo.toml.bak
# Update version in package.json
source ./bin/activate-hermit
# Update version in package.json
cd ui/desktop
npm version ${{ inputs.version }} --no-git-tag-version --allow-same-version
- name: Setup Rust
uses: dtolnay/rust-toolchain@38b70195107dddab2c7bbd522bcf763bac00963b # pin@stable
with:
toolchain: stable
targets: x86_64-apple-darwin
# Pre-build cleanup to ensure enough disk space
- name: Pre-build cleanup
run: |
source ./bin/activate-hermit
echo "Performing pre-build cleanup..."
# Clean npm cache
npm cache clean --force || true
@@ -133,7 +137,7 @@ jobs:
# Build specifically for Intel architecture
- name: Build goosed for Intel
run: source ./bin/activate-hermit && cargo build --release -p goose-server --target x86_64-apple-darwin
run: cargo build --release -p goose-server --target x86_64-apple-darwin
# Post-build cleanup to free space
- name: Post-build cleanup
@@ -160,8 +164,13 @@ jobs:
CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }}
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
- name: Set up Node.js
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # pin@v2
with:
node-version: 'lts/*'
- name: Install dependencies
run: source ../../bin/activate-hermit && npm ci
run: npm ci
working-directory: ui/desktop
# Configure Electron builder for Intel architecture
@@ -178,7 +187,6 @@ jobs:
- name: Make Unsigned App
if: ${{ !inputs.signing }}
run: |
source ../../bin/activate-hermit
attempt=0
max_attempts=2
until [ $attempt -ge $max_attempts ]; do
@@ -196,7 +204,6 @@ jobs:
- name: Make Signed App
if: ${{ inputs.signing }}
run: |
source ../../bin/activate-hermit
attempt=0
max_attempts=2
until [ $attempt -ge $max_attempts ]; do

View File

@@ -135,7 +135,6 @@ jobs:
sed -i.bak "s/^version = \".*\"/version = \"${VERSION}\"/" Cargo.toml
rm -f Cargo.toml.bak
source ./bin/activate-hermit
# Update version in package.json
cd ui/desktop
npm version "${VERSION}" --no-git-tag-version --allow-same-version
@@ -143,7 +142,6 @@ jobs:
# Pre-build cleanup to ensure enough disk space
- name: Pre-build cleanup
run: |
source ./bin/activate-hermit
echo "Performing pre-build cleanup..."
# Clean npm cache
npm cache clean --force || true
@@ -156,6 +154,16 @@ jobs:
# Check disk space after cleanup
df -h
- name: Install protobuf
run: |
brew install protobuf
echo "PROTOC=$(which protoc)" >> $GITHUB_ENV
- name: Setup Rust
uses: dtolnay/rust-toolchain@38b70195107dddab2c7bbd522bcf763bac00963b # pin@stable
with:
toolchain: stable
- name: Cache Cargo registry
uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # pin@v3
with:
@@ -182,7 +190,7 @@ jobs:
# Build the project
- name: Build goosed
run: source ./bin/activate-hermit && cargo build --release -p goose-server
run: cargo build --release -p goose-server
# Post-build cleanup to free space
- name: Post-build cleanup
@@ -208,8 +216,13 @@ jobs:
CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }}
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
- name: Set up Node.js
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # pin@v2
with:
node-version: 'lts/*'
- name: Install dependencies
run: source ../../bin/activate-hermit && npm ci
run: npm ci
working-directory: ui/desktop
# Check disk space before bundling
@@ -219,7 +232,6 @@ jobs:
- name: Make Unsigned App
if: ${{ !inputs.signing }}
run: |
source ../../bin/activate-hermit
attempt=0
max_attempts=2
until [ $attempt -ge $max_attempts ]; do
@@ -241,7 +253,6 @@ jobs:
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: |
attempt=0
max_attempts=2
until [ $attempt -ge $max_attempts ]; do

View File

@@ -17,8 +17,13 @@ jobs:
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@38b70195107dddab2c7bbd522bcf763bac00963b # pin@stable
with:
toolchain: stable
- name: Run cargo fmt
run: source ./bin/activate-hermit && cargo fmt --check
run: cargo fmt --check
rust-build-and-test:
name: Build and Test Rust Project
@@ -52,7 +57,12 @@ jobs:
- name: Install Dependencies
run: |
sudo apt update -y
sudo apt install -y libdbus-1-dev gnome-keyring libxcb1-dev
sudo apt install -y libdbus-1-dev gnome-keyring libxcb1-dev protobuf-compiler
- name: Setup Rust
uses: dtolnay/rust-toolchain@38b70195107dddab2c7bbd522bcf763bac00963b # pin@stable
with:
toolchain: stable
- name: Cache Cargo Registry
uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # pin@v3
@@ -81,7 +91,7 @@ jobs:
- name: Build and Test
run: |
gnome-keyring-daemon --components=secrets --daemonize --unlock <<< 'foobar'
source ../bin/activate-hermit && cargo test
cargo test
working-directory: crates
# Add disk space cleanup before linting
@@ -110,7 +120,7 @@ jobs:
run: df -h
- name: Lint
run: source ./bin/activate-hermit && cargo clippy -- -D warnings
run: cargo clippy -- -D warnings
desktop-lint:
name: Lint Electron Desktop App
@@ -119,12 +129,17 @@ jobs:
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4
- name: Set up Node.js
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # pin@v2
with:
node-version: "lts/*"
- name: Install Dependencies
run: source ../../bin/activate-hermit && npm ci
run: npm ci
working-directory: ui/desktop
- name: Run Lint
run: source ../../bin/activate-hermit && npm run lint:check
run: npm run lint:check
working-directory: ui/desktop
# Faster Desktop App build for PRs only