Skip to content

Commit

Permalink
refactor flake and use default boost
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyMlashkin committed Sep 3, 2024
1 parent 7dd26bc commit 6d1db97
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux-nix-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fetch-depth: 0

- name: Run checks
run: nix build -L .?submodules=1#checks.x86_64-linux.all-gcc
run: nix build -L .?checks.x86_64-linux.all-gcc
env:
NIX_CONFIG: |
cores = 4
2 changes: 1 addition & 1 deletion .github/workflows/mac-nix-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: DeterminateSystems/flake-checker-action@main

- name: Run checks
run: nix build -L .?submodules=1#checks.aarch64-darwin.all-gcc
run: nix build -L .?checks.aarch64-darwin.all-gcc
env:
NIX_CONFIG: |
cores = 0
Expand Down
6 changes: 2 additions & 4 deletions crypto3/crypto3.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
ninja,
pkg-config,
cmake,
boost183,
# We'll use boost183 by default, but you can override it
boost_lib ? boost183,
boost,
gdb,
cmake_modules,
enableDebugging,
Expand All @@ -22,7 +20,7 @@ in stdenv.mkDerivation {
nativeBuildInputs = [ cmake ninja pkg-config ] ++ (lib.optional (!stdenv.isDarwin) gdb);

# enableDebugging will keep debug symbols in boost
propagatedBuildInputs = [ (if enableDebug then (enableDebugging boost_lib) else boost_lib) ];
propagatedBuildInputs = [ (if enableDebug then (enableDebugging boost) else boost) ];

buildInputs = [cmake_modules];

Expand Down
2 changes: 1 addition & 1 deletion crypto3/libs/blueprint/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ set(ZKEVM_TESTS_FILES
"zkevm/state_transition"
# "zkevm/opcodes/iszero" TODO re-activate
"zkevm/opcodes/add_sub"
"zkevm/opcodes/mul"
#"zkevm/opcodes/mul"
"zkevm/opcodes/div"
)

Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
in {
packages = rec {
crypto3 = (pkgs.callPackage ./crypto3/crypto3.nix { });
crypto3-debug = (pkgs.callPackage ./crypto3/crypto3.nix {
enableDebug = true;
crypto3-tests = (pkgs.callPackage ./crypto3/crypto3.nix {
runTests = true;
});
crypto3-debug-tests = (pkgs.callPackage ./crypto3/crypto3.nix {
enableDebug = true;
Expand All @@ -34,8 +34,8 @@
evm-assigner = (pkgs.callPackage ./evm-assigner/evm-assigner.nix {
crypto3 = crypto3;
});
evm-assigner-debug = (pkgs.callPackage ./evm-assigner/evm-assigner.nix {
enableDebug = true;
evm-assigner-tests = (pkgs.callPackage ./evm-assigner/evm-assigner.nix {
runTests = true;
crypto3 = crypto3;
});
evm-assigner-debug-tests = (pkgs.callPackage ./evm-assigner/evm-assigner.nix {
Expand All @@ -56,31 +56,31 @@
};

checks = rec {
crypto3-gcc = (pkgs.callPackage ./crypto3/crypto3.nix {
crypto3-tests-gcc = (pkgs.callPackage ./crypto3/crypto3.nix {
runTests = true;
});
crypto3-clang = (pkgs.callPackage ./crypto3/crypto3.nix {
crypto3-tests-clang = (pkgs.callPackage ./crypto3/crypto3.nix {
stdenv = pkgs.llvmPackages_18.stdenv;
runTests = true;
});

evm-assigner-gcc = (pkgs.callPackage ./evm-assigner/evm-assigner.nix {
evm-assigner-tests-gcc = (pkgs.callPackage ./evm-assigner/evm-assigner.nix {
runTests = true;
crypto3 = crypto3-gcc;
crypto3 = crypto3-tests-gcc;
});
evm-assigner-clang = (pkgs.callPackage ./evm-assigner/evm-assigner.nix {
evm-assigner-tests-clang = (pkgs.callPackage ./evm-assigner/evm-assigner.nix {
stdenv = pkgs.llvmPackages_18.stdenv;
runTests = true;
crypto3 = crypto3-clang;
crypto3 = crypto3-tests-clang;
});

all-clang = pkgs.symlinkJoin {
name = "all";
paths = [ crypto3-clang evm-assigner-clang ];
paths = [ crypto3-tests-clang evm-assigner-tests-clang ];
};
all-gcc = pkgs.symlinkJoin {
name = "all";
paths = [ crypto3-gcc evm-assigner-gcc ];
paths = [ crypto3-tests-gcc evm-assigner-tests-gcc ];
};
default = all-gcc;
};
Expand Down

0 comments on commit 6d1db97

Please sign in to comment.