Track SemVer releases and deduplicate CI runs #5
No files matched your search
@@ -2,6 +2,7 @@ name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
@@ -18,7 +19,7 @@ jobs:
|
||||
extra-conf: |
|
||||
sandbox-fallback = false
|
||||
|
||||
# Builds the package with its tests, clippy, rustfmt and the VM test (which needs KVM), and
|
||||
# evaluates the other outputs
|
||||
# Builds the package with its tests, runs clippy, rustfmt, shellcheck and the VM test
|
||||
# (which needs KVM), and evaluates the other outputs
|
||||
- name: Check the flake
|
||||
run: nix flake check -L
|
||||
@@ -39,7 +39,8 @@ of devenv's scripts, `devenv test` or the demo's host side.
|
||||
errors) and the tests.
|
||||
- `cargo fmt` — the crate is formatted with `rustfmt` (`rustfmt.toml`); run it on code you change.
|
||||
- `nix build` — the package, which also runs the tests.
|
||||
- CI ([`.gitea/workflows/ci.yaml`](.gitea/workflows/ci.yaml)) runs `nix flake check` on every push:
|
||||
- CI ([`.gitea/workflows/ci.yaml`](.gitea/workflows/ci.yaml)) runs `nix flake check` for pull
|
||||
requests and pushes to `main`:
|
||||
the package with its tests, `clippy` (warnings as errors), `fmt` (`cargo fmt --check`),
|
||||
`shellcheck` on `src/**/*.sh` and the VM test. Keep them passing. `nix flake check --no-build`
|
||||
fails where the VM test's keys haven't been built, because the test reads them at evaluation.
|
||||
|
||||
@@ -45,6 +45,20 @@ The development environment is [devenv](https://devenv.sh): direnv with `.envrc`
|
||||
and `cargo clippy --all-targets` work there, `devenv test` runs both, and `vm-test` runs the NixOS
|
||||
VM test (needs KVM). See [`AGENTS.md`](AGENTS.md) for conventions.
|
||||
|
||||
## Releasing
|
||||
|
||||
Use SemVer for the CLI, request protocol and Nix module options. Bump the patch for
|
||||
compatible fixes and the minor for compatible features. While the major is zero,
|
||||
use a minor bump for breaking changes and document how to upgrade. After `1.0.0`,
|
||||
bump the major for breaking changes.
|
||||
|
||||
1. Set `package.version` in `Cargo.toml` and run `cargo check` to refresh
|
||||
`Cargo.lock`. The Nix package reads the version from `Cargo.toml`.
|
||||
2. After the release commit lands on `main` and passes CI, tag it `v<version>` and
|
||||
push the tag. Keep published tags fixed.
|
||||
3. Update the `slop-broker` input in nixfiles to `ref=refs/tags/v<version>` and run
|
||||
`nix flake update slop-broker` there to refresh its lock entry.
|
||||
|
||||
## License
|
||||
|
||||
MIT; see [`LICENSE`](LICENSE).
|
||||
+1
-1
@@ -4,7 +4,7 @@ let
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "slop-broker";
|
||||
version = "0.1.0";
|
||||
inherit ((builtins.fromTOML (builtins.readFile ../Cargo.toml)).package) version;
|
||||
|
||||
src = toSource {
|
||||
root = ../.;
|
||||
|
||||
Reference in new issue
Block a user