Skip to content

Commit 8d74f94

Browse files
committed
fixup: Add separate command for updating the nix flake
1 parent 102c62b commit 8d74f94

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ jobs:
251251
- uses: DeterminateSystems/nix-installer-action@786fff0690178f1234e4e1fe9b536e94f5433196 #v20
252252
- uses: DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39 #v13
253253
- name: Check that FFI flake is up-to-date
254-
run: ./run-just.sh check-ffi-flake-current
254+
run: ./run-just.sh check-ffi-flake
255255
- name: Test nix build of Golang FFI bindings
256256
run: ./run-just.sh test-ffi-nix
257257

ffi/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.24
44

55
// Changes to the toolchain version should be replicated in:
66
// - ffi/go.mod (here)
7-
// - ffi/flake.nix (update golang.url to a version of avalanchego's nix/go/flake.nix that uses the desired version and run `nix flake update golang`)
7+
// - ffi/flake.nix (update golang.url to a version of avalanchego's nix/go/flake.nix that uses the desired version and run `just update-ffi-flake`)
88
// - ffi/tests/eth/go.mod
99
// - ffi/tests/firewood/go.mod
1010
toolchain go1.24.9

justfile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,9 @@ check-clean-branch:
2121
git diff-index --quiet HEAD
2222

2323
# Check if the FFI flake (requires clean git tree)
24-
check-ffi-flake-current: check-nix
25-
#!/usr/bin/env bash
26-
set -euo pipefail
27-
cd ffi
28-
nix flake update golang
29-
../run-just.sh check-clean-branch
24+
check-ffi-flake: check-nix
25+
./run-just.sh update-check-ffi-flake
26+
./run-just.sh check-clean-branch
3027

3128
# Check if nix is installed
3229
check-nix:
@@ -76,3 +73,10 @@ test-ffi-nix-go-bindings: build-ffi-nix
7673
# - cgocheck2 is expensive but provides complete pointer checks
7774
# - use hash mode ethhash since the flake builds with `--features ethhash,logger`
7875
GOEXPERIMENT=cgocheck2 TEST_FIREWOOD_HASH_MODE=ethhash ${GO} test ./...
76+
77+
# Ensure the FFI flake is up-to-date
78+
update-check-ffi-flake: check-nix
79+
#!/usr/bin/env bash
80+
set -euo pipefail
81+
cd ffi
82+
nix flake update golang

0 commit comments

Comments
 (0)