File tree Expand file tree Collapse file tree 4 files changed +76
-7
lines changed
Expand file tree Collapse file tree 4 files changed +76
-7
lines changed Original file line number Diff line number Diff line change 1+ use flake
Original file line number Diff line number Diff line change 55 merge_group :
66 push :
77 branches :
8+ - master
89 - main
910
1011jobs :
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
Original file line number Diff line number Diff line change 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 =
You can’t perform that action at this time.
0 commit comments