Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

Add debug steps for binary upload

f-trycua3915e4ea40e6
diff --git a/.github/workflows/publish-lume.yml b/.github/workflows/publish-lume.yml
index d12769ffb6..5976b9cd82 100644
--- a/.github/workflows/publish-lume.yml
+++ b/.github/workflows/publish-lume.yml
@@ -149,7 +149,11 @@ jobs:
chmod +x scripts/build/build-release-notarized.sh
cd scripts/build
LOG_LEVEL=minimal ./build-release-notarized.sh
-
+
+ # Debug: List what files were actually created
+ echo "Files in .release directory:"
+ ls -la ../../../.release
+
- name: Generate SHA256 Checksums
id: generate_checksums
working-directory: ./libs/lume/.release
@@ -161,7 +165,7 @@ jobs:
else
echo "## SHA256 Checksums" > checksums.txt
echo '```' >> checksums.txt
- shasum -a 256 lume*.tar.gz >> checksums.txt
+ shasum -a 256 lume-*.tar.gz >> checksums.txt
echo '```' >> checksums.txt
fi
@@ -174,17 +178,16 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: lume-notarized
- path: |
- ./libs/lume/.release/lume*.tar.gz
- ./libs/lume/.release/lume*.pkg.tar.gz
+ path: ./libs/lume/.release/lume-*.tar.gz
+ if-no-files-found: warn
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
- ./libs/lume/.release/lume-*-darwin-*.tar.gz
- ./libs/lume/.release/lume-*-darwin-*.pkg.tar.gz
+ ./libs/lume/.release/lume-*.tar.gz
+ ./libs/lume/.release/lume-*.pkg.tar.gz
body: |
${{ steps.generate_checksums.outputs.checksums }}
diff --git a/libs/lume/scripts/build/build-release-notarized.sh b/libs/lume/scripts/build/build-release-notarized.sh
index b57c94b0d9..df2b82c21b 100755
--- a/libs/lume/scripts/build/build-release-notarized.sh
+++ b/libs/lume/scripts/build/build-release-notarized.sh
@@ -50,6 +50,10 @@ VERSION=${VERSION:-"0.1.0"}
# Move to the project root directory
pushd ../../ > /dev/null
+# Ensure .release directory exists and is clean
+mkdir -p .release
+log "normal" "Ensuring .release directory exists and is accessible"
+
# Build the release version
log "essential" "Building release version..."
swift build -c release --product lume > /dev/null
@@ -131,14 +135,17 @@ if [ ! -f "usr/local/bin/lume" ]; then
exit 1
fi
-# Copy extracted lume to ./.release/lume
-cp -f usr/local/bin/lume "$(dirname "$PKG_PATH")/lume"
+# Get the release directory absolute path
+RELEASE_DIR="$(realpath "$(dirname "$PKG_PATH")")"
+log "normal" "Using release directory: $RELEASE_DIR"
+
+# Copy extracted lume to the release directory
+cp -f usr/local/bin/lume "$RELEASE_DIR/lume"
# Create symbolic link in /usr/local/bin if not in minimal mode
if [ "$LOG_LEVEL" != "minimal" ] && [ "$LOG_LEVEL" != "none" ]; then
log "normal" "Creating symbolic link..."
- cd "$(dirname "$PKG_PATH")"
- sudo ln -sf "$(pwd)/lume" /usr/local/bin/lume
+ sudo ln -sf "$RELEASE_DIR/lume" /usr/local/bin/lume
fi
# Get architecture and create OS identifier
@@ -146,29 +153,35 @@ ARCH=$(uname -m)
OS_IDENTIFIER="darwin-${ARCH}"
# Create versioned archives of the package with OS identifier in the name
-log "essential" "Creating archives with OS identifier..."
-cd "$(dirname "$PKG_PATH")"
+log "essential" "Creating archives in $RELEASE_DIR..."
+cd "$RELEASE_DIR"
+
+# Clean up any existing artifacts first to avoid conflicts
+rm -f lume-*.tar.gz lume-*.pkg.tar.gz
# Create version-specific archives
log "essential" "Creating version-specific archives (${VERSION})..."
+# Package the binary
tar -czf "lume-${VERSION}-${OS_IDENTIFIER}.tar.gz" lume > /dev/null 2>&1
+# Package the installer
tar -czf "lume-${VERSION}-${OS_IDENTIFIER}.pkg.tar.gz" lume.pkg > /dev/null 2>&1
-# Delete temporary package files that we don't need to upload
-log "normal" "Cleaning up temporary files..."
-rm -f lume.pkg
-rm -f lume
-
# Create sha256 checksum file
log "essential" "Generating checksums..."
shasum -a 256 lume-*.tar.gz > checksums.txt
log "essential" "Package created successfully with checksums generated."
-# Show what we're publishing
-ls -la *.tar.gz *.pkg.tar.gz
+# Show what's in the release directory
+log "essential" "Files in release directory:"
+ls -la "$RELEASE_DIR"
+
+# Ensure correct permissions
+chmod 644 "$RELEASE_DIR"/*.tar.gz "$RELEASE_DIR"/*.pkg.tar.gz "$RELEASE_DIR"/checksums.txt
popd > /dev/null
# Clean up
rm -rf "$TEMP_ROOT"
-rm -rf "$EXTRACT_ROOT"
\ No newline at end of file
+rm -rf "$EXTRACT_ROOT"
+
+log "essential" "Build and packaging completed successfully."
\ No newline at end of file