GitHub Actions self-hosted runner¶
To run libremesh-tests workflows on the lab host, we installed a GitHub Actions self-hosted runner. Daily, Healthcheck, and Pull Request jobs run on this hardware instead of GitHub-hosted or third-party runners. This is on overview of the steps to set up a function runner for the testbed.
1. Requirements¶
- GitHub account/repo (e.g.
francoriba/libremesh-testsor the relevant org). - SSH access to the lab host.
2. Installation¶
-
Download the runner from GitHub Actions Runner (Linux x64).
-
In the repo: Settings → Actions → Runners → New self-hosted runner. Copy the configure command.
-
On the lab host:
mkdir -p ~/actions-runner && cd ~/actions-runner
# Download the .tar.gz from the release, extract
./config.sh --url https://github.com/OWNER/REPO --token TOKEN
- During setup:
- Runner name: e.g.
runner-fcefynorlabgrid-fcefyn -
Additional labels: e.g.
testbed-fcefyn(forruns-on: [self-hosted, testbed-fcefyn]in workflows) -
Install and start the service:
sudo ./svc.sh install
sudo ./svc.sh start
3. Verification¶
sudo systemctl status actions.runner.*
In GitHub, the runner should show Idle under Settings → Actions → Runners.
4. Permissions on /etc/labgrid¶
The Labgrid coordinator writes under /etc/labgrid (place/resource state). Wrong permissions cause PermissionError on save. The libremesh-tests playbook should create /etc/labgrid with owner: labgrid-dev and group: labgrid-dev. To fix manually:
sudo chown -R labgrid-dev:labgrid-dev /etc/labgrid
sudo systemctl restart labgrid-coordinator
5. Move runner to another repo (if needed)¶
To move the runner from one repo to another (or user to org):
- On host:
./config.sh remove --token TOKEN(token from current repo/org UI). - In new repo/org: New self-hosted runner → copy the new command.
- Run
./config.shwith new URL and token. sudo ./svc.sh uninstallthensudo ./svc.sh install+sudo ./svc.sh start.
6. Ownership transfer (if needed in near future)¶
When the repo transfers to an org, attached runners move with it. The systemd service name may still reference the old owner; this should not affect operation.