Skip to content

Commit

Permalink
Implement placeholder CI
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyMlashkin committed Sep 4, 2024
1 parent 0c2b518 commit 9fe40a0
Show file tree
Hide file tree
Showing 19 changed files with 88 additions and 378 deletions.
4 changes: 2 additions & 2 deletions .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 flake -L check
run: nix build -L .?#checks.x86_64-linux.all-gcc
env:
NIX_CONFIG: |
cores = 6
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 flake -L check
run: nix build -L .?checks.aarch64-darwin.all-gcc
env:
NIX_CONFIG: |
cores = 0
Expand Down
9 changes: 4 additions & 5 deletions crypto3/crypto3.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
ninja,
pkg-config,
cmake,
boost183,
# We'll use boost183 by default, but you can override it
boost_lib ? boost183,
boost,
gdb,
cmake_modules,
enableDebugging,
enableDebug ? true,
enableDebug ? false,
runTests ? false,
}:
let
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 All @@ -33,6 +31,7 @@ in stdenv.mkDerivation {
(if enableDebug then "-DCMAKE_BUILD_TYPE=Debug" else "-DCMAKE_BUILD_TYPE=Release")
(if enableDebug then "-DCMAKE_CXX_FLAGS=-ggdb" else "")
(if enableDebug then "-DCMAKE_CXX_FLAGS=-O0" else "")
"-G Ninja"
];

doCheck = runTests; # tests are inside crypto3-tests derivation
Expand Down
84 changes: 0 additions & 84 deletions crypto3/flake.lock

This file was deleted.

59 changes: 0 additions & 59 deletions crypto3/flake.nix

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include <iostream>
#include <fstream>
#include <cstdint>

#include <boost/test/unit_test.hpp>

Expand Down
3 changes: 1 addition & 2 deletions crypto3/libs/blueprint/test/zkevm/opcodes/iszero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include <boost/test/unit_test.hpp>

#include <nil/blueprint/zkevm/zkevm_machine_interface.hpp>
#include <nil/crypto3/algebra/fields/arithmetic_params/goldilocks64.hpp>

#include <nil/blueprint/blueprint/plonk/circuit.hpp>
Expand All @@ -34,8 +35,6 @@
#include <nil/blueprint/zkevm/zkevm_circuit.hpp>
#include "../opcode_tester.hpp"

#include <nil/blueprint/zkevm/operations/iszero.hpp>

using namespace nil::blueprint;
using namespace nil::crypto3::algebra;

Expand Down
5 changes: 3 additions & 2 deletions crypto3/libs/blueprint/test/zkevm/opcodes/mul.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@
#include <nil/blueprint/blueprint/plonk/assignment.hpp>

#include <nil/blueprint/zkevm/zkevm_circuit.hpp>
#include "../opcode_tester.hpp"

#include <nil/blueprint/zkevm/zkevm_operation.hpp>
#include <nil/blueprint/zkevm/operations/mul.hpp>

#include "../opcode_tester.hpp"

using namespace nil::blueprint;
using namespace nil::crypto3::algebra;

Expand Down
13 changes: 7 additions & 6 deletions crypto3/libs/containers/test/merkle/merkle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@

#define BOOST_TEST_MODULE containter_merkletree_test

#include <chrono>
#include <cstdio>
#include <limits>
#include <type_traits>
#include <cstdint>

#include <nil/crypto3/algebra/random_element.hpp>
#include <nil/crypto3/algebra/type_traits.hpp>
#include <nil/crypto3/hash/block_to_field_elements_wrapper.hpp>
Expand All @@ -35,6 +41,7 @@
#include <nil/crypto3/hash/keccak.hpp>
#include <nil/crypto3/hash/pedersen.hpp>
#include <nil/crypto3/hash/poseidon.hpp>
#include <nil/crypto3/hash/algorithm/hash.hpp>

#include <nil/crypto3/container/merkle/tree.hpp>
#include <nil/crypto3/container/merkle/proof.hpp>
Expand All @@ -43,12 +50,6 @@
#include <boost/test/data/test_case.hpp>
#include <boost/test/data/monomorphic.hpp>

#include <chrono>
#include <cstdio>
#include <limits>
#include <type_traits>
#include <nil/crypto3/hash/algorithm/hash.hpp>

using namespace nil::crypto3;
using namespace nil::crypto3::containers;

Expand Down
14 changes: 7 additions & 7 deletions crypto3/libs/hash/test/crc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@

#define BOOST_TEST_MODULE crc_test

#include <nil/crypto3/hash/algorithm/hash.hpp>
#include <iostream>
#include <string>
#include <cassert>
#include <cstdint>
#include <unordered_map>

#include <nil/crypto3/hash/algorithm/hash.hpp>
#include <nil/crypto3/hash/crc.hpp>
#include <nil/crypto3/hash/hash_state.hpp>

Expand All @@ -19,11 +24,6 @@
#include <boost/test/data/test_case.hpp>
#include <boost/test/data/monomorphic.hpp>

#include <iostream>
#include <string>
#include <cassert>
#include <unordered_map>

using namespace nil::crypto3;
using namespace nil::crypto3::hashes;
using namespace nil::crypto3::accumulators;
Expand Down Expand Up @@ -130,4 +130,4 @@ BOOST_AUTO_TEST_CASE(crc_stateful_hash3) {
BOOST_CHECK_EQUAL(d, "a7943e77");
}

BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE_END()
14 changes: 7 additions & 7 deletions crypto3/libs/hash/test/tiger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@

#define BOOST_TEST_MODULE tiger_test

#include <iostream>
#include <string>
#include <unordered_map>
#include <cstdio>
#include <cstdint>

#include <nil/crypto3/hash/algorithm/hash.hpp>
#include <nil/crypto3/hash/adaptor/hashed.hpp>

Expand All @@ -39,12 +45,6 @@

#include <boost/static_assert.hpp>

#include <iostream>
#include <string>
#include <unordered_map>

#include <cstdio>

using namespace nil::crypto3;
using namespace nil::crypto3::accumulators;

Expand Down Expand Up @@ -155,4 +155,4 @@ BOOST_AUTO_TEST_CASE(tiger_iterator_hash7) {
BOOST_CHECK_EQUAL("1c14795529fd9f207a958f84c52f11e887fa0cabdfd91bfd", out);
}

BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE_END()
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <boost/random/uniform_int.hpp>
#include <iostream>
#include <iomanip>
#include <cstdint>

#include <nil/marshalling/status_type.hpp>
#include <nil/marshalling/endianness.hpp>
Expand Down
1 change: 1 addition & 0 deletions crypto3/libs/random/test/rfc6979.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <sstream>
#include <cstdlib>
#include <ctime>
#include <cstdint>

#include <boost/test/unit_test.hpp>

Expand Down
Loading

0 comments on commit 9fe40a0

Please sign in to comment.