Skip to content

Commit f427284

Browse files
committed
doc: Detail configuration of hosted CI runners
1 parent 3f339e9 commit f427284

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

ci/README.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
## CI Scripts
1+
# CI Scripts
22

33
This directory contains scripts for each build step in each build stage.
44

5-
### Running a Stage Locally
5+
## Running a Stage Locally
66

77
Be aware that the tests will be built and run in-place, so please run at your own risk.
88
If the repository is not a fresh git clone, you might have to clean files from previous builds or test runs first.
@@ -27,7 +27,7 @@ with a specific configuration,
2727
env -i HOME="$HOME" PATH="$PATH" USER="$USER" bash -c 'FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh'
2828
```
2929

30-
### Configurations
30+
## Configurations
3131

3232
The test files (`FILE_ENV`) are constructed to test a wide range of
3333
configurations, rather than a single pass/fail. This helps to catch build
@@ -49,8 +49,32 @@ env -i HOME="$HOME" PATH="$PATH" USER="$USER" bash -c 'MAKEJOBS="-j1" FILE_ENV="
4949
The files starting with `0n` (`n` greater than 0) are the scripts that are run
5050
in order.
5151

52-
### Cache
52+
## Cache
5353

5454
In order to avoid rebuilding all dependencies for each build, the binaries are
5555
cached and reused when possible. Changes in the dependency-generator will
5656
trigger cache-invalidation and rebuilds as necessary.
57+
58+
## Configuring a repository for CI
59+
60+
### Primary repository
61+
62+
To configure the primary repository, follow these steps:
63+
64+
1. Register with [Cirrus Runners](https://cirrus-runners.app/) and purchase runners.
65+
2. Install the Cirrus Runners GitHub app against the GitHub organization.
66+
3. Enable organisation-level runners to be used in public repositories:
67+
1. `Org settings -> Actions -> Runner Groups -> Default -> Allow public repos`
68+
4. Permit the following actions to run:
69+
1. cirruslabs/cache/restore@\*
70+
1. cirruslabs/cache/save@\*
71+
1. docker/setup-buildx-action@\*
72+
1. actions/github-script@\*
73+
74+
### Forked repositories
75+
76+
When used in a fork the CI will run on GitHub's free hosted runners by default.
77+
In this case, due to GitHub's 10GB-per-repo cache size limitations caches will be frequently evicted and missed, but the workflows will run (slowly).
78+
79+
It is also possible to use your own Cirrus Runners in your own fork with an appropriate patch to the `REPO_USE_CIRRUS_RUNNERS` variable in ../.github/workflows/ci.yml
80+
NB that Cirrus Runners only work at an organisation level, therefore in order to use your own Cirrus Runners, *the fork must be within your own organisation*.

0 commit comments

Comments
 (0)