nix/workflows/build: init #1

Open
raito wants to merge 1 commit from ci into main
Owner

This provides a basic CI setup using nix-actions in the sprinkles
formalism.

Signed-off-by: Raito Bezarius raito@afnix.fr

This provides a basic CI setup using nix-actions in the sprinkles formalism. Signed-off-by: Raito Bezarius <raito@afnix.fr>
This provides a basic CI setup using nix-actions in the sprinkles
formalism.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
@ -61,2 +62,3 @@
directory = ./shell;
loader = subdir: path: scope.callPackage path { };
loader = subdir: path: scope.callPackage path {
sprinkle = self;
Owner

Use inherit self preferrably

Use inherit self preferrably
Contributor

Personally I do like to do it this way so that the use-sites go through the name sprinkle which IMO is clearer about what's being referenced than self. Some examples in 285079fe13/nix/default.nix

Personally I do like to do it this way so that the use-sites go through the name `sprinkle` which IMO is clearer about what's being referenced than `self`. Some examples in https://gitlab.computer.surgery/charles/dotfiles/-/blob/285079fe13f56d39defcc54744a6b4abf994091e/nix/default.nix
@ -1,6 +1,16 @@
{
"version": "1",
"sources": {
"nix-actions": {
Owner

If you use https://git.afnix.fr/thubrecht/nix-actions it will be more up to date and is a sprinkle

If you use https://git.afnix.fr/thubrecht/nix-actions it will be more up to date and is a sprinkle
Author
Owner

Cool, on the note of sprinkles, I believe that we may need flakes interop if we start using them earnestly.

Cool, on the note of sprinkles, I believe that we may need flakes interop if we start using them earnestly.
Contributor

Yeah, that's a reasonable thing to want but not something I've spent much time thinking about how to design. Some experimentation out-of-tree of sprinkles is in order I think.

Yeah, that's a reasonable thing to want but not something I've spent much time thinking about how to design. Some experimentation out-of-tree of sprinkles is in order I think.
@ -14,5 +16,8 @@ mkShell {
nixfmt
reuse
treefmt
lon
Contributor

I might put the addition of lon in a separate commit to communicate intent but not a huge deal.

I might put the addition of lon in a separate commit to communicate intent but not a huge deal.
@ -63,2 +66,4 @@
}
);
workflows =
Contributor
      workflow =

The sprinkles convention is to use the singular form rather than the plural form, but I don't have a particularly strong opinion on this.

```suggestion workflow = ``` The sprinkles convention is to use the singular form rather than the plural form, but I don't have a *particularly* strong opinion on this.
@ -0,0 +1,6 @@
{
Contributor

You'll want to run engage as part of the workflow, as this repository already has an engage.toml with some basic checks in it. There's an example of how to do this (not with nix-actions) at https://git.afnix.fr/sprinkles/sprinkles/src/commit/ea4a98c94b55248f47088b894076e2bc1324729a/.forgejo/workflows/ci.yml. If you want to run the NixOS test, you can do nix build -f nix output.nixos-test.zulip or nix run -f nix output.nixos-test.zulip.driver for example. I would imagine that won't work in forgejo actions due to nested virtualization nonsense but I could be wrong.

You'll want to run `engage` as part of the workflow, as this repository already has an `engage.toml` with some basic checks in it. There's an example of how to do this (not with nix-actions) at <https://git.afnix.fr/sprinkles/sprinkles/src/commit/ea4a98c94b55248f47088b894076e2bc1324729a/.forgejo/workflows/ci.yml>. If you want to run the NixOS test, you can do `nix build -f nix output.nixos-test.zulip` or `nix run -f nix output.nixos-test.zulip.driver` for example. I would imagine that won't work in forgejo actions due to nested virtualization nonsense but I could be wrong.
Author
Owner

we have kvm on the forgejo actions :)

we have kvm on the forgejo actions :)
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin ci:ci
git switch ci

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff ci
git switch ci
git rebase main
git switch main
git merge --ff-only ci
git switch ci
git rebase main
git switch main
git merge --no-ff ci
git switch main
git merge --squash ci
git switch main
git merge --ff-only ci
git switch main
git merge ci
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: afnix/nix-zulip#1
No description provided.