chore: use hermit to install node, rust and protoc (#2766)

This commit is contained in:
Lifei Zhou
2025-06-04 09:45:43 +10:00
committed by GitHub
parent 5574c20ff2
commit d1f9d4a31e
36 changed files with 170 additions and 82 deletions

View File

@@ -85,20 +85,16 @@ 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
# Update version in package.json
source ./bin/activate-hermit
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
@@ -137,7 +133,7 @@ jobs:
# Build specifically for Intel architecture
- name: Build goosed for Intel
run: cargo build --release -p goose-server --target x86_64-apple-darwin
run: source ./bin/activate-hermit && cargo build --release -p goose-server --target x86_64-apple-darwin
# Post-build cleanup to free space
- name: Post-build cleanup
@@ -164,13 +160,8 @@ 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: npm ci
run: source ../../bin/activate-hermit && npm ci
working-directory: ui/desktop
# Configure Electron builder for Intel architecture
@@ -187,6 +178,7 @@ jobs:
- name: Make Unsigned App
if: ${{ !inputs.signing }}
run: |
source ../../bin/activate-hermit
attempt=0
max_attempts=2
until [ $attempt -ge $max_attempts ]; do
@@ -204,6 +196,7 @@ jobs:
- name: Make Signed App
if: ${{ inputs.signing }}
run: |
source ../../bin/activate-hermit
attempt=0
max_attempts=2
until [ $attempt -ge $max_attempts ]; do