Skip to content

Commit

Permalink
ci and test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ladnir committed Jun 13, 2024
1 parent 4ea4668 commit 0cba723
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 32 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
# run: python3 build.py -DENABLE_BOOST=OFF -DENABLE_SODIUM=OFF -DENABLE_ASAN=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo

#- name: build bitpolymul
# run: python3 build.py --setup --bitpolymul --par=4 -DVERBOSE_FETCH=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
# run: python3 build.py --bitpolymul --par=4 -DVERBOSE_FETCH=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo

- name: build libOTe
run: python3 build.py --par=4 -D ENABLE_ALL_OT=ON -DENABLE_CIRCUITS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_ASAN=ON -DENABLE_MOCK_OT=true
Expand Down Expand Up @@ -84,11 +84,8 @@ jobs:
rm -rf out/
cd ../..

- name: build sodium
run: python3 build.py --setup --sodium --par=4 -DVERBOSE_FETCH=ON -DENABLE_BOOST=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo

- name: build libOTe

- name: build libOTe w/ sodium
run: |
rm ./out/build/linux/frontend/frontend_libOTe
python3 build.py --par=4 -D ENABLE_ALL_OT=ON -D ENABLE_SODIUM=ON -DENABLE_RELIC=OFF -DPRINT_LOG_ON_FAIL=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
Expand Down Expand Up @@ -117,7 +114,6 @@ jobs:
- name: install prefix test
run: |
python3 build.py --setup --sodium --install=~/install -DCMAKE_BUILD_TYPE=RelWithDebInfo
python3 build.py --install=~/install -DCMAKE_BUILD_TYPE=RelWithDebInfo
cd libOTe_Tests/cmakeTests
cmake -S . -B out/ -DSODIUM=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH=~/install
Expand All @@ -129,7 +125,6 @@ jobs:
- name: install test
run: |
python3 build.py --setup --sodium --install --sudo -DCMAKE_BUILD_TYPE=RelWithDebInfo
python3 build.py --install --sudo -DCMAKE_BUILD_TYPE=RelWithDebInfo
cd libOTe_Tests/cmakeTests
cmake -S . -B out/ -DSODIUM=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
Expand Down Expand Up @@ -191,7 +186,7 @@ jobs:
- name: install test
run: |
python3 build.py --setup --install --sudo
python3 build.py --install --sudo
cd libOTe_Tests/cmakeTests
cmake -S . -B out/ -DCMAKE_BUILD_TYPE=Release
cmake --build out/
Expand Down
55 changes: 32 additions & 23 deletions libOTe_Tests/Vole_Tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,42 +312,51 @@ void Vole_Silent_Rounds_test(const oc::CLP& cmd)
AlignedUnVector<block> c(n), z0(n), z1(n);
auto p0 = recv.silentReceive(c, z0, prng, chls[0]);
auto p1 = send.silentSend(x, z1, prng, chls[1]);
#define LIBOTE_HAS_BASE_OT
#ifdef ENABLE_SIMPLESTOT_ASM
u64 expRound = 5;
#elif (defined ENABLE_MRR_TWIST && defined ENABLE_SSE) ||\
defined ENABLE_MR ||\
defined ENABLE_MRR || \
defined ENABLE_NP_KYBER
std::cout << "using DefaultBaseOT = AsmSimplestOT;" << std::endl;
#elif defined ENABLE_MRR_TWIST && defined ENABLE_SSE
u64 expRound = 3;
std::cout << "using DefaultBaseOT = McRosRoyTwist;" << std::endl;
#elif defined ENABLE_MR
u64 expRound = 3;
std::cout << "using DefaultBaseOT = MasnyRindal;" << std::endl;
#elif defined ENABLE_MRR
u64 expRound = 3;
std::cout << "using DefaultBaseOT = McRosRoy;" << std::endl;
#elif defined ENABLE_NP_KYBER
u64 expRound = 3;
std::cout << "using DefaultBaseOT = MasnyRindalKyber;" << std::endl;
#elif defined ENABLE_SIMPLESTOT
u64 expRound = 5;
std::cout << "using DefaultBaseOT = SimplestOT;" << std::endl;
#elif defined ENABLE_MOCK_OT
u64 expRound = 3;
std::cout << "using DefaultBaseOT = INSECURE_MOCK_OT;" << std::endl;
#else
u64 expRound = 5;
u64 expRound = 0;
#endif

auto rounds = eval(p0, p1, chls[1], chls[0]);
if (rounds != expRound)
{
#ifdef ENABLE_SIMPLESTOT_ASM
std::cout << "using DefaultBaseOT = AsmSimplestOT;" << std::endl;
#elif defined ENABLE_MRR_TWIST && defined ENABLE_SSE
std::cout << "using DefaultBaseOT = McRosRoyTwist;" << std::endl;
#elif defined ENABLE_MR
std::cout << "using DefaultBaseOT = MasnyRindal;" << std::endl;
#elif defined ENABLE_MRR
std::cout << "using DefaultBaseOT = McRosRoy;" << std::endl;
#elif defined ENABLE_NP_KYBER
std::cout << "using DefaultBaseOT = MasnyRindalKyber;" << std::endl;
#elif defined ENABLE_SIMPLESTOT
std::cout << "using DefaultBaseOT = SimplestOT;" << std::endl;
#elif defined ENABLE_MOCK_OT
std::cout << "using DefaultBaseOT = INSECURE_MOCK_OT;" << std::endl;
#else
std::cout << " LIBOTE_HAS_BASE_OT" << std::endl;
#endif
//#ifdef ENABLE_SIMPLESTOT_ASM
// std::cout << "using DefaultBaseOT = AsmSimplestOT;" << std::endl;
//#elif defined ENABLE_MRR_TWIST && defined ENABLE_SSE
// std::cout << "using DefaultBaseOT = McRosRoyTwist;" << std::endl;
//#elif defined ENABLE_MR
// std::cout << "using DefaultBaseOT = MasnyRindal;" << std::endl;
//#elif defined ENABLE_MRR
// std::cout << "using DefaultBaseOT = McRosRoy;" << std::endl;
//#elif defined ENABLE_NP_KYBER
// std::cout << "using DefaultBaseOT = MasnyRindalKyber;" << std::endl;
//#elif defined ENABLE_SIMPLESTOT
// std::cout << "using DefaultBaseOT = SimplestOT;" << std::endl;
//#elif defined ENABLE_MOCK_OT
// std::cout << "using DefaultBaseOT = INSECURE_MOCK_OT;" << std::endl;
//#else
// std::cout << " LIBOTE_HAS_BASE_OT" << std::endl;
//#endif
throw std::runtime_error("act " + std::to_string(rounds) + "!= exp " + std::to_string(expRound) + " " + COPROTO_LOCATION);
}

Expand Down

0 comments on commit 0cba723

Please sign in to comment.