Add gfortran to mac build-from-source job #4
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
name: Build SCIP from source | |
on: | |
push: | |
branches: | |
- '**' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false # do not stop all builds if one fails | |
matrix: | |
include: | |
# - os: windows-latest | |
# arch: AMD64 | |
# - os: macos-latest | |
# arch: AMD64 | |
- os: macos-14 | |
arch: ARM64 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: msys2/setup-msys2@v2 | |
if: (matrix.os == 'windows-latest') || (matrix.os == 'windows-2019') | |
- name: Setup GNU Fortran for Mac | |
if: (matrix.os == 'macos-latest') || (matrix.os == 'macos-14') | |
uses: modflowpy/install-gfortran-action@v1 | |
- name: Instance dependencies for Mac | |
if: (matrix.os == 'macos-latest') || (matrix.os == 'macos-14') | |
run: | | |
brew install bash | |
brew upgrade cmake | |
brew install unzip | |
file /usr/bin/gcc | |
file /usr/bin/clang | |
shell: bash | |
- name: Install dependencies for Windows | |
if: (matrix.os == 'windows-latest') || (matrix.os == 'windows-2019') | |
run: | | |
pacman -S --noconfirm unzip git mingw-w64-x86_64-cmake cmake mingw-w64-x86_64-zlib zip | |
shell: msys2 {0} | |
- name: Download IPOPT for Mac | |
if: (matrix.os == 'macos-latest') || (matrix.os == 'macos-14') | |
run: | | |
wget https://github.com/coin-or/Ipopt/archive/refs/tags/releases/3.14.12.zip | |
unzip 3.14.12.zip | |
mkdir $GITHUB_WORKSPACE/scip_install | |
mkdir $GITHUB_WORKSPACE/scip_install/share | |
echo 'enable_shared=no | |
enable_java=no | |
enable_sipopt=no | |
with_pic=yes | |
with_metis_cflags="-I$GITHUB_WORKSPACE/metis/include" | |
with_metis_lflags="-L$GITHUB_WORKSPACE/metis/lib -lmetis"' > $GITHUB_WORKSPACE/scip_install/share/config.site | |
shell: bash | |
- name: Download IPOPT for Windows | |
if: (matrix.os == 'windows-latest') || (matrix.os == 'windows-2019') | |
run: | | |
wget https://github.com/coin-or/Ipopt/releases/download/releases%2F3.14.12/Ipopt-3.14.12-win64-msvs2019-md.zip | |
unzip Ipopt-3.14.12-win64-msvs2019-md.zip | |
mv Ipopt-3.14.12-win64-msvs2019-md/ scip_install | |
mv scip_install/lib/ipopt.dll.lib scip_install/lib/ipopt.lib | |
shell: msys2 {0} | |
- name: Install GMP for Mac Intel | |
if: matrix.os == 'macos-latest' | |
run: | | |
export CC=/usr/local/bin/gcc-13 | |
export CXX=/usr/local/bin/g++-13 | |
export MACOSX_DEPLOYMENT_TARGET=11.0 | |
wget https://github.com/pmmp/DependencyMirror/releases/download/mirror/gmp-6.3.0.tar.xz | |
tar xvf gmp-6.3.0.tar.xz | |
cd gmp-6.3.0 | |
./configure --with-pic --disable-shared --enable-cxx --prefix=$GITHUB_WORKSPACE/scip_install | |
make install -j | |
rm $GITHUB_WORKSPACE/scip_install/lib/*.so* | |
shell: bash | |
- name: Install GMP for Mac ARM | |
if: matrix.os == 'macos-14' | |
run: | | |
export MACOSX_DEPLOYMENT_TARGET=12.0 | |
wget https://github.com/pmmp/DependencyMirror/releases/download/mirror/gmp-6.3.0.tar.xz | |
tar xvf gmp-6.3.0.tar.xz | |
cd gmp-6.3.0 | |
./configure --with-pic --disable-shared --enable-cxx --prefix=$GITHUB_WORKSPACE/scip_install | |
make install -j | |
shell: bash | |
- name: Download and install metis for Mac Intel | |
if: matrix.os == 'macos-latest' | |
run: | | |
export CC=/usr/local/bin/gcc-13 | |
export CXX=/usr/local/bin/g++-13 | |
export MACOSX_DEPLOYMENT_TARGET=11.0 | |
wget https://github.com/KarypisLab/METIS/archive/refs/tags/v5.1.1-DistDGL-v0.5.tar.gz | |
tar -xvf v5.1.1-DistDGL-v0.5.tar.gz | |
wget https://github.com/KarypisLab/GKlib/archive/refs/tags/METIS-v5.1.1-DistDGL-0.5.tar.gz | |
tar -xvf METIS-v5.1.1-DistDGL-0.5.tar.gz | |
mkdir $GITHUB_WORKSPACE/metis | |
cd GKlib-METIS-v5.1.1-DistDGL-0.5 | |
make config prefix=$GITHUB_WORKSPACE/GKlib-METIS-v5.1.1-DistDGL-0.5 | |
make | |
make install | |
sed -i'' -e 's/set(GKlib_COPTIONS "${GKlib_COPTIONS} -Werror -Wall -pedantic -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unknown-pragmas -Wno-unused-label")/set(GKlib_COPTIONS "${GKlib_COPTIONS} -Wall -pedantic -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unknown-pragmas -Wno-unused-label")/g' GKlibSystem.cmake | |
cd .. | |
cd METIS-5.1.1-DistDGL-v0.5 | |
make config prefix=$GITHUB_WORKSPACE/metis/ gklib_path=$GITHUB_WORKSPACE/GKlib-METIS-v5.1.1-DistDGL-0.5 | |
make | |
make install | |
shell: bash | |
- name: Download and install metis for Mac ARM | |
if: matrix.os == 'macos-14' | |
run: | | |
export MACOSX_DEPLOYMENT_TARGET=12.0 | |
wget https://github.com/KarypisLab/METIS/archive/refs/tags/v5.1.1-DistDGL-v0.5.tar.gz | |
tar -xvf v5.1.1-DistDGL-v0.5.tar.gz | |
wget https://github.com/KarypisLab/GKlib/archive/refs/tags/METIS-v5.1.1-DistDGL-0.5.tar.gz | |
tar -xvf METIS-v5.1.1-DistDGL-0.5.tar.gz | |
mkdir $GITHUB_WORKSPACE/metis | |
cd GKlib-METIS-v5.1.1-DistDGL-0.5 | |
make config prefix=$GITHUB_WORKSPACE/GKlib-METIS-v5.1.1-DistDGL-0.5 | |
make | |
make install | |
sed -i'' -e 's/set(GKlib_COPTIONS "${GKlib_COPTIONS} -Werror -Wall -pedantic -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unknown-pragmas -Wno-unused-label")/set(GKlib_COPTIONS "${GKlib_COPTIONS} -Wall -pedantic -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unknown-pragmas -Wno-unused-label")/g' GKlibSystem.cmake | |
cd .. | |
cd METIS-5.1.1-DistDGL-v0.5 | |
make config prefix=$GITHUB_WORKSPACE/metis/ gklib_path=$GITHUB_WORKSPACE/GKlib-METIS-v5.1.1-DistDGL-0.5 | |
make | |
make install | |
shell: bash | |
- name: Download and install Mumps for Mac Intel | |
if: matrix.os == 'macos-latest' | |
run: | | |
export CC=/usr/local/bin/gcc-13 | |
export CXX=/usr/local/bin/g++-13 | |
export FC=/usr/local/bin/gfortran-13 | |
export MACOSX_DEPLOYMENT_TARGET=11.0 | |
git clone https://github.com/coin-or-tools/ThirdParty-Mumps.git | |
cd ThirdParty-Mumps | |
./get.Mumps | |
./configure --enable-shared=no --enable-static=yes --prefix=$GITHUB_WORKSPACE/scip_install | |
make | |
make install | |
shell: bash | |
- name: Download and install Mumps for Mac ARM | |
if: matrix.os == 'macos-14' | |
run: | | |
export MACOSX_DEPLOYMENT_TARGET=12.0 | |
git clone https://github.com/coin-or-tools/ThirdParty-Mumps.git | |
cd ThirdParty-Mumps | |
./get.Mumps | |
./configure --enable-shared=no --enable-static=yes --prefix=$GITHUB_WORKSPACE/scip_install | |
make | |
make install | |
shell: bash | |
- name: Install IPOPT for Mac Intel | |
if: matrix.os == 'macos-latest' | |
run: | | |
export CC=/usr/local/bin/gcc-13 | |
export CXX=/usr/local/bin/g++-13 | |
export FC=/usr/local/bin/gfortran-13 | |
export MACOSX_DEPLOYMENT_TARGET=11.0 | |
cd Ipopt-releases-3.14.12 | |
mkdir build | |
cd build | |
../configure --prefix=$GITHUB_WORKSPACE/scip_install/ | |
make -j$(nproc) | |
make test | |
make install | |
shell: bash | |
- name: Install IPOPT for Mac ARM | |
if: matrix.os == 'macos-14' | |
run: | | |
export MACOSX_DEPLOYMENT_TARGET=12.0 | |
cd Ipopt-releases-3.14.12 | |
mkdir build | |
cd build | |
../configure --prefix=$GITHUB_WORKSPACE/scip_install/ | |
make -j$(nproc) | |
make test | |
make install | |
shell: bash | |
- name: Download and install SOPLEX for Mac Intel | |
if: matrix.os == 'macos-latest' | |
run: | | |
export CC=/usr/local/bin/gcc-13 | |
export CXX=/usr/local/bin/g++-13 | |
export FC=/usr/local/bin/gfortran-13 | |
export MACOSX_DEPLOYMENT_TARGET=11.0 | |
wget https://github.com/scipopt/soplex/archive/refs/tags/release-604.zip | |
unzip release-604.zip | |
cd soplex-release-604 | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_INSTALL_PREFIX=../../scip_install -DCMAKE_BUILD_TYPE=Release -DGMP=true -DPAPILO=false -DBOOST=false -DGMP_DIR=../../scip_install | |
make -j$(nproc) | |
make test | |
make install | |
shell: bash | |
- name: Download and install SOPLEX for Mac ARM | |
if: matrix.os == 'macos-14' | |
run: | | |
export MACOSX_DEPLOYMENT_TARGET=12.0 | |
wget https://github.com/scipopt/soplex/archive/refs/tags/release-604.zip | |
unzip release-604.zip | |
cd soplex-release-604 | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_INSTALL_PREFIX=../../scip_install -DCMAKE_BUILD_TYPE=Release -DGMP=true -DPAPILO=false -DBOOST=false -DGMP_DIR=../../scip_install | |
make -j$(nproc) | |
make test | |
make install | |
shell: bash | |
- name: Download and install SOPLEX for Windows | |
if: (matrix.os == 'windows-latest') || (matrix.os == 'windows-2019') | |
run: | | |
wget https://github.com/scipopt/soplex/archive/refs/tags/release-604.zip | |
unzip release-604.zip | |
cd soplex-release-604 | |
mkdir soplex_build | |
export PATH="$PATH:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/Tools" | |
export PATH="$PATH:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64" | |
export PATH="$PATH:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin" | |
cmake -G "Visual Studio 17 2022" -B soplex_build -DCMAKE_INSTALL_PREFIX=../scip_install -DCMAKE_BUILD_TYPE=Release -DPAPILO=false -DGMP=false -DZLIB=false -DCMAKE_GENERATOR_PLATFORM=x64 | |
cmake --build soplex_build --config Release | |
cmake --install soplex_build | |
shell: msys2 {0} | |
- name: Download and install SCIP for Mac Intel | |
if: matrix.os == 'macos-latest' | |
run: | | |
export CC=/usr/local/bin/gcc-13 | |
export CXX=/usr/local/bin/g++-13 | |
export FC=/usr/local/bin/gfortran-13 | |
export MACOSX_DEPLOYMENT_TARGET=11.0 | |
wget https://github.com/scipopt/scip/archive/refs/tags/v900.zip | |
unzip v900.zip | |
cd scip-900 | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_INSTALL_PREFIX=../../scip_install -DCMAKE_BUILD_TYPE=Release -DLPS=spx -DSOPLEX_DIR=../../scip_install -DGMP_DIR=../../scip_install -DPAPILO=false -DZIMPL=false -DGMP=true -DREADLINE=false -DIPOPT=true -DIPOPT_DIR=../../scip_install | |
make -j$(nproc) | |
make install | |
shell: bash | |
- name: Download and install SCIP for Mac ARM | |
if: matrix.os == 'macos-14' | |
run: | | |
export MACOSX_DEPLOYMENT_TARGET=12.0 | |
wget https://github.com/scipopt/scip/archive/refs/tags/v900.zip | |
unzip v900.zip | |
cd scip-900 | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_INSTALL_PREFIX=../../scip_install -DCMAKE_BUILD_TYPE=Release -DLPS=spx -DSOPLEX_DIR=../../scip_install -DGMP_DIR=../../scip_install -DPAPILO=false -DZIMPL=false -DGMP=true -DREADLINE=false -DIPOPT=true -DIPOPT_DIR=../../scip_install | |
make -j$(nproc) | |
make install | |
shell: bash | |
- name: Download and install SCIP for Windows | |
if: (matrix.os == 'windows-latest') || (matrix.os == 'windows-2019') | |
run: | | |
mkdir $GITHUB_WORKSPACE/scip_build | |
wget https://github.com/scipopt/scip/archive/refs/tags/v900.zip | |
unzip v900.zip | |
cd scip-900 | |
export PATH="$PATH:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/Tools" | |
export PATH="$PATH:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64" | |
export PATH="$PATH:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin" | |
cmake -G "Visual Studio 17 2022" -B $GITHUB_WORKSPACE/scip_build -DCMAKE_INSTALL_PREFIX=../scip_install -DCMAKE_BUILD_TYPE=Release -DLPS=spx -DSOPLEX_DIR=../scip_install -DPAPILO=false -DZIMPL=false -DZLIB=false -DREADLINE=false -DGMP=false -DIPOPT=true -DIPOPT_DIR=../scip_install -DIPOPT_LIBRARIES=../scip_install/bin -DCMAKE_GENERATOR_PLATFORM=x64 | |
cmake --build $GITHUB_WORKSPACE/scip_build --config Release | |
cmake --install $GITHUB_WORKSPACE/scip_build | |
shell: msys2 {0} | |
- name: ZIP SCIP for MacOS | |
if: (matrix.os == 'macos-latest') || (matrix.os == 'macos-14') | |
run: | | |
zip -r $GITHUB_WORKSPACE/upload.zip scip_install/lib scip_install/include scip_install/bin | |
shell: bash | |
- name: ZIP SCIP for Windows | |
if: (matrix.os == 'windows-latest') || (matrix.os == 'windows-2019') | |
run: | | |
zip -r upload.zip scip_install/lib scip_install/include scip_install/bin | |
shell: msys2 {0} | |
- uses: actions/upload-artifact@v3 | |
if: (matrix.os == 'macos-latest') || (matrix.os == 'macos-14') | |
with: | |
name: Upload SCIP lib and headers for MacOS | |
path: ${{ github.workspace }}/upload.zip | |
- uses: actions/upload-artifact@v3 | |
if: (matrix.os == 'windows-latest') || (matrix.os == 'windows-2019') | |
with: | |
name: Upload SCIP lib and headers for Windows | |
path: ${{ github.workspace }}/upload.zip | |