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

[SCIP_PaPILO] up scip 920 #9746

Merged
merged 10 commits into from
Dec 27, 2024
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: 26 additions & 4 deletions S/SCIP_PaPILO/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,34 @@ using BinaryBuilder, Pkg

name = "SCIP_PaPILO"

version = v"900.000.000"
upstream_version = v"9.2.0"
version = VersionNumber(upstream_version.major * 100, upstream_version.minor * 100, upstream_version.patch * 100)

# Collection of sources required to complete build
sources = [
ArchiveSource(
"https://scipopt.org/download/release/scipoptsuite-9.0.0.tgz",
"c49a0575003322fcbfe2d3765de7e3e60ff7c08d1e8b17d35409be40476cb98a"
"https://scipopt.org/download/release/scipoptsuite-$(upstream_version).tgz",
"a174cc58592d245c74c9c95c1d4819750d7ba2d467b4baae616a5aa336aac8d0"
),
ArchiveSource(
"https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.13.sdk.tar.xz",
"a3a077385205039a7c6f9e2c98ecdf2a720b2a819da715e03e0630c75782c1e4"
),
DirectorySource("./bundled/")
]

# Bash recipe for building across all platforms
script = raw"""
# This requires macOS 10.13
if [[ "${target}" == x86_64-apple-darwin* ]]; then
pushd $WORKSPACE/srcdir/MacOSX10.*.sdk
rm -rf /opt/${target}/${target}/sys-root/System
cp -ra usr/* "/opt/${target}/${target}/sys-root/usr/."
cp -ra System "/opt/${target}/${target}/sys-root/."
export MACOSX_DEPLOYMENT_TARGET=10.13
popd
fi

cd scipoptsuite*

# for soplex threadlocal
Expand All @@ -27,6 +42,8 @@ if [[ "${target}" == *-mingw* ]]; then
export CXXFLAGS="-Wa,-mbig-obj"
fi

# Patch to fix linking with gfortran's library on mingw
# https://github.com/JuliaPackaging/Yggdrasil/pull/8224#issuecomment-2034941690
atomic_patch -p0 $WORKSPACE/srcdir/patches/papilo_cmake.patch

mkdir build
Expand All @@ -39,7 +56,7 @@ cmake -DCMAKE_INSTALL_PREFIX=$prefix\
-DAMPL=0\
-DGCG=0\
-DBOOST=ON\
-DSYM=bliss\
-DSYM=snauty\
-DTPI=tny\
-DIPOPT_DIR=${prefix} \
-DIPOPT_LIBRARIES=${libdir} \
Expand All @@ -63,10 +80,15 @@ cp $WORKSPACE/srcdir/scipoptsuite*/papilo/COPYING ${prefix}/share/licenses/SCIP_
# platforms are passed in on the command line
platforms = expand_gfortran_versions(expand_cxxstring_abis(supported_platforms(; experimental=true)))

# Filter out the aarch64 FreeBSD and RISC-V architectures because oneTBB isn't available there yet.
filter!(p -> !(Sys.isfreebsd(p) && arch(p) == "aarch64"), platforms)
filter!(p -> !(Sys.islinux(p) && arch(p) == "riscv64"), platforms)

filter!(platforms) do p
libgfortran_version(p) >= v"4"
end


# The products that we will ensure are always built
products = [
ExecutableProduct("papilo", :papilo),
Expand Down
11 changes: 5 additions & 6 deletions S/SCIP_PaPILO/bundled/patches/papilo_cmake.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- papilo/binaries/CMakeLists.txt 2024-04-03 13:39:12.041041231 +0100
+++ papilo/binaries/CMakeLists.txt 2024-04-03 15:50:40.070943339 +0100
@@ -69,6 +69,17 @@
--- papilo/binaries/CMakeLists.txt 2024-12-26 02:45:23.608452403 +0000
+++ papilo/binaries/CMakeLists.txt 2024-12-26 02:45:29.320347256 +0000
@@ -76,6 +76,17 @@
set(PAPILO_HAVE_ROUNDINGSAT 0)
endif()

Expand All @@ -15,6 +15,5 @@
+ enable_language(Fortran)
+endif()
+
include_directories(${SCIP_INCLUDE_DIRS} ${SOPLEX_INCLUDE_DIRS} ${HIGHS_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})
find_package(Boost REQUIRED OPTIONAL_COMPONENTS iostreams serialization program_options)

# Search again since we cannot rely on papilo/CMakeLists.txt having searched for Boost already.
find_package(Boost ${BOOST_MIN_VERSION} OPTIONAL_COMPONENTS iostreams program_options serialization)