Skip to content

Commit

Permalink
merge silent and coproto
Browse files Browse the repository at this point in the history
  • Loading branch information
RindalVisa committed Sep 20, 2022
1 parent 9cb4bbf commit c32e777
Show file tree
Hide file tree
Showing 156 changed files with 21,061 additions and 13,767 deletions.
51 changes: 23 additions & 28 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: CI
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master, ci, soft]
branches: [ master, stage, coproto ]
pull_request: {}

# Allows you to run this workflow manually from the Actions tab
Expand All @@ -18,6 +18,7 @@ jobs:
build-ubuntu:
# The type of runner that the job will run on
runs-on: ubuntu-latest
timeout-minutes: 20

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand All @@ -27,17 +28,15 @@ jobs:
submodules: recursive

# Runs a set of commands using the runners shell
- name: build boost
run: python3 build.py --setup --boost --par=4


- name: build relic
run: python3 build.py --setup --relic --par=4

run: python3 build.py --setup --relic --par=4 -DVERBOSE_FETCH=ON -DENABLE_BOOST=OFF -DENABLE_SODIUM=OFF
- name: build bitpolymul
run: python3 build.py --setup --bitpolymul --par=4
run: python3 build.py --setup --bitpolymul --par=4 -DVERBOSE_FETCH=ON

- name: build libOTe
run: python3 build.py --par=4 -D ENABLE_ALL_OT=ON -D ENABLE_RELIC=ON -DENABLE_CIRCUIT=ON -DENABLE_BITPOLYMUL=ON
run: python3 build.py --par=4 -D ENABLE_ALL_OT=ON -DENABLE_CIRCUITS=ON

- name: unit tests
run: ./out/build/linux/frontend/frontend_libOTe -u
Expand All @@ -63,7 +62,7 @@ jobs:
- name: install prefix test
run: |
python3 build.py --setup --boost --relic --bitpolymul --install=~/install
python3 build.py --setup --relic --bitpolymul --install=~/install
python3 build.py --install=~/install
cd libOTe_Tests/cmakeTests
cmake -S . -B out/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=~/install
Expand All @@ -75,7 +74,7 @@ jobs:
- name: install test
run: |
python3 build.py --setup --boost --relic --bitpolymul --install --sudo
python3 build.py --setup --relic --bitpolymul --install --sudo
python3 build.py --install --sudo
cd libOTe_Tests/cmakeTests
cmake -S . -B out/ -DCMAKE_BUILD_TYPE=Release
Expand All @@ -84,11 +83,14 @@ jobs:
rm -rf out/
cd ../..

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

- name: build libOTe
run: python3 build.py --par=4 -D ENABLE_ALL_OT=ON -D ENABLE_SODIUM=ON -DENABLE_RELIC=OFF
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
- name: unit tests
run: ./out/build/linux/frontend/frontend_libOTe -u
Expand All @@ -114,7 +116,7 @@ jobs:
- name: install prefix test
run: |
python3 build.py --setup --boost --relic --sodium --install=~/install
python3 build.py --setup --sodium --install=~/install
python3 build.py --install=~/install
cd libOTe_Tests/cmakeTests
cmake -S . -B out/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=~/install
Expand All @@ -126,7 +128,7 @@ jobs:
- name: install test
run: |
python3 build.py --setup --boost --sodium --install --sudo
python3 build.py --setup --sodium --install --sudo
python3 build.py --install --sudo
cd libOTe_Tests/cmakeTests
cmake -S . -B out/ -DCMAKE_BUILD_TYPE=Release
Expand All @@ -139,6 +141,7 @@ jobs:
build-osx:
# The type of runner that the job will run on
runs-on: macos-latest
timeout-minutes: 20

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand All @@ -148,15 +151,9 @@ jobs:
submodules: recursive

# Runs a set of commands using the runners shell
- name: build boost
run: python3 build.py --setup --boost --par=4 -D ENABLE_SSE=OFF -D ENABLE_AVX=OFF -DENABLE_BITPOLYMUL=OFF

- name: build relic
run: python3 build.py --setup --relic --par=4 -D ENABLE_SSE=OFF -D ENABLE_AVX=OFF -DENABLE_BITPOLYMUL=OFF

- name: build libOTe
run: |
python3 build.py --par=4 -D ENABLE_ALL_OT=ON -D ENABLE_RELIC=ON -D ENABLE_SSE=OFF -D ENABLE_AVX=OFF -DENABLE_BITPOLYMUL=OFF
run: python3 build.py -DENABLE_BOOST=OFF -DVERBOSE_FETCH=ON -DENABLE_SSE=OFF -DENABLE_RELIC=ON -D ENABLE_ALL_OT=ON

