Repository navigation
tools: ci-local --linux-host runs the ubuntu jobs on a Linux build host - #259
Merged
Merged
Conversation
`tools/ci-local.sh --linux-host` sends every job whose runs-on is ubuntu (apps services and kernel-security, rom) to the Linux build host configured in ~/.config/octosense/build.env, over ssh, while the macOS jobs run on the Mac. It also adds the Linux-only checks no workflow runs: the process sandbox's Landlock and seccomp tests (linux-host / sandbox), which come with any run of a workflow a shell change triggers. - The exact commit goes to the host as an incremental git bundle and is checked out as ~/octosense-ci/runs/<sha>-<ts> (newest five kept); the host runs tools/setup.py itself from the same locks, with hub clones under ~/octosense-ci/cache/hub. - The host runs that checkout's ci_local.py: the same run: steps from the same workflow files, one worker per job in parallel, each with its own cargo target per slot; at most 4 runs share the host (mkdir locks there), separate from the Mac's 2 slots. - Remote steps get an allow-listed environment (no tokens), run as the ssh user in ~/octosense-ci only, and the host's address and key path are kept out of logs and last.json. - Remote steps join the table and last.json marked host: linux with the sha the host checked out; a result for another commit, a missing result or an unreachable host is a FAIL. ci-local-merge.sh accepts remote passes on the PR head and refuses stale remote results. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Local CI passed on b904bdd ( GitHub would run for this PR: desktop.yml, phone.yml. Merged on this local pass (macOS runner queue); GitHub CI runs on the merge commit on main.
Notes:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tools/ci-local.sh --linux-hostruns every job whoseruns-onis ubuntu (appsservicesandkernel-security, rom) on the Linux build host configured in~/.config/octosense/build.env, over ssh, while the macOS jobs keep running on the Mac. It also adds a Linux-only job no workflow runs: the process sandbox's Landlock and seccomp tests (linux-host / sandbox:cargo test --locked -p octosense-shell --lib sandbox::). It comes with any run of a workflow that a change to the shell triggers. Until now those tests have never run (G6 #156, #199, #202, and the Linux part of #178).How it works
~/octosense-ci/repo.git. It is checked out as~/octosense-ci/runs/<sha>-<ts>, and the newest five runs are kept. The host runstools/setup.pyitself from the same lock files, with hub clones in~/octosense-ci/cache/hub.tools/ci_local.py, so therun:steps come from the same workflow files. Each job gets its own worker, and the workers run in parallel, each with its own cargo target per slot. At most 4 runs share the host, through mkdir locks there; this is separate from the Mac's 2 slots.(linux), andlast.json, with"host": "linux"and the sha the host checked out. An unreachable host, a missing result or a result for another commit is a FAIL, never a pass.ci-local-merge.shaccepts remote passes on the PR head and refuses stale remote results.~/octosense-cionly, never with sudo. Remote steps get an allow-listed environment: no tokens, nothing from the Mac. The host's address and key path are scrubbed from the log andlast.json.Verified
tools/ci-local.sh --only apps --linux-hoston main 57dc05d plus this commit:#[cfg(target_os = "linux")]test: Landlock grant splitting, the seccomp ABI and network rules, a program reached through a link, the read-only build inputs, and the jail.without_landlock_...skips itself because the kernel has Landlock, as designed.python3 -m unittest discover -s tools -p 'test_*.py'passes, and so does--check-drift. The new tests cover step selection perruns-on, the merge of remote results intolast.json, the stale-sha refusal inci-local-merge, the scrubbing of the host and key, and the env allow-list.Not merged here; this goes through the merge captain.
🤖 Generated with Claude Code