Skip to content

Commit

Permalink
Add bench nix shell
Browse files Browse the repository at this point in the history
Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
  • Loading branch information
hanno-becker committed Oct 11, 2024
1 parent a0db362 commit f918717
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bench_ec2_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/bench
with:
nix-shell: ci
nix-shell: bench
name: ${{ inputs.name }}
cflags: ${{ inputs.cflags }}
archflags: ${{ inputs.archflags }}
Expand Down
17 changes: 15 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,24 @@
x86_64-gcc = wrap-gcc pkgs.pkgsCross.gnu64;
aarch64-gcc = wrap-gcc pkgs.pkgsCross.aarch64-multiplatform;

cross =
let
gcc_all =
if pkgs.stdenv.isDarwin
then [ ]
else [ aarch64-gcc x86_64-gcc ];
in
gcc_all;

core =
let
gcc =
if pkgs.stdenv.isDarwin
then [ ]
else [ x86_64-gcc aarch64-gcc ];
else if pkgs.stdenv.isAarch64
then [ aarch64-gcc ]
else
[ x86_64-gcc ];
in
gcc ++
builtins.attrValues {
Expand Down Expand Up @@ -83,7 +95,8 @@
};
};

devShells.ci = wrapShell pkgs.mkShellNoCC { packages = core; };
devShells.bench = wrapShell pkgs.mkShellNoCC { packages = core; };
devShells.ci = wrapShell pkgs.mkShellNoCC { packages = core ++ cross; };
devShells.ci-cbmc = wrapShell pkgs.mkShellNoCC { packages = core ++ cbmcpkg; };
devShells.ci-linter = wrapShell pkgs.mkShellNoCC { packages = linters; };
};
Expand Down

0 comments on commit f918717

Please sign in to comment.