-
Notifications
You must be signed in to change notification settings - Fork 557
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
Wizard recipe: MAiNGO-v0.7.2 #7812
Merged
giordano
merged 17 commits into
JuliaPackaging:master
from
MAiNGO-github:wizard/MAiNGO-v0.7.2_11565be1
Jan 24, 2024
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
30f5978
New Recipe: MAiNGO v0.7.2
0b6de39
Delete unused patch and cleanup build_tarballs.jl.
ab5ebfa
Lower preferred_gcc_version to 9
62f6a22
Apply suggestions from code review
MAiNGO-github 8f68f5d
Update M/MAiNGO/build_tarballs.jl
MAiNGO-github 3019238
Try building for MacOS and FreeBSD
f505b6c
Filter out non-working platforms instead of picking ones that work
353fc83
Fix CMake options
da75b01
Fix missing build folder in first CMake command
418220e
Fix missing build folder in first CMake command (again)
2580e90
Fix typo in CMAKE_TARGET_TOOLCHAIN
d4c468c
Remove FreeBSD build.
d56546f
Fix bash script error
ae9f458
Test Clang for MacOS
a674d8c
Try forcing SDK 10.15 for std::variant
8c2ce78
Fix where if statement ends
2a39e5a
Revert to using GCC for MacOS
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Note that this script can accept some limited command-line arguments, run | ||
# `julia build_tarballs.jl --help` to see a usage message. | ||
using BinaryBuilder, Pkg | ||
|
||
name = "MAiNGO" | ||
version = v"0.7.2" | ||
|
||
# Collection of sources required to complete build | ||
sources = [ | ||
GitSource("https://git.rwth-aachen.de/avt-svt/public/maingo.git", "252733413a29dbe5b84a4cdaf53e60e9934f372f"), | ||
] | ||
|
||
# Bash recipe for building across all platforms | ||
script = raw""" | ||
cd $WORKSPACE/srcdir/maingo/ | ||
git remote set-url origin https://git.rwth-aachen.de/avt-svt/public/maingo.git | ||
mkdir build | ||
cd build | ||
git submodule init | ||
git submodule update -j 1 | ||
common_cmake_options="-DCMAKE_BUILD_TYPE=Release \ | ||
-DMAiNGO_build_standalone=True \ | ||
-DMAiNGO_build_shared_c_api=True \ | ||
-DMAiNGO_build_parser=True \ | ||
-DMAiNGO_use_cplex=False \ | ||
-DMAiNGO_use_melon=False" | ||
# GCC used because of https://github.com/JuliaPackaging/Yggdrasil/issues/7139 | ||
if [[ "${target}" == x86_64-apple-darwin* ]]; then | ||
export MACOSX_DEPLOYMENT_TARGET=10.15 | ||
MAiNGO-github marked this conversation as resolved.
Show resolved
Hide resolved
|
||
cmake -DCMAKE_INSTALL_PREFIX=${prefix} \ | ||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN%.*}_gcc.cmake \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not clang? Also, at this point you could avoid the conditional and use gcc everywhere, but I'd prefer to understand what's wrong with clang, that's usually the best choice for macOS. |
||
${common_cmake_options} \ | ||
.. | ||
else | ||
cmake -DCMAKE_INSTALL_PREFIX=${prefix} \ | ||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \ | ||
${common_cmake_options} \ | ||
.. | ||
fi | ||
cmake --build . --config Release --parallel ${nproc} | ||
install -Dvm 755 "MAiNGO${exeext}" "${bindir}/MAiNGO${exeext}" | ||
install -Dvm 755 "MAiNGOcpp${exeext}" "${bindir}/MAiNGOcpp${exeext}" | ||
install -Dvm 755 "libmaingo-c-api.${dlext}" "${libdir}/libmaingo-c-api.${dlext}" | ||
install_license ../LICENSE | ||
""" | ||
|
||
# These are the platforms we will build for by default, unless further | ||
# platforms are passed in on the command line | ||
|
||
|
||
#Auditor complains about avx1. | ||
#Without march the Auditor detects avx2 | ||
#but with march="avx2" avx512 is detected, so we build without march | ||
|
||
platforms = supported_platforms() | ||
#FreeBSD is not supported | ||
filter!(!Sys.isfreebsd, platforms) | ||
#only x64 is supported | ||
filter!(p -> (arch(p) == "x86_64"), platforms) | ||
platforms = expand_cxxstring_abis(platforms) | ||
MAiNGO-github marked this conversation as resolved.
Show resolved
Hide resolved
|
||
platforms = expand_gfortran_versions(platforms) | ||
#We filter out gfortan 3 (seem not to have std::variant) | ||
filter!(p -> !(libgfortran_version(p) == v"3"), platforms) | ||
|
||
|
||
# The products that we will ensure are always built | ||
products = [ | ||
LibraryProduct("libmaingo-c-api", :libmaingo_c_api), | ||
ExecutableProduct("MAiNGOcpp", :MAiNGOcpp), | ||
ExecutableProduct("MAiNGO", :MAiNGO) | ||
] | ||
|
||
# Dependencies that must be installed before this package can be built | ||
dependencies = [ | ||
Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae")), | ||
] | ||
|
||
# Build the tarballs, and possibly a `build.jl` as well. | ||
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6", preferred_gcc_version = v"9") |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? Isn't this already the case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran into this problem before, at least in my tests locally the git remote is changed for caching.
See JuliaPackaging/BinaryBuilderBase.jl#355
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in our tests, this did not work because of caching. For now we would leave this in.