Skip to content

Commit 593a2a2

Browse files
committed
Revert "switch to buildbot"
This reverts commit d6ae2ad. I don't want to use buildbot when there is no good reason to. It makes it harder for others to work on the CI and makes it unfriendly for forks.
1 parent 3543137 commit 593a2a2

File tree

4 files changed

+76
-7
lines changed

4 files changed

+76
-7
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,57 @@ on:
55
merge_group:
66
push:
77
branches:
8+
- master
89
- main
910

1011
jobs:
12+
nix-matrix:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
matrix: ${{ steps.set-matrix.outputs.matrix }}
16+
steps:
17+
- uses: actions/checkout@v5
18+
- uses: cachix/install-nix-action@v31
19+
- id: set-matrix
20+
name: Generate Nix Matrix
21+
run: |
22+
set -Eeu
23+
echo "matrix=$(nix eval --json '.#githubActions.matrix')" >> "$GITHUB_OUTPUT"
24+
25+
nix-build:
26+
needs: nix-matrix
27+
runs-on: ${{ matrix.os }}
28+
strategy:
29+
matrix: ${{fromJSON(needs.nix-matrix.outputs.matrix)}}
30+
steps:
31+
- uses: actions/checkout@v5
32+
- uses: cachix/install-nix-action@v31
33+
- run: nix build -L ".#${{ matrix.attr }}"
34+
1135
nix-unit:
1236
runs-on: ubuntu-latest
1337
steps:
1438
- uses: actions/checkout@v5
1539
- name: Install Nix
40+
<<<<<<< HEAD:.github/workflows/ci.yml
1641
uses: cachix/install-nix-action@v31
1742
- uses: DeterminateSystems/magic-nix-cache-action@main
43+
=======
44+
uses: DeterminateSystems/nix-installer-action@v19
45+
- name: Build shell
46+
run: nix develop -c true
47+
>>>>>>> parent of d6ae2ad (switch to buildbot):.github/workflows/nix-github-actions.yml
1848
- name: Test nix-unit
1949
run: nix develop -c ./tests/tests.py
2050

51+
collect:
52+
runs-on: ubuntu-latest
53+
needs:
54+
- nix-build
55+
- nix-unit
56+
steps:
57+
- run: exit 0
58+
2159
deploy-pages:
2260
if: github.ref == 'refs/heads/main'
2361
runs-on: ubuntu-latest

flake.lock

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,37 @@
77
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
88
treefmt-nix.url = "github:numtide/treefmt-nix";
99
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
10+
nix-github-actions.url = "github:nix-community/nix-github-actions";
11+
nix-github-actions.inputs.nixpkgs.follows = "nixpkgs";
1012
};
1113

1214
outputs =
13-
inputs@{ flake-parts, ... }:
15+
inputs@{ flake-parts, nix-github-actions, ... }:
1416
let
1517
inherit (inputs.nixpkgs) lib;
1618
inherit (inputs) self;
1719
in
1820
flake-parts.lib.mkFlake { inherit inputs; } {
19-
systems = [
20-
"x86_64-linux"
21-
"aarch64-linux"
22-
"aarch64-darwin"
23-
"x86_64-darwin"
24-
];
21+
systems = inputs.nixpkgs.lib.systems.flakeExposed;
2522
imports = [
2623
inputs.flake-parts.flakeModules.modules
2724
inputs.flake-parts.flakeModules.partitions
2825
./lib/modules.nix
2926
./templates/flake-module.nix
3027
];
3128

29+
flake.githubActions = nix-github-actions.lib.mkGithubMatrix {
30+
checks = {
31+
x86_64-linux = builtins.removeAttrs (self.packages.x86_64-linux // self.checks.x86_64-linux) [
32+
"default"
33+
];
34+
x86_64-darwin = builtins.removeAttrs (self.packages.x86_64-darwin // self.checks.x86_64-darwin) [
35+
"default"
36+
"treefmt"
37+
];
38+
};
39+
};
40+
3241
flake.lib = import ./lib { inherit lib; };
3342

3443
perSystem =

0 commit comments

Comments
 (0)