From dd6155e57ba18302a7f546ac04afe652e7859188 Mon Sep 17 00:00:00 2001 From: f-trycua Date: Mon, 17 Mar 2025 11:37:05 +0100 Subject: [PATCH] Fix upload lume artifacts --- .github/workflows/publish-lume.yml | 17 +-- .vscode/launch.json | 139 ++++++++++++++++++ README.md | 2 +- .../scripts/build/build-release-notarized.sh | 35 ++--- 4 files changed, 160 insertions(+), 33 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.github/workflows/publish-lume.yml b/.github/workflows/publish-lume.yml index 9894fb91..d12769ff 100644 --- a/.github/workflows/publish-lume.yml +++ b/.github/workflows/publish-lume.yml @@ -183,24 +183,17 @@ jobs: uses: softprops/action-gh-release@v1 with: files: | - ./libs/lume/.release/lume*.tar.gz - ./libs/lume/.release/lume*.pkg.tar.gz + ./libs/lume/.release/lume-*-darwin-*.tar.gz + ./libs/lume/.release/lume-*-darwin-*.pkg.tar.gz body: | ${{ steps.generate_checksums.outputs.checksums }} - ### Installation with Mise and Ubi + ### Installation with Ubi ``` - mise use -g ubi:trycua/cua + mise use -g ubi:trycua/lume # Or run it directly - mise x ubi:trycua/cua@latest -- lume - ``` - - ### Installation with Brew - - ``` - brew tap trycua/lume - brew install lume + mise x ubi:trycua/lume@latest -- lume ``` generate_release_notes: true \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..dfec828c --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,139 @@ +{ + "configurations": [ + { + "name": "Run Computer Examples", + "type": "debugpy", + "request": "launch", + "program": "examples/computer_examples.py", + "console": "integratedTerminal", + "justMyCode": true, + "python": "${workspaceFolder:cua-root}/.venv/bin/python", + "cwd": "${workspaceFolder:cua-root}", + "env": { + "PYTHONPATH": "${workspaceFolder:cua-root}/libs/core:${workspaceFolder:cua-root}/libs/computer:${workspaceFolder:cua-root}/libs/agent:${workspaceFolder:cua-root}/libs/som:${workspaceFolder:cua-root}/libs/pylume" + } + }, + { + "name": "Run Agent Examples", + "type": "debugpy", + "request": "launch", + "program": "examples/agent_examples.py", + "console": "integratedTerminal", + "justMyCode": false, + "python": "${workspaceFolder:cua-root}/.venv/bin/python", + "cwd": "${workspaceFolder:cua-root}", + "env": { + "PYTHONPATH": "${workspaceFolder:cua-root}/libs/core:${workspaceFolder:cua-root}/libs/computer:${workspaceFolder:cua-root}/libs/agent:${workspaceFolder:cua-root}/libs/som:${workspaceFolder:cua-root}/libs/pylume" + } + }, + { + "name": "Run PyLume Examples", + "type": "debugpy", + "request": "launch", + "program": "examples/pylume_examples.py", + "console": "integratedTerminal", + "justMyCode": true, + "python": "${workspaceFolder:cua-root}/.venv/bin/python", + "cwd": "${workspaceFolder:cua-root}", + "env": { + "PYTHONPATH": "${workspaceFolder:cua-root}/libs/core:${workspaceFolder:cua-root}/libs/computer:${workspaceFolder:cua-root}/libs/agent:${workspaceFolder:cua-root}/libs/som:${workspaceFolder:cua-root}/libs/pylume" + } + }, + { + "name": "SOM: Run Experiments (No OCR)", + "type": "debugpy", + "request": "launch", + "program": "examples/som_examples.py", + "args": [ + "examples/test_data", + "--output-dir", + "examples/output", + "--ocr", + "none", + "--mode", + "experiment" + ], + "console": "integratedTerminal", + "justMyCode": false, + "python": "${workspaceFolder:cua-root}/.venv/bin/python", + "cwd": "${workspaceFolder:cua-root}", + "env": { + "PYTHONPATH": "${workspaceFolder:cua-root}/libs/core:${workspaceFolder:cua-root}/libs/computer:${workspaceFolder:cua-root}/libs/agent:${workspaceFolder:cua-root}/libs/som:${workspaceFolder:cua-root}/libs/pylume" + } + }, + { + "name": "SOM: Run Experiments (EasyOCR)", + "type": "debugpy", + "request": "launch", + "program": "examples/som_examples.py", + "args": [ + "examples/test_data", + "--output-dir", + "examples/output", + "--ocr", + "easyocr", + "--mode", + "experiment" + ], + "console": "integratedTerminal", + "justMyCode": false, + "python": "${workspaceFolder:cua-root}/.venv/bin/python", + "cwd": "${workspaceFolder:cua-root}", + "env": { + "PYTHONPATH": "${workspaceFolder:cua-root}/libs/core:${workspaceFolder:cua-root}/libs/computer:${workspaceFolder:cua-root}/libs/agent:${workspaceFolder:cua-root}/libs/som:${workspaceFolder:cua-root}/libs/pylume" + } + }, + { + "name": "Run Computer Server", + "type": "debugpy", + "request": "launch", + "program": "${workspaceFolder}/libs/computer-server/run_server.py", + "console": "integratedTerminal", + "justMyCode": true, + "python": "${workspaceFolder:cua-root}/.venv/bin/python", + "cwd": "${workspaceFolder:cua-root}", + "env": { + "PYTHONPATH": "${workspaceFolder:cua-root}/libs/core:${workspaceFolder:cua-root}/libs/computer:${workspaceFolder:cua-root}/libs/agent:${workspaceFolder:cua-root}/libs/som:${workspaceFolder:cua-root}/libs/pylume" + } + }, + { + "name": "Run Computer Server with Args", + "type": "debugpy", + "request": "launch", + "program": "${workspaceFolder}/libs/computer-server/run_server.py", + "args": [ + "--host", + "0.0.0.0", + "--port", + "8000", + "--log-level", + "debug" + ], + "console": "integratedTerminal", + "justMyCode": false, + "python": "${workspaceFolder:cua-root}/.venv/bin/python", + "cwd": "${workspaceFolder:cua-root}", + "env": { + "PYTHONPATH": "${workspaceFolder:cua-root}/libs/core:${workspaceFolder:cua-root}/libs/computer-server" + } + }, + { + "type": "lldb", + "request": "launch", + "args": [], + "cwd": "${workspaceFolder:cua-root}/libs/lume", + "name": "Debug lume (libs/lume)", + "program": "${workspaceFolder:cua-root}/libs/lume/.build/debug/lume", + "preLaunchTask": "swift: Build Debug lume (libs/lume)" + }, + { + "type": "lldb", + "request": "launch", + "args": [], + "cwd": "${workspaceFolder:cua-root}/libs/lume", + "name": "Release lume (libs/lume)", + "program": "${workspaceFolder:cua-root}/libs/lume/.build/release/lume", + "preLaunchTask": "swift: Build Release lume (libs/lume)" + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index 500b0030..449d40de 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Create and run high-performance macOS and Linux VMs on Apple Silicon, with built | Library | Description | Installation | Version | |---------|-------------|--------------|---------| -| [**Lume**](./libs/lume/README.md) | CLI for running macOS/Linux VMs with near-native performance using Apple's `Virtualization.Framework`. | `brew install lume` | [![brew](https://img.shields.io/badge/brew-0.1.10-333333)](https://formulae.brew.sh/formula/lume) | +| [**Lume**](./libs/lume/README.md) | CLI for running macOS/Linux VMs with near-native performance using Apple's `Virtualization.Framework`. | `brew install lume` | [![brew](https://img.shields.io/homebrew/v/lume?color=333333)](https://formulae.brew.sh/formula/lume) | | [**Computer**](./libs/computer/README.md) | Computer-Use Interface (CUI) framework for interacting with macOS/Linux sandboxes | `pip install cua-computer` | [![PyPI](https://img.shields.io/pypi/v/cua-computer?color=333333)](https://pypi.org/project/cua-computer/) | | [**Agent**](./libs/agent/README.md) | Computer-Use Agent (CUA) framework for running agentic workflows in macOS/Linux dedicated sandboxes | `pip install cua-agent` | [![PyPI](https://img.shields.io/pypi/v/cua-agent?color=333333)](https://pypi.org/project/cua-agent/) | diff --git a/libs/lume/scripts/build/build-release-notarized.sh b/libs/lume/scripts/build/build-release-notarized.sh index a718e981..b57c94b0 100755 --- a/libs/lume/scripts/build/build-release-notarized.sh +++ b/libs/lume/scripts/build/build-release-notarized.sh @@ -145,32 +145,27 @@ fi ARCH=$(uname -m) OS_IDENTIFIER="darwin-${ARCH}" -# Create archives of the package with OS identifier in the name +# Create versioned archives of the package with OS identifier in the name log "essential" "Creating archives with OS identifier..." cd "$(dirname "$PKG_PATH")" -# Create both original and OS-specific archives (for backward compatibility) -tar -czf "lume-${OS_IDENTIFIER}.tar.gz" lume > /dev/null 2>&1 -tar -czf "lume-${OS_IDENTIFIER}.pkg.tar.gz" lume.pkg > /dev/null 2>&1 +# Create version-specific archives +log "essential" "Creating version-specific archives (${VERSION})..." +tar -czf "lume-${VERSION}-${OS_IDENTIFIER}.tar.gz" lume > /dev/null 2>&1 +tar -czf "lume-${VERSION}-${OS_IDENTIFIER}.pkg.tar.gz" lume.pkg > /dev/null 2>&1 -# Also create the original names for backward compatibility -cp "lume-${OS_IDENTIFIER}.tar.gz" lume.tar.gz -cp "lume-${OS_IDENTIFIER}.pkg.tar.gz" lume.pkg.tar.gz +# 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 version-specific archives if VERSION is provided -if [ -n "$VERSION" ]; then - cp "lume-${OS_IDENTIFIER}.tar.gz" "lume-${VERSION}-${OS_IDENTIFIER}.tar.gz" - cp "lume-${OS_IDENTIFIER}.pkg.tar.gz" "lume-${VERSION}-${OS_IDENTIFIER}.pkg.tar.gz" -fi +# Create sha256 checksum file +log "essential" "Generating checksums..." +shasum -a 256 lume-*.tar.gz > checksums.txt +log "essential" "Package created successfully with checksums generated." -# Create sha256 checksum for the lume tarball but don't display details in logs -if [ "$LOG_LEVEL" = "minimal" ] || [ "$LOG_LEVEL" = "none" ]; then - shasum -a 256 lume*.tar.gz > checksums.txt - log "essential" "Package created successfully with checksums generated." -else - log "normal" "Creating checksums..." - shasum -a 256 lume*.tar.gz | tee checksums.txt -fi +# Show what we're publishing +ls -la *.tar.gz *.pkg.tar.gz popd > /dev/null