Skip to content

Commit b09b143

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

File tree

3 files changed

+27
-33
lines changed

3 files changed

+27
-33
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: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -43,34 +43,23 @@
4343
programs.yamlfmt.enable = true;
4444
programs.nixfmt.enable = true;
4545
};
46-
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
55-
with pkgs;
56-
pkgs.mkShell {
57-
packages = with pkgs; [
46+
devShells.default = with pkgs; mkShell {
47+
packages = [
5848
git
5949
bazel_7
6050
jdk
6151
bash
6252
gdb
6353

6454
# For clang-tidy and clang-format.
65-
clang_for_formatting
66-
clang_for_tidy
55+
clang-tools
6756

6857
# For buildifier, buildozer.
6958
bazel-buildtools
7059
bant
7160

7261
# Profiling and sanitizers.
73-
linuxPackages_latest.perf
62+
perf
7463
pprof
7564
perf_data_converter
7665
valgrind
@@ -79,12 +68,8 @@
7968
openfpgaloader
8069
];
8170

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-
'';
71+
CLANG_TIDY = "${clang-tools}/bin/clang-tidy";
72+
CLANG_FORMAT = "${clang-tools}/bin/clang-format";
8873
};
8974

9075
# Package fpga-assembler.

0 commit comments

Comments
 (0)