- name: unit tests
run: ./out/build/osx/frontend/frontend_libOTe -u
Expand All @@ -182,7 +179,7 @@ jobs:
- name: install prefix test
run: |
python3 build.py --setup --boost --relic --install=~/install
python3 build.py --setup --relic --install=~/install
python3 build.py --install=~/install
cd libOTe_Tests/cmakeTests
cmake -S . -B out/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=~/install
Expand All @@ -194,7 +191,7 @@ jobs:
- name: install test
run: |
python3 build.py --setup --boost --relic --install --sudo
python3 build.py --setup --relic --install --sudo
python3 build.py --install --sudo
cd libOTe_Tests/cmakeTests
cmake -S . -B out/ -DCMAKE_BUILD_TYPE=Release
Expand All @@ -207,6 +204,7 @@ jobs:
build-windows:
# The type of runner that the job will run on
runs-on: windows-2019
timeout-minutes: 20

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand All @@ -218,11 +216,8 @@ jobs:
- uses: ilammy/msvc-dev-cmd@v1

# Runs a set of commands using the runners shell
- name: build boost
run: python3 build.py --setup --boost --par=4 -G Ninja

- name: build relic
run: python3 build.py --setup --relic --par=4 -G Ninja
run: python3 build.py --setup --relic --par=4 -G Ninja -DENABLE_BOOST=OFF -DVERBOSE_FETCH=ON

- name: build libOTe
run: python3 build.py --par=4 -D ENABLE_ALL_OT=ON -D ENABLE_RELIC=ON -G Ninja
Expand Down Expand Up @@ -253,7 +248,7 @@ jobs:
- name: install prefix test
run: |
python3 build.py --relic --boost --bitpolymul --install=~/install
python3 build.py --relic --bitpolymul --install=~/install
cd libOTe_Tests/cmakeTests
cmake -S . -B out/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=~/install
cmake --build out/ --config Release
Expand Down
9 changes: 0 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@ if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
############################################
add_definitions(-DSOLUTION_DIR='${CMAKE_SOURCE_DIR}')
if(MSVC)

# optionally add the following to CMAKE_PREFIX_PATH
if(NOT DEFINED CMAKE_PREFIX_PATH AND NOT DEFINED NO_OC_DEFAULT_PREFIX)
set(CMAKE_PREFIX_PATH
"c:/libs"
"${CMAKE_CURRENT_LIST_DIR}/..;"
)
endif()

else()
set(COMMON_FLAGS "-Wall -march=native -Wfatal-errors")
SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
Expand Down
45 changes: 33 additions & 12 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,19 @@
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"FETCH_AUTO": true,
"VERBOSE_FETCH": true,
"ENABLE_RELIC": true,
"CMAKE_BUILD_TYPE": "Debug",
"ENABLE_ALL_OT": true,
"LIBOTE_CPP_VER": "17",
"ENABLE_KKRT": "ON",
"ENABLE_IKNP": "ON",
"ENABLE_MR": "ON",
"ENABLE_SIMPLESTOT": "ON",
"ENABLE_RELIC": "OFF",
"ENABLE_SODIUM": "ON",
"ENABLE_BOOST": "OFF",
"FETCH_AUTO": "ON",
"ENABLE_CIRCUITS": true,
"VERBOSE_FETCH": true,
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}"
},
"vendor": {
Expand All @@ -32,14 +40,20 @@
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"FETCH_AUTO": true,
"VERBOSE_FETCH": true,
"ENABLE_BOOST": true,
"ENABLE_RELIC": true,
"LIBOTE_CPP_VER": "17",
"ENABLE_ALL_OT": true,
"ENABLE_BITPOLYMUl": false,
"ENABLE_SSE": false,
"ENABLE_AVX": false,
"ENABLE_KKRT": "ON",
"ENABLE_IKNP": "ON",
"ENABLE_MR": "ON",
"ENABLE_SIMPLESTOT": "ON",
"ENABLE_RELIC": "ON",
"ENABLE_BOOST": "ON",
"ENABLE_BITPOLYMUL": true,
"FETCH_AUTO": "ON",
"ENABLE_CIRCUITS": true,
"VERBOSE_FETCH": true,
"ENABLE_SSE": true,
"ENABLE_AVX": true,
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}"
},
"vendor": { "microsoft.com/VisualStudioSettings/CMake/1.0": { "hostOS": [ "Windows" ] } }
Expand All @@ -56,7 +70,14 @@
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"FETCH_AUTO": true,
"LIBOTE_CPP_VER": "17",
"ENABLE_ALL_OT": true,
"ENABLE_RELIC": true,
"COPROTO_ENABLE_BOOST": true,
"ENABLE_BOOST": "OFF",
"FETCH_AUTO": "ON",
"ENABLE_CIRCUITS": true,
"ENABLE_BITPOLYMUL": true,
"VERBOSE_FETCH": true,
"ENABLE_RELIC": true,
"ENABLE_ALL_OT": true,
Expand Down
33 changes: 1 addition & 32 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,36 +1,5 @@
Dual-licensed under Unlicense or MIT.


----------------------- Unlicense ---------------------------

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org/>


----------------------- MIT ---------------------------
Copyright 2016 Peter Rindal
Coptright 2022 Visa

Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
Expand Down
Loading

0 comments on commit c32e777

Please sign in to comment.