Skip to content

chore: bump exoclaw to 0.30.2 #245

chore: bump exoclaw to 0.30.2

chore: bump exoclaw to 0.30.2 #245

Workflow file for this run

name: PR
on:
pull_request:
push:
branches: [main]
jobs:
# ── CPython matrix entry ────────────────────────────────────────────
cpython:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
- name: Install dependencies
run: uv sync --extra dev
- name: Check formatting
run: mise run check-format
- name: Lint
run: mise run lint
- name: Test
run: mise run test
# ── MicroPython matrix entry ────────────────────────────────────────
# Builds the unix port's ``coverage`` variant (gives us
# ``sys.settrace`` for line tracing), then runs the runner-driven
# test which executes ``tests/micro/test_compat.py`` under
# MicroPython and asserts ≥95% coverage on the lines reachable
# from that runtime.
micropython:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
- name: Install Python dependencies
run: uv sync --extra dev
- name: Cache MicroPython build
id: micropython-cache
uses: actions/cache@v4
with:
path: micropython-build/ports/unix/build-coverage/micropython
# Bump the version suffix when changing the build inputs
# (manifest patch, MP version pin, build flags). Stale
# caches from the pre-asyncio-patch era will silently miss
# ``import asyncio`` at runtime.
key: micropython-coverage-2026-04-v2-asyncio
- name: Install build deps
if: steps.micropython-cache.outputs.cache-hit != 'true'
run: |
sudo apt-get update
sudo apt-get install -y build-essential libffi-dev pkg-config
- name: Clone MicroPython
if: steps.micropython-cache.outputs.cache-hit != 'true'
run: git clone --depth 1 https://github.com/micropython/micropython micropython-build
- name: Patch coverage variant manifest to freeze in asyncio
if: steps.micropython-cache.outputs.cache-hit != 'true'
# The unix port's ``standard`` variant freezes in
# ``extmod/asyncio``; ``coverage`` does not. exoclaw's MP
# test rig + the agent loop both ``import asyncio`` so we
# need it available without a runtime ``mip install``.
# ``grep -q`` keeps the patch idempotent if the upstream
# manifest ever changes to include asyncio on its own.
run: |
MANIFEST=micropython-build/ports/unix/variants/coverage/manifest.py
if ! grep -q 'extmod/asyncio' "$MANIFEST"; then
echo 'include("$(MPY_DIR)/extmod/asyncio")' >> "$MANIFEST"
fi
- name: Build coverage variant
if: steps.micropython-cache.outputs.cache-hit != 'true'
working-directory: micropython-build/ports/unix
run: |
make submodules
make VARIANT=coverage -j$(nproc)
- name: Verify asyncio is importable
run: |
BIN="$GITHUB_WORKSPACE/micropython-build/ports/unix/build-coverage/micropython"
"$BIN" -c "import asyncio; print('asyncio OK:', asyncio.__name__)"
- name: Verify settrace support
run: |
BIN="$GITHUB_WORKSPACE/micropython-build/ports/unix/build-coverage/micropython"
"$BIN" -c "import sys; assert hasattr(sys, 'settrace'), 'settrace missing'; print('OK')"
- name: Run MicroPython matrix entry
env:
EXOCLAW_MICROPYTHON_BIN: ${{ github.workspace }}/micropython-build/ports/unix/build-coverage/micropython
run: uv run pytest tests/test_micropython_runner.py -v
# ── Aggregate gate ──────────────────────────────────────────────────
ci:
runs-on: ubuntu-latest
needs: [cpython, micropython]
if: always()
steps:
- name: Check all matrix entries passed
run: |
if [ "${{ needs.cpython.result }}" != "success" ] || \
[ "${{ needs.micropython.result }}" != "success" ]; then
echo "matrix entry failed: cpython=${{ needs.cpython.result }} micropython=${{ needs.micropython.result }}"
exit 1
fi