removing golang/temporal building

This commit is contained in:
Michael Neale
2025-10-29 12:20:08 +11:00
committed by GitHub
parent b94535b679
commit f0056e6cd1
32 changed files with 34 additions and 4999 deletions
+6 -149
View File
@@ -78,12 +78,6 @@ jobs:
if: matrix.use-cross
run: source ./bin/activate-hermit && cargo install cross --git https://github.com/cross-rs/cross
# Install Go for building temporal-service
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # pin@v5
with:
go-version: '1.21'
# Cache Cargo registry and git dependencies for Windows builds
- name: Cache Cargo registry (Windows)
if: matrix.use-docker
@@ -231,140 +225,7 @@ jobs:
echo "✅ Windows runtime DLLs:"
ls -la ./target/x86_64-pc-windows-gnu/release/*.dll
- name: Build temporal-service for target platform using build.sh script (Linux/macOS)
if: matrix.use-cross
run: |
source ./bin/activate-hermit
export TARGET="${{ matrix.architecture }}-${{ matrix.target-suffix }}"
# Set Go cross-compilation variables based on target
case "${TARGET}" in
"x86_64-unknown-linux-gnu")
export GOOS=linux
export GOARCH=amd64
BINARY_NAME="temporal-service"
;;
"aarch64-unknown-linux-gnu")
export GOOS=linux
export GOARCH=arm64
BINARY_NAME="temporal-service"
;;
"x86_64-apple-darwin")
export GOOS=darwin
export GOARCH=amd64
BINARY_NAME="temporal-service"
;;
"aarch64-apple-darwin")
export GOOS=darwin
export GOARCH=arm64
BINARY_NAME="temporal-service"
;;
*)
echo "Unsupported target: ${TARGET}"
exit 1
;;
esac
echo "Building temporal-service for ${GOOS}/${GOARCH} using build.sh script..."
cd temporal-service
# 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: Build temporal-service for Windows
if: matrix.use-docker
run: |
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 "
# Make build.sh executable
chmod +x build.sh
# Set Windows build environment and run build script
GOOS=windows GOARCH=amd64 ./build.sh
# Move the built binary to the expected location (inside container)
mkdir -p ../target/x86_64-pc-windows-gnu/release
mv temporal-service.exe ../target/x86_64-pc-windows-gnu/release/temporal-service.exe
# Fix permissions for host access
chmod -R 755 ../target/x86_64-pc-windows-gnu
"
echo "temporal-service.exe built successfully for Windows"
- name: Download temporal CLI (Linux/macOS)
if: matrix.use-cross
run: |
export TARGET="${{ matrix.architecture }}-${{ matrix.target-suffix }}"
TEMPORAL_VERSION="1.3.0"
# Set platform-specific download parameters
case "${TARGET}" in
"x86_64-unknown-linux-gnu")
TEMPORAL_OS="linux"
TEMPORAL_ARCH="amd64"
TEMPORAL_EXT=""
;;
"aarch64-unknown-linux-gnu")
TEMPORAL_OS="linux"
TEMPORAL_ARCH="arm64"
TEMPORAL_EXT=""
;;
"x86_64-apple-darwin")
TEMPORAL_OS="darwin"
TEMPORAL_ARCH="amd64"
TEMPORAL_EXT=""
;;
"aarch64-apple-darwin")
TEMPORAL_OS="darwin"
TEMPORAL_ARCH="arm64"
TEMPORAL_EXT=""
;;
*)
echo "Unsupported target for temporal CLI: ${TARGET}"
exit 1
;;
esac
echo "Downloading temporal CLI for ${TEMPORAL_OS}/${TEMPORAL_ARCH}..."
TEMPORAL_FILE="temporal_cli_${TEMPORAL_VERSION}_${TEMPORAL_OS}_${TEMPORAL_ARCH}.tar.gz"
curl -L "https://github.com/temporalio/cli/releases/download/v${TEMPORAL_VERSION}/${TEMPORAL_FILE}" -o "${TEMPORAL_FILE}"
# Extract temporal CLI
tar -xzf "${TEMPORAL_FILE}"
chmod +x temporal${TEMPORAL_EXT}
# Move to target directory
mv temporal${TEMPORAL_EXT} "target/${TARGET}/release/temporal${TEMPORAL_EXT}"
# Clean up
rm -f "${TEMPORAL_FILE}"
echo "temporal CLI downloaded successfully for ${TARGET}"
- name: Download temporal CLI (Windows)
if: matrix.use-docker
run: |
TEMPORAL_VERSION="1.3.0"
echo "Downloading temporal CLI for Windows..."
curl -L "https://github.com/temporalio/cli/releases/download/v${TEMPORAL_VERSION}/temporal_cli_${TEMPORAL_VERSION}_windows_amd64.zip" -o temporal-cli-windows.zip
unzip -o temporal-cli-windows.zip
chmod +x temporal.exe
# Fix permissions on target directory (created by Docker as root)
sudo chown -R $(whoami):$(whoami) target/x86_64-pc-windows-gnu/ || true
# Move to target directory
mv temporal.exe target/x86_64-pc-windows-gnu/release/temporal.exe
# Clean up
rm -f temporal-cli-windows.zip
echo "temporal CLI downloaded successfully for Windows"
- name: Package CLI with temporal-service (Linux/macOS)
- name: Package CLI (Linux/macOS)
if: matrix.use-cross
run: |
source ./bin/activate-hermit
@@ -373,17 +234,15 @@ jobs:
# Create a directory for the package contents
mkdir -p "target/${TARGET}/release/goose-package"
# Copy binaries
# Copy the goose binary
cp "target/${TARGET}/release/goose" "target/${TARGET}/release/goose-package/"
cp "target/${TARGET}/release/temporal-service" "target/${TARGET}/release/goose-package/"
cp "target/${TARGET}/release/temporal" "target/${TARGET}/release/goose-package/"
# Create the tar archive with all binaries
# Create the tar archive
cd "target/${TARGET}/release"
tar -cjf "goose-${TARGET}.tar.bz2" -C goose-package .
echo "ARTIFACT=target/${TARGET}/release/goose-${TARGET}.tar.bz2" >> $GITHUB_ENV
- name: Package CLI with temporal-service (Windows)
- name: Package CLI (Windows)
if: matrix.use-docker
run: |
export TARGET="${{ matrix.architecture }}-${{ matrix.target-suffix }}"
@@ -391,15 +250,13 @@ jobs:
# Create a directory for the package contents
mkdir -p "target/${TARGET}/release/goose-package"
# Copy binaries
# Copy the goose binary
cp "target/${TARGET}/release/goose.exe" "target/${TARGET}/release/goose-package/"
cp "target/${TARGET}/release/temporal-service.exe" "target/${TARGET}/release/goose-package/"
cp "target/${TARGET}/release/temporal.exe" "target/${TARGET}/release/goose-package/"
# Copy Windows runtime DLLs
cp "target/${TARGET}/release/"*.dll "target/${TARGET}/release/goose-package/"
# Create the zip archive with all binaries and DLLs
# Create the zip archive with binary and DLLs
cd "target/${TARGET}/release"
zip -r "goose-${TARGET}.zip" goose-package/
echo "ARTIFACT=target/${TARGET}/release/goose-${TARGET}.zip" >> $GITHUB_ENV
@@ -87,11 +87,6 @@ jobs:
restore-keys: |
${{ runner.os }}-intel-cargo-build-
# Install Go for building temporal-service
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # pin@v5
with:
go-version: '1.21'
- name: Build goose-server for Intel macOS (x86_64)
run: |
@@ -99,20 +94,7 @@ jobs:
rustup target add x86_64-apple-darwin
cargo build --release -p goose-server --target x86_64-apple-darwin
# 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"
# Install and prepare temporal CLI
- name: Install temporal CLI via hermit
run: |
echo "Installing temporal CLI via hermit..."
./bin/hermit install temporal-cli
echo "temporal CLI installed successfully"
# Post-build cleanup to free space
- name: Post-build cleanup
@@ -131,8 +113,6 @@ jobs:
- name: Copy binaries into Electron folder
run: |
cp target/x86_64-apple-darwin/release/goosed ui/desktop/src/bin/goosed
cp temporal-service/temporal-service ui/desktop/src/bin/temporal-service
cp bin/temporal ui/desktop/src/bin/temporal
- name: Cache npm dependencies
uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # pin@v3
@@ -99,18 +99,6 @@ jobs:
restore-keys: |
${{ runner.os }}-cargo-
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # pin@v5
with:
go-version: '1.21'
- name: Build temporal-service
run: |
echo "Building temporal-service using build.sh script..."
cd temporal-service
./build.sh
echo "temporal-service built successfully"
- name: Build goosed binary
env:
CROSS_NO_WARNINGS: 0
@@ -130,9 +118,7 @@ jobs:
export TARGET="x86_64-unknown-linux-gnu"
mkdir -p ui/desktop/src/bin
cp target/$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/
- name: Cache npm dependencies
@@ -198,32 +198,6 @@ 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 using build.sh script
- name: Build temporal-service for Windows
run: |
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 "
# 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
- name: Download temporal CLI for Windows
run: |
echo "Downloading temporal CLI for Windows..."
TEMPORAL_VERSION="1.3.0"
curl -L "https://github.com/temporalio/cli/releases/download/v${TEMPORAL_VERSION}/temporal_cli_${TEMPORAL_VERSION}_windows_amd64.zip" -o temporal-cli-windows.zip
unzip -o temporal-cli-windows.zip
chmod +x temporal.exe
echo "temporal CLI downloaded successfully"
# 5) Prepare Windows binary and DLLs
- name: Prepare Windows binary and DLLs
run: |
@@ -232,16 +206,6 @@ jobs:
exit 1
fi
if [ ! -f "./temporal-service/temporal-service.exe" ]; then
echo "temporal-service.exe not found."
exit 1
fi
if [ ! -f "./temporal.exe" ]; then
echo "temporal.exe not found."
exit 1
fi
echo "Cleaning destination directory..."
rm -rf ./ui/desktop/src/bin
mkdir -p ./ui/desktop/src/bin
@@ -250,12 +214,6 @@ jobs:
cp -f ./target/x86_64-pc-windows-gnu/release/goosed.exe ./ui/desktop/src/bin/
cp -f ./target/x86_64-pc-windows-gnu/release/*.dll ./ui/desktop/src/bin/
echo "Copying temporal-service.exe..."
cp -f ./temporal-service/temporal-service.exe ./ui/desktop/src/bin/
echo "Copying temporal.exe..."
cp -f ./temporal.exe ./ui/desktop/src/bin/
# Copy Windows platform files (tools, scripts, etc.)
if [ -d "./ui/desktop/src/platform/windows/bin" ]; then
echo "Copying Windows platform files..."
-23
View File
@@ -131,31 +131,10 @@ jobs:
restore-keys: |
${{ runner.os }}-cargo-build-
# Install Go for building temporal-service
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # pin@v5
with:
go-version: '1.21'
# Build the project
- name: Build goosed
run: source ./bin/activate-hermit && cargo build --release -p goose-server
# 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"
# Install and prepare temporal CLI
- name: Install temporal CLI via hermit
run: |
echo "Installing temporal CLI via hermit..."
./bin/hermit install temporal-cli
echo "temporal CLI installed successfully"
# Post-build cleanup to free space
- name: Post-build cleanup
run: |
@@ -172,8 +151,6 @@ jobs:
- name: Copy binaries into Electron folder
run: |
cp target/release/goosed ui/desktop/src/bin/goosed
cp temporal-service/temporal-service ui/desktop/src/bin/temporal-service
cp bin/temporal ui/desktop/src/bin/temporal
- name: Cache npm dependencies
uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # pin@v3