From 609fefc1b69b374d5169de1642e1a0adfc1ad5ac Mon Sep 17 00:00:00 2001 From: Rohit Malhotra Date: Mon, 13 Oct 2025 14:52:52 -0400 Subject: [PATCH] Fix CLI binary GLIBC compatibility for older Linux systems (#11337) Co-authored-by: openhands --- ...li-build-binary-and-optionally-release.yml | 31 ++++++++++++------- openhands-cli/build.py | 2 +- openhands-cli/openhands_cli/agent_chat.py | 1 + 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/.github/workflows/cli-build-binary-and-optionally-release.yml b/.github/workflows/cli-build-binary-and-optionally-release.yml index a3a236fa44..6c319bb67f 100644 --- a/.github/workflows/cli-build-binary-and-optionally-release.yml +++ b/.github/workflows/cli-build-binary-and-optionally-release.yml @@ -21,11 +21,19 @@ concurrency: cancel-in-progress: true jobs: - build-and-test-binary: - name: Build and test binary executable + build-binary: + name: Build binary executable strategy: matrix: - os: [ubuntu-latest, macos-latest] + include: + # Build on Ubuntu 22.04 for maximum GLIBC compatibility (GLIBC 2.31) + - os: ubuntu-22.04 + platform: linux + artifact_name: openhands-cli-linux + # Build on macOS for macOS users + - os: macos-15 + platform: macos + artifact_name: openhands-cli-macos runs-on: ${{ matrix.os }} steps: @@ -63,18 +71,17 @@ jobs: echo "✅ Build & test finished without ❌ markers" - - name: Upload binary artifact (for releases only) - if: startsWith(github.ref, 'refs/tags/') + - name: Upload binary artifact uses: actions/upload-artifact@v4 with: - name: openhands-cli-${{ matrix.os }} + name: ${{ matrix.artifact_name }} path: openhands-cli/dist/openhands* retention-days: 30 create-github-release: name: Create GitHub Release runs-on: ubuntu-latest - needs: build-and-test-binary + needs: build-binary if: startsWith(github.ref, 'refs/tags/') steps: - name: Checkout repository @@ -88,12 +95,12 @@ jobs: - name: Prepare release assets run: | mkdir -p release-assets - # Rename binaries to include OS in filename - if [ -f artifacts/openhands-cli-ubuntu-latest/openhands ]; then - cp artifacts/openhands-cli-ubuntu-latest/openhands release-assets/openhands-linux + # Copy binaries with appropriate names for release + if [ -f artifacts/openhands-cli-linux/openhands ]; then + cp artifacts/openhands-cli-linux/openhands release-assets/openhands-linux fi - if [ -f artifacts/openhands-cli-macos-latest/openhands ]; then - cp artifacts/openhands-cli-macos-latest/openhands release-assets/openhands-macos + if [ -f artifacts/openhands-cli-macos/openhands ]; then + cp artifacts/openhands-cli-macos/openhands release-assets/openhands-macos fi ls -la release-assets/ diff --git a/openhands-cli/build.py b/openhands-cli/build.py index 70b0e205cd..f4b3cd83b4 100755 --- a/openhands-cli/build.py +++ b/openhands-cli/build.py @@ -164,7 +164,7 @@ def test_executable() -> bool: ) # --- Wait for welcome --- - deadline = boot_start + 30 + deadline = boot_start + 60 saw_welcome = False captured = [] diff --git a/openhands-cli/openhands_cli/agent_chat.py b/openhands-cli/openhands_cli/agent_chat.py index 1e08f0ff16..b7fcaaf359 100644 --- a/openhands-cli/openhands_cli/agent_chat.py +++ b/openhands-cli/openhands_cli/agent_chat.py @@ -54,6 +54,7 @@ def _print_exit_hint(conversation_id: str) -> None: ) + def run_cli_entry(resume_conversation_id: str | None = None) -> None: """Run the agent chat session using the agent SDK.