ci: move CI scripting into Nushell scripts with separate dependency steps
Replace the shell wrappers build-and-push-to-cachix, check-conventional-commits and the release-plz apps with Nushell scripts in ci/, and move the git commands out of the workflow YAML, so that every workflow command is a plain nix call. Build the workspace dependencies in their own step, skipped when already in Cachix. Later steps import the exported paths and also run after an earlier failure. A separate step alone holds the Cachix token and uploads on main. Pull requests run the same steps without the upload. Wrap the recording tasks with makeBinaryWrapper instead of shell, and run the CI task tests in a step of their own.
This commit is contained in:
8 files changed
+338
-84
No files matched your search
+12
-3
@@ -9,6 +9,7 @@
|
||||
| `xtask/` | repository tasks run with `cargo xtask` |
|
||||
| `vm-tests/` | the sample NixOS machines, one folder each with its VM check |
|
||||
| `nix/` | the crane builds and the NixOS module |
|
||||
| `ci/` | the Nushell scripts behind the CI apps in `flake.nix` |
|
||||
| `recordings/` | ignored output of `record-screencasts`: the scripted demo GIFs and the sample machine WebP recordings, published on the `recordings` branch for the README and the [guide](guide.md) |
|
||||
|
||||
`cargo build` and `cargo test` act on every crate. `cargo run` needs the binary:
|
||||
@@ -46,9 +47,17 @@ shell) or `pre-commit install` ([pre-commit](https://pre-commit.com)).
|
||||
`.woodpecker/rust-and-flake-checks.yaml` runs on Codeberg's
|
||||
[Woodpecker CI](https://woodpecker-ci.org) for every push and pull request: the bootvine build with its tests, the xtask build, clippy,
|
||||
rustfmt, an evaluation of every flake output, and the commit-message check on
|
||||
pull requests. Builds on `main` are pushed to the `wvhulle` [Cachix](https://www.cachix.org) cache, which
|
||||
`nixConfig` in `flake.nix` offers as a substituter. The two VM checks need KVM,
|
||||
which Codeberg's runners lack, so they only run locally.
|
||||
pull requests. Every step is a plain `nix` call; the scripting lives in `ci/`
|
||||
and is tested by `nix build .#checks.x86_64-linux.ci-task-tests`.
|
||||
|
||||
Steps do not share `/nix/store`. The first step builds the workspace dependencies
|
||||
unless they are already in the `wvhulle` [Cachix](https://www.cachix.org) cache,
|
||||
which `nixConfig` in `flake.nix` offers as a substituter, and exports what it built
|
||||
to the workspace. The build and lint steps import those paths with
|
||||
`nix run .#import-exported-paths` and run even when an earlier step failed. On
|
||||
`main` a final step, the only one holding the Cachix token, pushes the exported
|
||||
paths with `nix run .#upload-exported-paths`. The two VM checks need KVM, which
|
||||
Codeberg's runners lack, so they only run locally.
|
||||
|
||||
## Releases
|
||||
|
||||
|
||||
Reference in new issue
Block a user