Skip to content

Commit bb19668

Browse files
committed
ci,nix: added nix flake check to ci
1 parent 887d70f commit bb19668

File tree

3 files changed

+31
-36
lines changed

3 files changed

+31
-36
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,15 @@ jobs:
8989
clang-tidy-18 --version
9090
CLANG_TIDY=clang-tidy-18 scripts/run-clang-tidy-cached.cc \
9191
|| ( cat fpga-assembler_clang-tidy.out ; exit 1)
92+
NixCheck:
93+
runs-on: ubuntu-latest
94+
steps:
95+
- uses: actions/checkout@v4
96+
- uses: cachix/install-nix-action@v25
97+
with:
98+
nix_path: nixpkgs=channel:nixos-unstable
99+
- run: |
100+
nix flake check
92101
NixBuild:
93102
runs-on: ubuntu-latest
94103
steps:

flake.lock

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

flake.nix

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,33 +44,24 @@
4444
programs.nixfmt.enable = true;
4545
};
4646
devShells.default =
47-
let
48-
# There is too much volatility between even micro-versions of
49-
# newer clang-format. Use slightly older version for now.
50-
clang_for_formatting = pkgs.llvmPackages_17.clang-tools;
51-
52-
# clang tidy: use latest.
53-
clang_for_tidy = pkgs.llvmPackages_18.clang-tools;
54-
in
5547
with pkgs;
56-
pkgs.mkShell {
57-
packages = with pkgs; [
48+
mkShell {
49+
packages = [
5850
git
5951
bazel_7
6052
jdk
6153
bash
6254
gdb
6355

6456
# For clang-tidy and clang-format.
65-
clang_for_formatting
66-
clang_for_tidy
57+
clang-tools
6758

6859
# For buildifier, buildozer.
6960
bazel-buildtools
7061
bant
7162

7263
# Profiling and sanitizers.
73-
linuxPackages_latest.perf
64+
perf
7465
pprof
7566
perf_data_converter
7667
valgrind
@@ -79,12 +70,8 @@
7970
openfpgaloader
8071
];
8172

82-
CLANG_TIDY = "${clang_for_tidy}/bin/clang-tidy";
83-
CLANG_FORMAT = "${clang_for_formatting}/bin/clang-format";
84-
85-
shellHook = ''
86-
exec bash
87-
'';
73+
CLANG_TIDY = "${clang-tools}/bin/clang-tidy";
74+
CLANG_FORMAT = "${clang-tools}/bin/clang-format";
8875
};
8976

9077
# Package fpga-assembler.
@@ -170,11 +157,10 @@
170157
# shebangs paths pointing to the store.
171158
deps = prev.deps.overrideAttrs (
172159
final: prev: {
173-
installPhase =
174-
''
175-
patchShebangs $bazelOut/external
176-
''
177-
+ prev.installPhase;
160+
installPhase = ''
161+
patchShebangs $bazelOut/external
162+
''
163+
+ prev.installPhase;
178164
}
179165
);
180166
}

0 commit comments

Comments
 (0)