π OpenHands: AI-Driven Development
Fix CLI binary GLIBC compatibility for older Linux systems (#11337)
Rohit Malhotra609fefc1b69b
diff --git a/.github/workflows/cli-build-binary-and-optionally-release.yml b/.github/workflows/cli-build-binary-and-optionally-release.ymlindex 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: truejobs:- build-and-test-binary:- name: Build and test binary executable+ build-binary:+ name: Build binary executablestrategy: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-macosruns-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 artifactuses: actions/upload-artifact@v4with:- name: openhands-cli-${{ matrix.os }}+ name: ${{ matrix.artifact_name }}path: openhands-cli/dist/openhands*retention-days: 30create-github-release:name: Create GitHub Releaseruns-on: ubuntu-latest- needs: build-and-test-binary+ needs: build-binaryif: startsWith(github.ref, 'refs/tags/')steps:- name: Checkout repository@@ -88,12 +95,12 @@ jobs:- name: Prepare release assetsrun: |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-linuxfi- 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-macosfils -la release-assets/diff --git a/openhands-cli/build.py b/openhands-cli/build.pyindex 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 + 60saw_welcome = Falsecaptured = []diff --git a/openhands-cli/openhands_cli/agent_chat.py b/openhands-cli/openhands_cli/agent_chat.pyindex 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.