mirror of
https://github.com/aljazceru/goose.git
synced 2026-01-01 21:44:26 +01:00
Mnovich/temporal foreground tasks (#2895)
Co-authored-by: Carlos M. Lopez <carlopez@squareup.com>
This commit is contained in:
9
.github/workflows/build-cli.yml
vendored
9
.github/workflows/build-cli.yml
vendored
@@ -83,7 +83,7 @@ jobs:
|
||||
echo "Building with explicit PROTOC path..."
|
||||
cross build --release --target ${TARGET} -p goose-cli -vv
|
||||
|
||||
- name: Build temporal-service for target platform
|
||||
- name: Build temporal-service for target platform using build.sh script
|
||||
run: |
|
||||
source ./bin/activate-hermit
|
||||
export TARGET="${{ matrix.architecture }}-${{ matrix.target-suffix }}"
|
||||
@@ -116,9 +116,12 @@ jobs:
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Building temporal-service for ${GOOS}/${GOARCH}..."
|
||||
echo "Building temporal-service for ${GOOS}/${GOARCH} using build.sh script..."
|
||||
cd temporal-service
|
||||
go build -o "../target/${TARGET}/release/${BINARY_NAME}" main.go
|
||||
# Run build.sh with cross-compilation environment
|
||||
GOOS="${GOOS}" GOARCH="${GOARCH}" ./build.sh
|
||||
# Move the built binary to the expected location
|
||||
mv "${BINARY_NAME}" "../target/${TARGET}/release/${BINARY_NAME}"
|
||||
echo "temporal-service built successfully for ${TARGET}"
|
||||
|
||||
- name: Package CLI with temporal-service
|
||||
|
||||
7
.github/workflows/bundle-desktop-intel.yml
vendored
7
.github/workflows/bundle-desktop-intel.yml
vendored
@@ -150,13 +150,12 @@ jobs:
|
||||
rustup target add x86_64-apple-darwin
|
||||
cargo build --release -p goose-server --target x86_64-apple-darwin
|
||||
|
||||
# Build temporal-service
|
||||
# Build temporal-service using build.sh script
|
||||
- name: Build temporal-service
|
||||
run: |
|
||||
echo "Building temporal-service..."
|
||||
echo "Building temporal-service using build.sh script..."
|
||||
cd temporal-service
|
||||
go build -o temporal-service main.go
|
||||
chmod +x temporal-service
|
||||
./build.sh
|
||||
echo "temporal-service built successfully"
|
||||
|
||||
# Install and prepare temporal CLI
|
||||
|
||||
40
.github/workflows/bundle-desktop-linux.yml
vendored
40
.github/workflows/bundle-desktop-linux.yml
vendored
@@ -142,7 +142,21 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cargo-build-
|
||||
|
||||
# 8) Build the Rust goosed binary
|
||||
# 8) Set up Go for building temporal-service
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # pin@v5
|
||||
with:
|
||||
go-version: '1.21'
|
||||
|
||||
# 9) Build temporal-service using build.sh script
|
||||
- name: Build temporal-service
|
||||
run: |
|
||||
echo "Building temporal-service using build.sh script..."
|
||||
cd temporal-service
|
||||
./build.sh
|
||||
echo "temporal-service built successfully"
|
||||
|
||||
# 10) Build the Rust goosed binary
|
||||
- name: Build goosed binary
|
||||
run: |
|
||||
echo "Building goosed binary for Linux..."
|
||||
@@ -150,7 +164,7 @@ jobs:
|
||||
ls -la target/release/
|
||||
file target/release/goosed
|
||||
|
||||
# 9) Clean up build artifacts to save space
|
||||
# 11) Clean up build artifacts to save space
|
||||
- name: Clean up build artifacts
|
||||
run: |
|
||||
echo "Cleaning up to save disk space..."
|
||||
@@ -167,16 +181,18 @@ jobs:
|
||||
# Check disk space
|
||||
df -h
|
||||
|
||||
# 10) Copy binary to Electron folder
|
||||
- name: Copy binary into Electron folder
|
||||
# 12) Copy binaries to Electron folder
|
||||
- name: Copy binaries into Electron folder
|
||||
run: |
|
||||
echo "Copying goosed binary to ui/desktop/src/bin/"
|
||||
echo "Copying binaries to ui/desktop/src/bin/"
|
||||
mkdir -p ui/desktop/src/bin
|
||||
cp target/release/goosed ui/desktop/src/bin/
|
||||
cp temporal-service/temporal-service ui/desktop/src/bin/
|
||||
chmod +x ui/desktop/src/bin/goosed
|
||||
chmod +x ui/desktop/src/bin/temporal-service
|
||||
ls -la ui/desktop/src/bin/
|
||||
|
||||
# 10a) Final cleanup before npm build
|
||||
# 13) Final cleanup before npm build
|
||||
- name: Final cleanup before npm build
|
||||
run: |
|
||||
echo "Final cleanup before npm build..."
|
||||
@@ -188,7 +204,7 @@ jobs:
|
||||
# Check final disk space
|
||||
df -h
|
||||
|
||||
# 12) Install npm dependencies
|
||||
# 14) Install npm dependencies
|
||||
- name: Install npm dependencies
|
||||
run: |
|
||||
cd ui/desktop
|
||||
@@ -199,7 +215,7 @@ jobs:
|
||||
# Verify installation
|
||||
ls -la node_modules/.bin/ | head -5
|
||||
|
||||
# 13) Build Electron app with Linux makers (.deb and .rpm)
|
||||
# 15) Build Electron app with Linux makers (.deb and .rpm)
|
||||
- name: Build Linux packages
|
||||
run: |
|
||||
cd ui/desktop
|
||||
@@ -212,7 +228,7 @@ jobs:
|
||||
ls -la out/
|
||||
find out/ -name "*.deb" -o -name "*.rpm" | head -10
|
||||
|
||||
# 14) List all generated files for debugging
|
||||
# 16) List all generated files for debugging
|
||||
- name: List generated files
|
||||
run: |
|
||||
echo "=== All files in out/ directory ==="
|
||||
@@ -224,7 +240,7 @@ jobs:
|
||||
echo "=== File sizes ==="
|
||||
find ui/desktop/out/ -name "*.deb" -o -name "*.rpm" -exec ls -lh {} \;
|
||||
|
||||
# 15) Upload .deb package
|
||||
# 17) Upload .deb package
|
||||
- name: Upload .deb package
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
@@ -232,7 +248,7 @@ jobs:
|
||||
path: ui/desktop/out/make/deb/x64/*.deb
|
||||
if-no-files-found: error
|
||||
|
||||
# 16) Upload .rpm package
|
||||
# 18) Upload .rpm package
|
||||
- name: Upload .rpm package
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
@@ -240,7 +256,7 @@ jobs:
|
||||
path: ui/desktop/out/make/rpm/x64/*.rpm
|
||||
if-no-files-found: error
|
||||
|
||||
# 17) Create combined artifact with both packages
|
||||
# 19) Create combined artifact with both packages
|
||||
- name: Upload combined Linux packages
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
11
.github/workflows/bundle-desktop-windows.yml
vendored
11
.github/workflows/bundle-desktop-windows.yml
vendored
@@ -196,15 +196,20 @@ jobs:
|
||||
ls -la ./target/x86_64-pc-windows-gnu/release/goosed.exe
|
||||
ls -la ./target/x86_64-pc-windows-gnu/release/*.dll
|
||||
|
||||
# 4.5) Build temporal-service for Windows
|
||||
# 4.5) Build temporal-service for Windows using build.sh script
|
||||
- name: Build temporal-service for Windows
|
||||
run: |
|
||||
echo "Building temporal-service for Windows..."
|
||||
echo "Building temporal-service for Windows using build.sh script..."
|
||||
docker run --rm \
|
||||
-v "$(pwd)":/usr/src/myapp \
|
||||
-w /usr/src/myapp/temporal-service \
|
||||
golang:latest \
|
||||
sh -c "GOOS=windows GOARCH=amd64 go build -o temporal-service.exe main.go"
|
||||
sh -c "
|
||||
# Make build.sh executable
|
||||
chmod +x build.sh
|
||||
# Set Windows build environment and run build script
|
||||
GOOS=windows GOARCH=amd64 ./build.sh
|
||||
"
|
||||
echo "temporal-service.exe built successfully"
|
||||
|
||||
# 4.6) Download temporal CLI for Windows
|
||||
|
||||
7
.github/workflows/bundle-desktop.yml
vendored
7
.github/workflows/bundle-desktop.yml
vendored
@@ -190,13 +190,12 @@ jobs:
|
||||
- name: Build goosed
|
||||
run: source ./bin/activate-hermit && cargo build --release -p goose-server
|
||||
|
||||
# Build temporal-service
|
||||
# Build temporal-service using build.sh script
|
||||
- name: Build temporal-service
|
||||
run: |
|
||||
echo "Building temporal-service..."
|
||||
echo "Building temporal-service using build.sh script..."
|
||||
cd temporal-service
|
||||
go build -o temporal-service main.go
|
||||
chmod +x temporal-service
|
||||
./build.sh
|
||||
echo "temporal-service built successfully"
|
||||
|
||||
# Install and prepare temporal CLI
|
||||
|
||||
Reference in New Issue
Block a user