Skip to content

Commit ca6bdef

Browse files
committed
ci: added nix build pipeline
1 parent 75ccc79 commit ca6bdef

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: ci
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
paths-ignore:
7+
- 'README.md'
8+
- 'wiki/**'
9+
10+
jobs:
11+
# Runs on PRs only to validate the build.
12+
# nixos/web.nix uses buildGoModule which compiles the Go binary (no separate build job needed)
13+
# and runs `go test -short` via doCheck = true (no separate test job needed).
14+
build:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 15
17+
permissions:
18+
contents: read
19+
20+
steps:
21+
- uses: actions/checkout@v6
22+
23+
- name: Install Nix
24+
uses: cachix/install-nix-action@v31
25+
with:
26+
extra_nix_config: |
27+
experimental-features = nix-command flakes
28+
29+
- name: Cache Nix store
30+
uses: nix-community/cache-nix-action@v7
31+
with:
32+
primary-key: nix-${{ runner.os }}-${{ hashFiles('flake.lock', '**/*.nix', '**/*.go') }}
33+
restore-prefixes-first-match: nix-${{ runner.os }}-
34+
gc-max-store-size-linux: 5368709120 # 5 GB
35+
36+
- name: Build NixOS configuration
37+
run: nix build

0 commit comments

Comments
 (0)