This repository hosts a Continuous Integration (CI) configuration for testing Rust patches for the Linux kernel.
To submit a series of commits for testing on GitHub Actions, use the submit_ci.sh script.
- Submodule Setup: Ensure the
linuxsubmodule is initialized and updated.- The submodule must have a remote named
originthat you have permissions to push to.
- The submodule must have a remote named
- Parent Repo Setup: The parent repository must also have a remote named
originthat you have permissions to push to. - Pull Request: You must have an open Pull Request in this repository targeting your submission branch (typically from
ci/actions). This is necessary because the CI workflow is triggered onpull_requestevents. - Fixes Branch (Optional): If you have a local branch named
ci/base-fixesin thelinuxsubmodule, the script will automatically merge it into every commit you test.- This is useful for applying temporary fixes or backports required for the CI to pass.
- You can specify a different branch name using the
-fflag.
Run the script with either a single commit or a range of commits (start and end points in the submodule):
./submit_ci.sh [target-commit]
./submit_ci.sh [base-commit] [tip-commit]Example (single commit):
./submit_ci.sh b4/driver-typesExample (range):
./submit_ci.sh origin/master b4/driver-typesOptions:
-s <seconds>: Sleep for the specified number of seconds between pushing commits (useful for pacing CI runs). Default behavior is interactive (wait for Enter).-f <branch>: Specify a custom fixes branch to merge into each commit (defaults toci/base-fixesif it exists).
For each commit in the specified range:
- Checks out the commit in the
linuxsubmodule. - Merges
ci/base-fixesinto it. - Pushes the result to the
ci/fixesbranch in the submodule's remote. - Updates the parent repository to point to this new submodule state.
- Pushes the parent repository to the
ci/actionsbranch, triggering the GitHub Actions workflow.
The CI pipeline (.github/workflows/ci.yml) performs:
- Build: Builds the kernel with
LLVM=1andCLIPPY=1forx86_64,arm64,riscv, etc. - Test: Runs KUnit tests under QEMU for
x86_64andarm64. - Checkpatch: Runs
scripts/checkpatch.plon the commit. - Rustfmt: Checks code formatting using
make rustfmtcheck.