Skip to content

Commit

Permalink
move to ubuntu 20.04
Browse files Browse the repository at this point in the history
  • Loading branch information
olehnikolaiev committed Mar 16, 2023
1 parent dbad3ef commit b646f8b
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 64 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
main_job:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
env:
NIGHTLY_BUILD_FLAGS: "valgrind --leak-check=yes"

Expand All @@ -20,10 +20,10 @@ jobs:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6
# - name: Set up Python 3.6
# uses: actions/setup-python@v1
# with:
# python-version: 3.6
- name: Update apt
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
./scripts/run_tools_test.sh
linux_build_with_emscripten:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04

strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defaults:
shell: bash
jobs:
build:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04

steps:
- name: Extract repo name
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defaults:
shell: bash
jobs:
linux_build_and_test:
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04

steps:
- name: Extract repo name
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
./dkg_attack
linux_build_with_emscripten:
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04

strategy:
matrix:
Expand Down
113 changes: 58 additions & 55 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ set( HUNTER_ENABLED OFF )

option(BUILD_TESTS "Build tests" ON)
option(BUILD_WITH_FPIC "Build with -fPIC" OFF)
option(BUILD_UTILS "Build utils" ON)

option( BLS_PROFILING "Build for profiling" OFF )
if( SKALED_PROFILING OR CONSENSUS_PROFILING )
Expand Down Expand Up @@ -179,63 +180,65 @@ target_link_libraries(bls PRIVATE ff ${CRYPTOPP_LIBRARY} ${GMPXX_LIBRARY} ${GMP_

add_subdirectory(threshold_encryption)

add_executable(dkg_keygen tools/dkg_key_gen.cpp)
target_include_directories(dkg_keygen PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
if (EMSCRIPTEN)
target_compile_options(dkg_keygen PRIVATE -s DISABLE_EXCEPTION_CATCHING=1)
set_target_properties(dkg_keygen PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1")
if (BUILD_UTILS)
add_executable(dkg_keygen tools/dkg_key_gen.cpp)
target_include_directories(dkg_keygen PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
if (EMSCRIPTEN)
target_compile_options(dkg_keygen PRIVATE -s DISABLE_EXCEPTION_CATCHING=1)
set_target_properties(dkg_keygen PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1")
endif()

target_link_libraries(dkg_keygen PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS})

add_executable(dkg_glue tools/dkg_glue.cpp)
target_include_directories(dkg_glue PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
if (EMSCRIPTEN)
target_compile_options(dkg_glue PRIVATE -s DISABLE_EXCEPTION_CATCHING=1)
set_target_properties(dkg_glue PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1")
endif()
target_link_libraries(dkg_glue PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS})

add_executable(sign_bls tools/sign_bls.cpp)
target_include_directories(sign_bls PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
if (EMSCRIPTEN)
target_compile_options(sign_bls PRIVATE -s DISABLE_EXCEPTION_CATCHING=1)
set_target_properties(sign_bls PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1")
endif()
target_link_libraries(sign_bls PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS})

add_executable(hash_g1 tools/hash_g1.cpp)
target_include_directories(hash_g1 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
if (EMSCRIPTEN)
target_compile_options(hash_g1 PRIVATE -s DISABLE_EXCEPTION_CATCHING=1)
set_target_properties(hash_g1 PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1")
endif()
target_link_libraries(hash_g1 PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS})

add_executable(bls_glue tools/bls_glue.cpp)
target_include_directories(bls_glue PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
if (EMSCRIPTEN)
target_compile_options(bls_glue PRIVATE -s DISABLE_EXCEPTION_CATCHING=1)
set_target_properties(bls_glue PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1")
endif()
target_link_libraries(bls_glue PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS})

add_executable(verify_bls tools/verify_bls.cpp)
target_include_directories(verify_bls PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
if (EMSCRIPTEN)
target_compile_options(verify_bls PRIVATE -s DISABLE_EXCEPTION_CATCHING=1)
set_target_properties(verify_bls PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1")
endif()
target_link_libraries(verify_bls PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS})

add_executable(generate_key_system tools/generate_key_system.cpp)
target_include_directories(generate_key_system PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
if (EMSCRIPTEN)
target_compile_options(generate_key_system PRIVATE -s DISABLE_EXCEPTION_CATCHING=1)
set_target_properties(generate_key_system PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1")
endif()
target_link_libraries(generate_key_system PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS})
endif()

target_link_libraries(dkg_keygen PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS})

add_executable(dkg_glue tools/dkg_glue.cpp)
target_include_directories(dkg_glue PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
if (EMSCRIPTEN)
target_compile_options(dkg_glue PRIVATE -s DISABLE_EXCEPTION_CATCHING=1)
set_target_properties(dkg_glue PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1")
endif()
target_link_libraries(dkg_glue PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS})

add_executable(sign_bls tools/sign_bls.cpp)
target_include_directories(sign_bls PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
if (EMSCRIPTEN)
target_compile_options(sign_bls PRIVATE -s DISABLE_EXCEPTION_CATCHING=1)
set_target_properties(sign_bls PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1")
endif()
target_link_libraries(sign_bls PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS})

add_executable(hash_g1 tools/hash_g1.cpp)
target_include_directories(hash_g1 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
if (EMSCRIPTEN)
target_compile_options(hash_g1 PRIVATE -s DISABLE_EXCEPTION_CATCHING=1)
set_target_properties(hash_g1 PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1")
endif()
target_link_libraries(hash_g1 PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS})

add_executable(bls_glue tools/bls_glue.cpp)
target_include_directories(bls_glue PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
if (EMSCRIPTEN)
target_compile_options(bls_glue PRIVATE -s DISABLE_EXCEPTION_CATCHING=1)
set_target_properties(bls_glue PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1")
endif()
target_link_libraries(bls_glue PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS})

add_executable(verify_bls tools/verify_bls.cpp)
target_include_directories(verify_bls PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
if (EMSCRIPTEN)
target_compile_options(verify_bls PRIVATE -s DISABLE_EXCEPTION_CATCHING=1)
set_target_properties(verify_bls PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1")
endif()
target_link_libraries(verify_bls PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS})

add_executable(generate_key_system tools/generate_key_system.cpp)
target_include_directories(generate_key_system PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
if (EMSCRIPTEN)
target_compile_options(generate_key_system PRIVATE -s DISABLE_EXCEPTION_CATCHING=1)
set_target_properties(generate_key_system PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1")
endif()
target_link_libraries(generate_key_system PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS})

if(BUILD_TESTS)
add_executable(bls_unit_test test/unit_tests_bls.cpp)
target_include_directories(bls_unit_test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
Expand Down

0 comments on commit b646f8b

Please sign in to comment.