Skip to content

Commit 441c72e

Browse files
committed
Fix benchmarks on linux
1 parent 0a1335e commit 441c72e

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

.github/workflows/build-template.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,9 @@ jobs:
246246
make -C build -j$NPROC check-stage3
247247
if: matrix.check-stage3
248248
- name: Test Benchmarks
249-
run: nix shell github:Kha/lakeprof -c make -C build -j$NPROC bench
249+
run: |
250+
cd tests
251+
nix develop -c make -C ../build -j$NPROC bench
250252
if: matrix.test-bench
251253
- name: Check rebootstrap
252254
run: |

tests/flake.nix

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
3+
4+
inputs.lakeprof.url = "github:Kha/lakeprof";
5+
inputs.lakeprof.inputs.nixpkgs.follows = "nixpkgs";
6+
7+
outputs =
8+
inputs:
9+
let
10+
lib = inputs.nixpkgs.lib;
11+
forAllSystems = lib.genAttrs lib.systems.flakeExposed;
12+
in
13+
{
14+
devShells = forAllSystems (
15+
system:
16+
let
17+
pkgs = inputs.nixpkgs.legacyPackages.${system};
18+
lakeprof = inputs.lakeprof.packages.${system}.default;
19+
in
20+
{
21+
default = pkgs.mkShellNoCC {
22+
packages = [ lakeprof ] ++ lib.optional pkgs.stdenv.isLinux pkgs.perf;
23+
};
24+
}
25+
);
26+
};
27+
}

0 commit comments

Comments
 (0)