Skip to content

Commit 6319cb6

Browse files
committed
Add Nix CI job
1 parent e28dc41 commit 6319cb6

File tree

2 files changed

+31
-8
lines changed

2 files changed

+31
-8
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
ubuntu:
9-
name: Build, Test, and Lint on Ubuntu
9+
name: Build and Test on Ubuntu
1010
runs-on: ubuntu-latest
1111

1212
steps:
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up Go
1616
uses: actions/setup-go@v5
1717
with:
18-
go-version: '1.23'
18+
go-version: '1.23.3'
1919

2020
- name: Install Boost library
2121
run: |
@@ -31,11 +31,6 @@ jobs:
3131
- name: Run tests
3232
run: make test
3333

34-
- name: Run linter
35-
uses: golangci/golangci-lint-action@v9
36-
with:
37-
version: v2.6.1
38-
3934
macos:
4035
name: Build and Test on macOS
4136
runs-on: macos-latest
@@ -96,3 +91,31 @@ jobs:
9691

9792
- name: Run tests
9893
run: make test
94+
95+
nix:
96+
name: Build, Test, and Lint with Nix (Ubuntu)
97+
runs-on: ubuntu-latest
98+
99+
steps:
100+
- uses: actions/checkout@v4
101+
102+
- name: Install Nix
103+
uses: DeterminateSystems/nix-installer-action@main
104+
105+
- name: Setup Nix Cache
106+
uses: DeterminateSystems/magic-nix-cache-action@main
107+
108+
- name: Check flake
109+
run: nix flake check --show-trace
110+
111+
- name: Build Kernel
112+
run: nix develop --command make build-kernel
113+
114+
- name: Build
115+
run: nix develop --command make build
116+
117+
- name: Run tests
118+
run: nix develop --command make test
119+
120+
- name: Run linter
121+
run: nix develop --command make lint

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ lint:
4343
golangci-lint run ./...
4444

4545
deps:
46-
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.6.1
46+
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6
4747

4848
update-kernel:
4949
git subtree pull --prefix=depend/bitcoin https://github.com/bitcoin/bitcoin.git master --squash

0 commit comments

Comments
 (0)