Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable testing Relic nightly in CI #345

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,20 @@ set(SODIUM_DISABLE_TESTS "on" CACHE STRING "")
set(SODIUM_CHIA_MINIMAL "on" CACHE STRING "")
FetchContent_MakeAvailable(Sodium)

if (DEFINED ENV{RELIC_MAIN})
if(DEFINED ENV{RELIC_MAIN})
set(RELIC_GIT_TAG "origin/main")
else ()
set(RELIC_REPOSITORY "https://github.com/relic-toolkit/relic.git")
else()
# This is currently anchored to upstream aecdcae7956f542fbee2392c1f0feb0a8ac41dc5
set(RELIC_GIT_TAG "215c69966cb78b255995f0ee9c86bbbb41c3c42b")
endif ()
set(RELIC_REPOSITORY "https://github.com/Chia-Network/relic.git")
endif()

message(STATUS "Relic will be built from: ${RELIC_GIT_TAG}")
message(STATUS "Relic will be built from: ${RELIC_GIT_TAG} and repository ${RELIC_REPOSITORY}")

FetchContent_Declare(
relic
GIT_REPOSITORY https://github.com/Chia-Network/relic.git
GIT_REPOSITORY ${RELIC_REPOSITORY}
GIT_TAG ${RELIC_GIT_TAG}
)

Expand Down Expand Up @@ -107,12 +109,20 @@ else()
set(FP_QNRES "on" CACHE STRING "")
endif()

set(FP_METHD "INTEG;INTEG;INTEG;MONTY;LOWER;SLIDE" CACHE STRING "")

if(MSVC)
set(COMP_FLAGS "" CACHE STRING "")
if(DEFINED ENV{RELIC_MAIN})
set(FP_METHD "INTEG;INTEG;INTEG;MONTY;LOWER;JMPDS;SLIDE" CACHE STRING "")
if(MSVC)
set(CFLAGS "" CACHE STRING "")
else()
set(CFLAGS "-O3 -funroll-loops -fomit-frame-pointer" CACHE STRING "")
endif()
else()
set(COMP_FLAGS "-O3 -funroll-loops -fomit-frame-pointer" CACHE STRING "")
set(FP_METHD "INTEG;INTEG;INTEG;MONTY;LOWER;SLIDE" CACHE STRING "")
if(MSVC)
set(COMP_FLAGS "" CACHE STRING "")
else()
set(COMP_FLAGS "-O3 -funroll-loops -fomit-frame-pointer" CACHE STRING "")
endif()
endif()

set(FP_PMERS "off" CACHE STRING "")
Expand Down
8 changes: 7 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,14 @@ if(BUILD_BLS_TESTS)
GIT_TAG v3.0.0-preview5
)
FetchContent_MakeAvailable(Catch2)
find_package(Threads REQUIRED)
add_executable(runtest test.cpp)
target_link_libraries(runtest PRIVATE bls Catch2::Catch2)
target_link_libraries(runtest
PRIVATE
bls
Catch2::Catch2
Threads::Threads
)
endif()

if(BUILD_BLS_BENCHMARKS)
Expand Down