fix missing dependencies for cli (#3065)

This commit is contained in:
Max Novich
2025-06-24 16:30:25 -07:00
committed by GitHub
parent 9e6247d9ed
commit a025161072
2 changed files with 104 additions and 3 deletions

View File

@@ -206,6 +206,12 @@ jobs:
RUST_BACKTRACE=1 \
cargo build --release --target x86_64-pc-windows-gnu -p goose-cli --jobs 4
echo '=== Copying Windows runtime DLLs ==='
GCC_DIR=\$(ls -d /usr/lib/gcc/x86_64-w64-mingw32/*/ | head -n 1)
cp \"\$GCC_DIR/libstdc++-6.dll\" target/x86_64-pc-windows-gnu/release/
cp \"\$GCC_DIR/libgcc_s_seh-1.dll\" target/x86_64-pc-windows-gnu/release/
cp /usr/x86_64-w64-mingw32/lib/libwinpthread-1.dll target/x86_64-pc-windows-gnu/release/
echo '✅ Build completed successfully!'
ls -la target/x86_64-pc-windows-gnu/release/
"
@@ -219,6 +225,9 @@ jobs:
echo "✅ Windows CLI binary found!"
ls -la ./target/x86_64-pc-windows-gnu/release/goose.exe
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
@@ -282,6 +291,71 @@ jobs:
mv temporal-service/temporal-service.exe target/x86_64-pc-windows-gnu/release/temporal-service.exe
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
# 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)
if: matrix.use-cross
run: |
@@ -294,8 +368,9 @@ jobs:
# Copy binaries
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 both binaries
# Create the tar archive with all binaries
cd "target/${TARGET}/release"
tar -cjf "goose-${TARGET}.tar.bz2" -C goose-package .
echo "ARTIFACT=target/${TARGET}/release/goose-${TARGET}.tar.bz2" >> $GITHUB_ENV
@@ -311,8 +386,12 @@ jobs:
# Copy binaries
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/"
# Create the zip archive with both binaries (Windows uses zip instead of tar.bz2)
# Copy Windows runtime DLLs
cp "target/${TARGET}/release/"*.dll "target/${TARGET}/release/goose-package/"
# Create the zip archive with all binaries and DLLs
cd "target/${TARGET}/release"
zip -r "goose-${TARGET}.zip" goose-package/
echo "ARTIFACT=target/${TARGET}/release/goose-${TARGET}.zip" >> $GITHUB_ENV