The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
ci(ex63): run lanes sequentially on the self-hosted runner
Steven Enamakel4b7290ee8b7c
diff --git a/.github/workflows/ci-lanes.yml b/.github/workflows/ci-lanes.ymlindex a91809834b..13bdc6544a 100644--- a/.github/workflows/ci-lanes.yml+++ b/.github/workflows/ci-lanes.yml@@ -7,9 +7,9 @@# with changed-line coverage enforced at >= 80% by the same diff-cover gate.## ex63 one job on one throwaway Firecracker microVM (runner group-# `openhuman-ex63`, host code in tinyhumansai/gh-hosted-runner). All-# lanes run at once; target dirs live on the per-job scratch disk;-# sccache, cargo and pnpm caches live on a 10 GB capped cache disk.+# `openhuman-ex63`, host code in tinyhumansai/gh-hosted-runner). Lanes+# run sequentially and reuse compatible target dirs under target/.+# Tinymold uses the signed remote store; package caches stay on /cache.# hosted the same lanes split over a few GitHub-hosted jobs sized to fit# those runners, with GitHub's Actions cache.#@@ -44,32 +44,34 @@ jobs:ex63:name: CI Fast (EX63)if: inputs.profile == 'ex63'- runs-on: [self-hosted, openhuman-ex63]+ runs-on:+ group: openhuman-ex63+ labels: [self-hosted, openhuman-ex63]timeout-minutes: 120steps:- name: Checkout PR merge commit- uses: actions/checkout@v7+ uses: tinyhumansai/.github/actions/checkout@9d94105e7e81801ac3dc5f8d6535282165669cd9with:- repository: ${{ github.repository }}ref: refs/pull/${{ inputs.pr-number }}/merge- # Full history: the module-pin monotonicity check and diff-cover- # both compare against the base branch.fetch-depth: 0- # Submodules come from the step below: only the ones a build reads,- # fetched in parallel (checkout fetches every nested one serially).- submodules: false+ submodules: recursive+ exclude-submodules: wikipersist-credentials: false- # Deliberate. This job only runs when ci-fast.yml's route job (run- # from main, never from the PR) found the PR author and pusher to be- # org members, and only on the `openhuman-ex63` runner group, which- # admits nothing but ci-fast.yml / ci-lanes.yml at refs/heads/main.- # The token is read-only, no secrets reach this job, and each job- # runs in a throwaway microVM whose supervisor re-checks membership.- # Without the opt-in, checkout@v7 refuses every fork PR here.- allow-unsafe-pr-checkout: true- - name: Check out submodules- run: bash scripts/ci/checkout-submodules.sh+ - name: Verify private runner contract+ run: bash scripts/ci/self-hosted/verify-runner.sh++ - name: Setup Tinymold+ id: tinymold+ uses: tinyhumansai/tinymold@b7c4c26f184acdbf7133487b158062fc610d2f28+ with:+ install: none+ backend: remote+ store: /scratch/tinymold+ remote-url: ${{ env.TINYMOLD_REMOTE_URL }}+ remote-auth: ${{ env.TINYMOLD_REMOTE_AUTH }}+ remote-signing-key: ${{ env.TINYMOLD_REMOTE_SIGNING_KEY }}+ remote-trusted-keys: ${{ env.TINYMOLD_REMOTE_TRUSTED_KEYS }}- name: Detect changed areasid: filter@@ -78,45 +80,8 @@ jobs:filters: .github/ci-paths-filter.ymlbase: ${{ inputs.base-ref }}- - name: Install jq for release-script tests- if: steps.filter.outputs.scripts == 'true'- env:- JQ_URL: https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-amd64- JQ_SHA256: 5942c9b0934e510ee61eb3e30273f1b3fe2590df93933a93d7c58b81d19c8ff5- run: |- if command -v jq >/dev/null; then- exit 0- fi- if [ "$(uname -m)" != "x86_64" ]; then- echo "::error::no jq on this runner and no pinned build for $(uname -m)"- exit 1- fi- bin="$RUNNER_TEMP/jq-bin"- mkdir -p "$bin"- curl -fsSL --retry 3 -o "$bin/jq" "$JQ_URL"- echo "$JQ_SHA256 $bin/jq" | sha256sum -c -- chmod +x "$bin/jq"- "$bin/jq" --version- echo "$bin" >> "$GITHUB_PATH"-- # One step per lane: `Start lanes` launches every lane in the background- # (they still run in parallel); each `Lane:` step streams its own lane's- # log live and passes or fails on that lane alone; `Lane summary` waits- # for the whole run and carries the overall result. `!cancelled()` keeps- # a red lane from hiding the lanes after it.- # The embed-consumer bootstrap uses stdlib tomllib (Python >= 3.11).- # Both runner profiles must use the same interpreter before spawning lanes.- # It is handed to the lanes explicitly (OPENHUMAN_CI_PYTHON) rather than- # exported: an exported toolcache PATH/LD_LIBRARY_PATH leaks into the- # Rust tests, whose agent shell keeps PATH but not LD_LIBRARY_PATH, so a- # PATH-resolved python3 then cannot load libpython.- - name: Setup Python for lanes- id: python- uses: actions/setup-python@v6- with:- python-version: "3.12"- update-environment: false-+ # The guest contract supplies Python >= 3.11 and jq. Lanes continue+ # independently after failures, in order within this single private job.- name: Start lanesid: lanesenv:@@ -130,7 +95,6 @@ jobs:CI_AREA_TOOLCHAIN_IMAGE: ${{ steps.filter.outputs['toolchain-image'] }}CI_AREA_INSTALL_PS1: ${{ steps.filter.outputs.install_ps1 }}CI_AREA_STORAGE: ${{ steps.filter.outputs.storage }}- OPENHUMAN_CI_PYTHON: ${{ steps.python.outputs.python-path }}run: node scripts/ci/self-hosted/lanes.mjs --profile ex63 --detach- name: "Lane: static checks"@@ -183,6 +147,11 @@ jobs:steps.filter.outputs['rust-tauri'] == 'true')run: bash scripts/ci/self-hosted/diff-cover.sh ci-out/lcov "origin/${{ inputs.base-ref }}" ci-out/diff-cover+ - name: Save Tinymold cache+ if: ${{ always() && steps.tinymold.outcome == 'success' }}+ continue-on-error: true+ uses: tinyhumansai/tinymold/save@b7c4c26f184acdbf7133487b158062fc610d2f28+- name: Upload lane logs, timings and coverageif: always()uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7diff --git a/scripts/ci/self-hosted/guest-image.txt b/scripts/ci/self-hosted/guest-image.txtnew file mode 100644index 0000000000..b1aa64e19b--- /dev/null+++ b/scripts/ci/self-hosted/guest-image.txt@@ -0,0 +1 @@+ghcr.io/tinyhumansai/rust_ci@sha256:0ac1040c4fc37437e0ebbdc203eef81f34a7e125de93e4fca03c42aadb5579c8diff --git a/scripts/ci/self-hosted/verify-runner.sh b/scripts/ci/self-hosted/verify-runner.shnew file mode 100644index 0000000000..ede1ff4873--- /dev/null+++ b/scripts/ci/self-hosted/verify-runner.sh@@ -0,0 +1,42 @@+#!/usr/bin/env bash+# Fail closed on stale guests. Never install or silently select another compiler.+set -euo pipefail+root="$(cd "$(dirname "$0")/../../.." && pwd)"+image="$(cat "$root/scripts/ci/self-hosted/guest-image.txt")"+metadata="${CI_IMAGE_BUILD_INFO:-/etc/ohci/build-info}"+if [[ ! "$image" =~ ^ghcr.io/tinyhumansai/rust_ci@sha256:[0-9a-f]{64}$ ]] ||+ [[ ! -r "$metadata" ]] || ! grep -Fxq "digest=${image##*@}" "$metadata"; then+ echo '::error::Private guest image metadata is missing or does not match guest-image.txt' >&2+ exit 1+fi+echo "[ci][guest] verified $image"+[[ "${1:-}" != image ]] || exit 0++for tool in rustup cargo rustc clang readelf tinymold python3 node pnpm jq; do+ command -v "$tool" >/dev/null || { echo "::error::Missing preinstalled tool: $tool" >&2; exit 1; }+done+linker=/usr/local/bin/rust-mold-linker+[[ -x "$linker" && -x /opt/mold/bin/mold ]] || { echo '::error::Missing pinned mold linker' >&2; exit 1; }+channel="$(python3 -c 'import tomllib,sys; print(tomllib.load(open(sys.argv[1], "rb"))["toolchain"]["channel"])' "$root/rust-toolchain.toml")"+# rustup run --install is deliberately absent: an image without this toolchain fails.+rustup run "$channel" rustc --version+rustup run "$channel" cargo clippy --version+rustup run "$channel" cargo fmt --version+rustup run "$channel" cargo nextest --version+rustup run "$channel" cargo llvm-cov --version+python3 -c 'import sys,tomllib; assert sys.version_info >= (3,11)'+tinymold --version+/opt/mold/bin/mold --version+for key in TINYMOLD_REMOTE_URL TINYMOLD_REMOTE_AUTH TINYMOLD_REMOTE_SIGNING_KEY TINYMOLD_REMOTE_TRUSTED_KEYS; do+ [[ -n "${!key:-}" ]] || { echo "::error::Guest lacks signed cache configuration: $key" >&2; exit 1; }+ [[ "${!key}" != *$'\n'* && "${!key}" != *$'\r'* ]] || exit 1+ # The supervisor supplies credentials through MMDS. Publish only into the+ # runner's masked environment, so the action needs no repository secrets.+ printf '::add-mask::%s\n' "${!key}"+ printf '%s=%s\n' "$key" "${!key}" >> "$GITHUB_ENV"+done+{+ echo "RUSTUP_TOOLCHAIN=$channel"+ echo "CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=$linker"+ echo "OPENHUMAN_CI_PYTHON=$(command -v python3)"+} >> "$GITHUB_ENV"