CI
A hosted runner has a handful of cores and a few gigabytes. Your pool has more. Keep the workflow where it is and send the expensive step to the pool.
From a hosted runner
The workflow stays on GitHub's runners and only the command moves. Checkout, caching and reporting work as before; the step that compiles or solves runs on a pool machine, streams its output into the job log, and fails the step with its own exit code.
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
env:
FALLLOW_SERVER: https://app.falllow.com
FALLLOW_TOKEN: ${{ secrets.FALLLOW_TOKEN }}
steps:
- uses: actions/checkout@v7
- run: pipx install "git+https://github.com/milanofthe/falllow#subdirectory=cli"
# the heavy part, on the pool
- run: falllow run --cpu 16 --memory 32G -- cargo test --workspace --releaseOne secret makes this work: FALLLOW_TOKEN, a token for the server.
With FALLLOW_SERVER beside it in the environment, no falllow login is
needed and no credential is written to the runner's disk. Give CI a consumer of its own (Admin,
Access in the manager) rather than the admin token, so it can be revoked without locking you out.
A cancelled workflow interrupts the step, and falllow run treats SIGINT and SIGTERM
alike: it detaches, exits 130, and the run goes on in the pool. Runs from CI are tagged with the runner's host name
and the repository's directory like any other, and a label such as --tag ci=$GITHUB_RUN_ID lets a later step, or an if: cancelled() step,
find them with falllow ps --tag or stop them with falllow cancel --tag.
The checkout on the runner is what gets shipped, exactly as it is. Pull requests need nothing special: the merge commit GitHub checks out is a directory like any other.
When the pool fails, not the tests
Exit code 170 means the job did not get to a verdict: the machine
was lost, nothing was free in time, or the server could not be reached. That is the one case where running it again can give a
different answer, so it is the only one worth retrying.
code=0
falllow run -- cargo test --workspace || code=$?
if [ $code -eq 170 ]; then
falllow run -- cargo test --workspace # the second verdict is the step's
else
exit $code
fiA runner on a pool machine
For workflows that should run entirely on your hardware, register a GitHub self-hosted runner on a
machine in the fleet and target it with runs-on: self-hosted. The runner and the
pool's jobs share that machine, so cap the runner's cores and leave the machine's blocks for
dstack. This is GitHub's own runner, nothing falllow reimplements.