mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-10 07:18:10 -05:00
Co-authored-by: openhands <openhands@all-hands.dev> Co-authored-by: Xingyao Wang <xingyao@all-hands.dev>
59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
# Workflow that builds and tests the CLI binary executable
|
|
name: CLI - Build and Test Binary
|
|
|
|
# Run on pushes to main branch and all pull requests, but only when CLI files change
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "openhands-cli/**"
|
|
pull_request:
|
|
paths:
|
|
- "openhands-cli/**"
|
|
|
|
# Cancel previous runs if a new commit is pushed
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ (github.head_ref && github.ref) || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build-and-test-binary:
|
|
name: Build and test binary executable
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: 3.12
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v3
|
|
with:
|
|
version: "latest"
|
|
|
|
- name: Install dependencies
|
|
working-directory: openhands-cli
|
|
run: |
|
|
uv sync
|
|
|
|
- name: Build binary executable
|
|
working-directory: openhands-cli
|
|
run: |
|
|
./build.sh --install-pyinstaller | tee output.log
|
|
echo "Full output:"
|
|
cat output.log
|
|
|
|
if grep -q "❌" output.log; then
|
|
echo "❌ Found failure marker in output"
|
|
exit 1
|
|
fi
|
|
|
|
echo "✅ Build & test finished without ❌ markers"
|