Skip to content

Commit

Permalink
CI job with minimal dependencies (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
volkm authored Jul 8, 2024
2 parents 82625a6 + e3fdfa9 commit f180c17
Show file tree
Hide file tree
Showing 9 changed files with 135 additions and 59 deletions.
56 changes: 56 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Dockerfile
#Git files
.git
.git-blame-ignore-revs
.github
.gitignore
#The remainder is based on .gitignore
**/config.h
**/CompileInfo.cpp
**/CMakeOptions.cpp
**/CMakeOptions.h
/src/carl/config.h
#Visual Studio files
*.[Oo]bj
*.user
*.aps
*.pch
*.vspscc
*.vssscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.[Cc]ache
*.ilk
*.log
*.lib
*.sbr
*.sdf
*.tlog
*.lastbuildstate
*.pdb
*.idb
*.opensdf
*.unsuccessfulbuild
ipch/
obj/
CMakeFiles/
CPackConfig.cmake
# The build Dir
/*build*/
build//CMakeLists.txt
/*.vcxproj
/*.filters
/*.sln
#Temp texteditor files
*.orig
*.*~
nbproject/
.DS_Store
.idea
.vscode
*.out
2 changes: 1 addition & 1 deletion .github/workflows/buildtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
distro: ["debian-11", "debian-12", "ubuntu-20.04", "ubuntu-22.04", "ubuntu-24.04"]
distro: ["debian-11", "debian-12", "ubuntu-20.04", "ubuntu-22.04", "ubuntu-24.04", "minimal_dependencies"]
debugOrRelease: ["debug", "release"]
steps:
- name: Setup configuration
Expand Down
55 changes: 44 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,49 @@
**/*~
**/*.pyc
.idea
.DS_Store
.vscode
build/**
nbproject/
/resources/log4cplus-1.1.1/include/log4cplus/config/defines.hxx.cmake
/resources/log4cplus-1.1.1/include/log4cplus/config/defines.hxx
**/config.h
**/CompileInfo.cpp
**/CMakeOptions.cpp
**/CMakeOptions.h
/src/carl/config.h
/src/carl/thom/todos
/src/carl/thom/todo
#Visual Studio files
*.[Oo]bj
*.user
*.aps
*.pch
*.vspscc
*.vssscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.[Cc]ache
*.ilk
*.log
*.lib
*.sbr
*.sdf
*.tlog
*.lastbuildstate
*.pdb
*.idb
*.opensdf
*.unsuccessfulbuild
ipch/
obj/
CMakeFiles/
CPackConfig.cmake
# The build Dir
/*build*/
build//CMakeLists.txt
/*.vcxproj
/*.filters
/*.sln
#Temp texteditor files
*.orig
*.*~
nbproject/
.DS_Store
.idea
.vscode
*.out
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ if(APPLE AND ${CMAKE_SYSTEM_PROCESSOR} MATCHES arm64)
message(STATUS "Detected that target system uses Apple Silicon.")
message(WARNING "Compiling natively on Apple Silicon is experimental. Please report issues to [email protected]. For more information visit https://www.stormchecker.org/documentation/obtain-storm/apple-silicon.html")
set(APPLE_SILICON 1)
message(WARNING "CLN and GiNaC are currently not supported on Apple Silicon-based architectures. Disabling usage of the libraries.")
set(USE_CLN_NUMBERS OFF)
set(USE_GINAC OFF)
endif()

foreach(p LIB BIN INCLUDE CMAKE)
Expand Down
11 changes: 7 additions & 4 deletions cmake/FindGINAC.cmake
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
# Include dir
find_path(GINAC_INCLUDE_DIR
NAMES ginac.h
HINTS ${GINAC_PKGCONF_INCLUDE_DIRS}
PATHS
/usr/include/ginac
/usr/local/include/ginac
/usr/include
/usr/local/include
PATH_SUFFIXES ginac
DOC "Include directory for GiNaC"
)

find_library(GINAC_LIBRARY
NAMES ginac
HINTS ${GINAC_PKGCONF_LIBRARY_DIRS}
PATHS
/usr/lib
/usr/local/lib
/usr/lib
/usr/local/lib
)

if(GINAC_INCLUDE_DIR AND GINAC_LIBRARY)
Expand Down
20 changes: 8 additions & 12 deletions resources/cln.cmake
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
find_program(AUTORECONF autoreconf)
if(NOT AUTORECONF)
message(SEND_ERROR "Can not build cln, missing binary for autoreconf")
endif()

string(REPLACE "." "-" CLN_TAG ${CLN_VERSION})

ExternalProject_Add(
CLN-EP
GIT_REPOSITORY "git://www.ginac.de/cln.git"
CLN-EP
#URL https://www.ginac.de/CLN/cln-${CLN_VERSION}.tar.bz2
GIT_REPOSITORY "git://www.ginac.de/cln.git"
GIT_TAG "cln_${CLN_TAG}"
UPDATE_COMMAND ""
CONFIGURE_COMMAND cd <SOURCE_DIR> && autoreconf -iv
COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
DOWNLOAD_NO_PROGRESS 1
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --config ${CMAKE_BUILD_TYPE} --target cln
LOG_INSTALL 1
BUILD_BYPRODUCTS ${INSTALL_DIR}/lib/libcln${DYNAMIC_EXT} ${INSTALL_DIR}/lib/libcln${STATIC_EXT}
)

ExternalProject_Get_Property(CLN-EP INSTALL_DIR)
Expand All @@ -22,5 +20,3 @@ add_imported_library(CLN STATIC "${INSTALL_DIR}/lib/libcln${STATIC_EXT}" "${INST
add_dependencies(CLN_SHARED CLN-EP)
add_dependencies(CLN_STATIC CLN-EP)
add_dependencies(resources CLN_SHARED CLN_STATIC)

mark_as_advanced(AUTORECONF)
5 changes: 1 addition & 4 deletions resources/eigen3.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
ExternalProject_Add(
Eigen3-EP
GIT_REPOSITORY "https://github.com/eigenteam/eigen-git-mirror.git"
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
GIT_TAG ${EIGEN3_VERSION}
DOWNLOAD_NO_PROGRESS 1
UPDATE_COMMAND "" # due to https://gitlab.kitware.com/cmake/cmake/issues/17229
PATCH_COMMAND git cherry-pick eb592735746d935612caf658ab800e929c4ca6f4
COMMAND git cherry-pick f65188960c52da20392d88296cbaeb341d635834
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DPKGCONFIG_INSTALL_DIR=<INSTALL_DIR>/lib/pkgconfig
LOG_INSTALL 1
)
Expand Down
26 changes: 9 additions & 17 deletions resources/ginac.cmake
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
find_program(AUTORECONF autoreconf)
if(NOT AUTORECONF)
message(SEND_ERROR "Can not build GiNaC, missing binary for autoreconf")
endif()

find_program(PYTHON2 python2)
if(NOT PYTHON2)
message(SEND_ERROR "Can not build GiNaC, missing binary for python2")
find_program(PYTHON3 python3)
if(NOT PYTHON3)
message(SEND_ERROR "Can not build GiNaC, missing binary for Python")
endif()

string(REPLACE "." "-" GINAC_TAG ${GINAC_VERSION})

ExternalProject_Add(
GiNaC-EP
GIT_REPOSITORY "git://www.ginac.de/ginac.git"
GiNaC-EP
#URL https://www.ginac.de/ginac-${GINAC_VERSION}.tar.bz2
GIT_REPOSITORY "git://www.ginac.de/ginac.git"
GIT_TAG "release_${GINAC_TAG}"
DOWNLOAD_NO_PROGRESS 1
UPDATE_COMMAND ""
CONFIGURE_COMMAND ${AUTORECONF} -iv <SOURCE_DIR>
COMMAND <SOURCE_DIR>/configure --quiet --prefix=<INSTALL_DIR> PYTHON=${PYTHON2} PKG_CONFIG_PATH=<INSTALL_DIR>/lib/pkgconfig/
BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} -C ginac
INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} -C ginac install
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --config ${CMAKE_BUILD_TYPE} --target ginac
LOG_INSTALL 1
BUILD_BYPRODUCTS ${INSTALL_DIR}/lib/libginac${DYNAMIC_EXT} ${INSTALL_DIR}/lib/libginac${STATIC_EXT}
)

ExternalProject_Get_Property(GiNaC-EP INSTALL_DIR)
Expand All @@ -32,5 +26,3 @@ add_dependencies(GiNaC-EP CLN_SHARED CLN_STATIC)
add_dependencies(GINAC_SHARED GiNaC-EP)
add_dependencies(GINAC_STATIC GiNaC-EP)
add_dependencies(resources GINAC_SHARED GINAC_STATIC)

mark_as_advanced(AUTORECONF)
16 changes: 9 additions & 7 deletions resources/resources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,8 @@ if(NOT FORCE_SHIPPED_RESOURCES)
load_library(carl EIGEN3 3.3)
endif()
if(NOT EIGEN3_FOUND)
set(EIGEN3_VERSION "3.3.4")
set(EIGEN3_ZIPHASH "e337acc279874bc6a56da4d973a723fb")
set(EIGEN3_VERSION "3.4.0")
include(resources/eigen3.cmake)
unset(EIGEN3_ZIPHASH)
endif()
print_resource_info("Eigen3" EIGEN3 ${EIGEN3_VERSION})

Expand All @@ -106,10 +104,14 @@ endif()
##### CLN
if(USE_CLN_NUMBERS)
if(NOT FORCE_SHIPPED_RESOURCES)
load_library(carl CLN 1.3)
if(APPLE_SILICON)
load_library(carl CLN 1.3.7)
else()
load_library(carl CLN 1.3)
endif()
endif()
if(NOT CLN_FOUND)
set(CLN_VERSION "1.3.4")
set(CLN_VERSION "1.3.7")
include(resources/cln.cmake)
endif()
set_target_properties(CLN_STATIC PROPERTIES LINK_INTERFACE_LIBRARIES "GMP_STATIC")
Expand Down Expand Up @@ -138,10 +140,10 @@ endif()
##### GiNaC
if(USE_GINAC)
if(NOT FORCE_SHIPPED_RESOURCES)
load_library(carl GINAC 1.6.2)
load_library(carl GINAC 1.7)
endif()
if(NOT GINAC_FOUND)
set(GINAC_VERSION "1.7.2")
set(GINAC_VERSION "1.8.7")
include(resources/ginac.cmake)
endif()
print_resource_info("GiNaC" GINAC_SHARED ${GINAC_VERSION})
Expand Down

0 comments on commit f180c17

Please sign in to comment.