-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/v9-minor'
- Loading branch information
Showing
10 changed files
with
344 additions
and
34 deletions.
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 |
---|---|---|
@@ -1 +1,37 @@ | ||
include: 'ci/test_russcip.yml' | ||
# This file is the root of the gitlab ci pipeline. | ||
# It sets pipeline variables such as the versions of the dependencies and the name of the docker image. | ||
# It also defines the stages of the pipeline and includes the ci snippets for each stage. | ||
# The ci snippets are located in the ci folder. | ||
# Jobs should not be defined in this file but in their own file in the ci folder. | ||
# Similar jobs should be grouped in the same file and use inheritance to avoid code duplication. | ||
# The image custom image used in this pipeline is quite complex and large as it contains all the dependencies of SCIP. | ||
# It is defined in ci/docker/Dockerfile. | ||
# The image is built in the first stage of the pipeline and then used in all the other stages. | ||
# Jobs that do not require the dependecies inside the image should run on a smaller image like debian-slim. | ||
variables: | ||
SCIP_VERSION: "9.0.1" | ||
|
||
IMAGE_NAME: ${CI_REGISTRY}/integer/scip/ci | ||
# combine IMAGE_NAME and current branch | ||
IMAGE: ${IMAGE_NAME}:${IMAGE_HASH} | ||
IMAGE_PATH: ${CI_PROJECT_DIR}/ci/docker/Dockerfile | ||
DEPENDENCIES_PATH: ${CI_PROJECT_DIR}/ci/docker/dependencies.yml | ||
|
||
workflow: | ||
rules: | ||
# only run the pipeline on merge requests and when the title does not contain Draft | ||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TITLE !~ /Draft/ | ||
|
||
stages: | ||
- image | ||
- build | ||
- test | ||
- release | ||
|
||
include: | ||
- local: 'ci/docker/image_hash.yml' | ||
- local: 'ci/docker/prepare_image.yml' | ||
- local: 'ci/cmake_and_ctest.yml' | ||
- local: 'ci/linktest.yml' | ||
- local: 'ci/russcip.yml' | ||
- local: 'ci/valgrind.yml' |
This file was deleted.
Oops, something went wrong.
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,62 @@ | ||
.cmake: | ||
stage: build | ||
image: | ||
name: ${IMAGE} | ||
needs: | ||
- "prepare image" | ||
tags: | ||
- compile | ||
variables: | ||
CFLAGS: "-Werror -s" | ||
CXXFLAGS: "-Werror -s" | ||
script: | ||
- mkdir -p $CI_PROJECT_DIR/builds/scip | ||
- cd $CI_PROJECT_DIR/builds/scip | ||
- export CFLAGS=$CFLAGS | ||
- export CXXFLAGS=$CXXFLAGS | ||
- cmake $CI_PROJECT_DIR ${CMAKE_FLAGS} -LA -DZIMPL=off -DREADLINE=off -DBoost_USE_STATIC_LIBS=on -DSTATIC_GMP=on -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ | ||
- make -j | ||
- ./bin/scip -f $CI_PROJECT_DIR/check/instances/MINLP/ex1224.nl | ||
- make all_executables -j | ||
- for gen in ${CPACK_GENERATORS}; do cpack -G $gen; done | ||
- mv SCIP-*-Linux.* $CI_PROJECT_DIR/ | ||
artifacts: | ||
paths: | ||
- $CI_PROJECT_DIR/SCIP-${SCIP_VERSION}-Linux.* | ||
|
||
"cmake release gcc": | ||
extends: .cmake | ||
variables: | ||
CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=Release" | ||
CPACK_GENERATORS: "STGZ DEB" | ||
|
||
"cmake debug gcc": | ||
extends: .cmake | ||
variables: | ||
CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=Debug" | ||
CPACK_GENERATORS: "STGZ" | ||
|
||
"cmake release with debug info": | ||
extends: .cmake | ||
variables: | ||
# turn off block/buffer memory for better memory leak checks with valgrind in valgrind-job | ||
CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DNOBLKBUFMEM=on" | ||
CPACK_GENERATORS: "STGZ" | ||
|
||
"ctest": | ||
stage: build | ||
image: | ||
name: ${IMAGE} | ||
needs: | ||
- "prepare image" | ||
tags: | ||
- compile | ||
script: | ||
- mkdir -p $CI_PROJECT_DIR/builds/scip | ||
- cd $CI_PROJECT_DIR/builds/scip | ||
- export CFLAGS=$CFLAGS | ||
- export CXXFLAGS=$CXXFLAGS | ||
- cmake $CI_PROJECT_DIR ${CMAKE_FLAGS} -LA -DZIMPL=off -DREADLINE=off -DBoost_USE_STATIC_LIBS=on -DSTATIC_GMP=on -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ | ||
- make -j | ||
- ./bin/scip -f $CI_PROJECT_DIR/check/instances/MINLP/ex1224.nl | ||
- ctest --output-on-failure -j -T test --no-compress-output |
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,127 @@ | ||
FROM quay.io/pypa/manylinux2014_x86_64 | ||
|
||
ENV BOOST_MAJOR=1 | ||
ENV BOOST_MINOR=73 | ||
ENV BOOST_PATCH=0 | ||
ENV GMP_VERSION=6.3.0 | ||
ENV METIS_VERSION=5.1.1 | ||
ENV LAPACK_VERSION=3.12.0 | ||
ENV MUMPS_VERSION=3.0.5 | ||
ENV IPOPT_VERSION=3.14.14 | ||
ENV TBB_VERSION=2021.10.0 | ||
ENV CRITERION_VERSION=2.4.2 | ||
ENV PAPILO_REVISION=v2.2.0 | ||
ENV SOPLEX_REVISION=release-700 | ||
|
||
RUN yum update -y && \ | ||
yum install -y \ | ||
gcc \ | ||
gcc-c++ \ | ||
libgfortran \ | ||
make \ | ||
cmake \ | ||
git \ | ||
wget \ | ||
glibc-static && \ | ||
yum clean all | ||
|
||
# lapack and blas | ||
WORKDIR /home/builds | ||
|
||
RUN wget https://github.com/Reference-LAPACK/lapack/archive/refs/tags/v$LAPACK_VERSION.tar.gz && \ | ||
tar xfz v$LAPACK_VERSION.tar.gz && \ | ||
cd /home/builds/lapack-$LAPACK_VERSION && \ | ||
mkdir build && \ | ||
cd /home/builds/lapack-$LAPACK_VERSION/build && \ | ||
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON && \ | ||
make -j && \ | ||
mv lib/libblas.a /usr/local/lib && \ | ||
mv lib/liblapack.a /usr/local/lib && \ | ||
rm -rf /home/builds/* | ||
|
||
# gmp | ||
RUN wget https://gmplib.org/download/gmp/gmp-$GMP_VERSION.tar.xz && \ | ||
tar xf gmp-$GMP_VERSION.tar.xz && \ | ||
cd /home/builds/gmp-$GMP_VERSION && \ | ||
./configure --with-pic --enable-cxx --disable-shared && \ | ||
make install -j && \ | ||
rm -rf /home/builds/* | ||
|
||
# gklib and metis | ||
RUN wget https://github.com/KarypisLab/GKlib/archive/refs/tags/METIS-v$METIS_VERSION-DistDGL-0.5.tar.gz && \ | ||
tar xfz METIS-v$METIS_VERSION-DistDGL-0.5.tar.gz && \ | ||
cd /home/builds/GKlib-METIS-v$METIS_VERSION-DistDGL-0.5 && \ | ||
make config prefix=/home/builds/GKlib-METIS-v$METIS_VERSION-DistDGL-0.5 && \ | ||
make -j && \ | ||
make install && \ | ||
cd /home/builds && \ | ||
wget https://github.com/KarypisLab/METIS/archive/refs/tags/v$METIS_VERSION-DistDGL-v0.5.tar.gz && \ | ||
tar xfz v$METIS_VERSION-DistDGL-v0.5.tar.gz && \ | ||
cd /home/builds/METIS-$METIS_VERSION-DistDGL-v0.5 && \ | ||
make config prefix=/usr/local gklib_path=/home/builds/GKlib-METIS-v$METIS_VERSION-DistDGL-0.5 && \ | ||
make && \ | ||
make install && \ | ||
rm -rf /home/builds/* | ||
|
||
# mumps | ||
RUN wget https://github.com/coin-or-tools/ThirdParty-Mumps/archive/refs/tags/releases/$MUMPS_VERSION.zip && \ | ||
unzip $MUMPS_VERSION.zip && \ | ||
cd /home/builds/ThirdParty-Mumps-releases-$MUMPS_VERSION && \ | ||
./get.Mumps && ./configure --disable-shared --enable-static --with-lapack-lflags="-llapack -lblas -lgfortran -lquadmath -lm" && \ | ||
make -j && \ | ||
make install && \ | ||
rm -rf /home/builds/* | ||
|
||
# ipopt | ||
RUN wget https://github.com/coin-or/Ipopt/archive/releases/$IPOPT_VERSION.zip && \ | ||
unzip $IPOPT_VERSION.zip && \ | ||
cd /home/builds/Ipopt-releases-$IPOPT_VERSION && \ | ||
./configure --enable-static --disable-shared --with-lapack="-llapack -lblas -lgfortran -lquadmath -lm" && \ | ||
make -j && make install && \ | ||
rm -rf /home/builds/* | ||
|
||
# boost | ||
RUN echo "Download boost from https://boostorg.jfrog.io/artifactory/main/release/${BOOST_MAJOR}.${BOOST_MINOR}.${BOOST_PATCH}/source/boost_${BOOST_MAJOR}_${BOOST_MINOR}_${BOOST_PATCH}.tar.gz" && \ | ||
wget https://boostorg.jfrog.io/artifactory/main/release/${BOOST_MAJOR}.${BOOST_MINOR}.${BOOST_PATCH}/source/boost_${BOOST_MAJOR}_${BOOST_MINOR}_${BOOST_PATCH}.tar.gz && \ | ||
tar xfz boost_${BOOST_MAJOR}_${BOOST_MINOR}_${BOOST_PATCH}.tar.gz && \ | ||
cd /home/builds/boost_${BOOST_MAJOR}_${BOOST_MINOR}_${BOOST_PATCH} && \ | ||
./bootstrap.sh --with-libraries=program_options,serialization && \ | ||
./b2 -j3 install && \ | ||
rm -rf /home/builds/* | ||
|
||
# soplex | ||
RUN git clone https://github.com/scipopt/soplex.git && \ | ||
cd /home/builds/soplex && \ | ||
git checkout $SOPLEX_REVISION && \ | ||
mkdir /home/builds/soplex/build && \ | ||
cd /home/builds/soplex/build && \ | ||
cmake .. -DCMAKE_BUILD_TYPE=Release && \ | ||
make -j && \ | ||
make install && \ | ||
rm -rf /home/builds/* | ||
|
||
# tbb | ||
RUN wget https://github.com/oneapi-src/oneTBB/archive/refs/tags/v$TBB_VERSION.tar.gz && \ | ||
tar xvf v$TBB_VERSION.tar.gz && \ | ||
mkdir /home/builds/oneTBB-$TBB_VERSION/build && \ | ||
cd /home/builds/oneTBB-$TBB_VERSION/build && \ | ||
cmake .. -DCMAKE_BUILD_TYPE=Release -DTBB_TEST=OFF -DTBB_EXAMPLES=OFF -DTBB4PY_BUILD=OFF -DBUILD_SHARED_LIBS=off && \ | ||
make -j3 && make install && \ | ||
rm -rf /home/builds/* | ||
|
||
# papilo | ||
RUN git clone https://github.com/scipopt/papilo.git && \ | ||
cd /home/builds/papilo && \ | ||
git checkout $PAPILO_REVISION && \ | ||
mkdir /home/builds/papilo/build && \ | ||
cd /home/builds/papilo/build && \ | ||
cmake .. -DCMAKE_BUILD_TYPE=Release -DQUADMATH=off -DBLA_STATIC=ON -DBLA_VENDOR=OpenBLAS && \ | ||
make -j5 && \ | ||
make install && \ | ||
rm -rf /home/builds/* | ||
|
||
# criterion | ||
RUN wget https://github.com/Snaipe/Criterion/releases/download/v2.4.2/criterion-$CRITERION_VERSION-linux-x86_64.tar.xz && \ | ||
tar xf criterion-$CRITERION_VERSION-linux-x86_64.tar.xz && \ | ||
cp -r criterion-$CRITERION_VERSION/* /usr/local && \ | ||
rm -rf /home/builds/* |
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,3 @@ | ||
variables: | ||
# use "md5sum ci/docker/Dockerfile" to get the hash of the Dockerfile | ||
IMAGE_HASH: 1c85ceab9afc81ad147202548b0a781b |
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,31 @@ | ||
"prepare image": | ||
stage: image | ||
tags: | ||
- compile | ||
image: | ||
# Use a container image that can container docker images without a docker daemon | ||
name: gcr.io/kaniko-project/executor:debug | ||
entrypoint: [""] | ||
script: | ||
# Error out of $IMAGE_HASH is not set | ||
- if [ -z "$IMAGE_HASH" ]; then | ||
echo "IMAGE_HASH is not set. Check that it is set in ci/docker/image_hash.yml and that the file is included in .gitlab-ci.yml"; | ||
exit 1; | ||
fi | ||
# Calculate the MD5 hash of the file | ||
- computed_hash=$(md5sum ${IMAGE_PATH} | awk '{print $1}') | ||
# Compare the computed hash with the expected hash | ||
- if [ $computed_hash != $IMAGE_HASH ]; then | ||
echo Hashes do not match! IMAGE_HASH defined in .gitlab-ci.yml has to match the md5sum of ci/docker/Dockerfile.; | ||
exit 1; | ||
fi | ||
# Set gitlab registry credentials | ||
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"},\"$CI_DEPENDENCY_PROXY_SERVER\":{\"auth\":\"$(printf "%s:%s" ${CI_DEPENDENCY_PROXY_USER} "${CI_DEPENDENCY_PROXY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json | ||
# Build and push the image | ||
- /kaniko/executor | ||
--context "${CI_PROJECT_DIR}" | ||
--dockerfile "${IMAGE_PATH}" | ||
--destination "${IMAGE}" | ||
--cache=true | ||
--cache-repo="${CI_REGISTRY}/integer/scip/ci_cache" | ||
--cache-ttl=168h |
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,32 @@ | ||
".linktest": | ||
stage: test | ||
variables: | ||
GIT_STRATEGY: none | ||
script: | ||
- apt-get update && apt-get install -y gfortran | ||
- ./SCIP-*-Linux*.sh --skip-license | ||
- bin/scip -v | ||
|
||
"linktest debian11": | ||
extends: ".linktest" | ||
image: debian:11-slim | ||
needs: | ||
- "cmake release gcc" | ||
|
||
"linktest debian12": | ||
extends: ".linktest" | ||
image: debian:12-slim | ||
needs: | ||
- "cmake release gcc" | ||
|
||
"linktest ubuntu20": | ||
extends: ".linktest" | ||
image: ubuntu:20.04 | ||
needs: | ||
- "cmake release gcc" | ||
|
||
"linktest ubuntu22": | ||
extends: ".linktest" | ||
image: ubuntu:22.04 | ||
needs: | ||
- "cmake release gcc" |
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,21 @@ | ||
russcip: | ||
stage: test | ||
image: | ||
name: rust:latest | ||
needs: | ||
- "cmake release gcc" | ||
variables: | ||
GIT_STRATEGY: none | ||
RUSSCIP_REVISION: b44bc33 | ||
script: | ||
- apt-get update && apt-get install -y clang gfortran | ||
|
||
- cd /usr/ | ||
- $CI_PROJECT_DIR/SCIP-${SCIP_VERSION}-Linux.sh --skip-license | ||
- mv /usr/lib64/libscip.so* /usr/lib/x86_64-linux-gnu/ | ||
|
||
- cd ${CI_PROJECT_DIR} | ||
- git clone https://github.com/scipopt/russcip.git | ||
- cd russcip | ||
- git checkout $RUSSCIP_REVISION | ||
- cargo test --release |
This file was deleted.
Oops, something went wrong.
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,31 @@ | ||
valgrind: | ||
stage: test | ||
image: | ||
name: debian:12-slim | ||
needs: | ||
- "cmake release with debug info" | ||
script: | ||
- ls /IP | ||
- apt-get update && apt-get install -y make gfortran valgrind git | ||
|
||
- ln -fs /IP ${CI_PROJECT_DIR}/check/IP | ||
- ln -s /IP/instancedata ${CI_PROJECT_DIR}/check/instancedata | ||
|
||
- mkdir scipbuild | ||
- cd scipbuild | ||
- $CI_PROJECT_DIR/SCIP-${SCIP_VERSION}-Linux.sh --skip-license | ||
- cd ${CI_PROJECT_DIR} | ||
|
||
- make test EXECUTABLE=scipbuild/bin/scip TEST=short_valgrind OPT=opt EXCLUSIVE=false MEM=12000 QUEUE=opt-low DEBUGTOOL=valgrind TIME=60 | ||
- nfailed=$((grep fail ${CI_PROJECT_DIR}/check/results/check*.res || true) | wc -l) | ||
- if [ "$nfailed" == '0' ]; then exit 0; fi | ||
- failed=`grep fail ${CI_PROJECT_DIR}/check/results/check*.res` | ||
- echo instances with status 'fail' | ||
- echo "$failed" | ||
- for inst in $(echo "$failed"|cut -d ' ' -f 1); do cat ${CI_PROJECT_DIR}/check/results/*$inst*.out; done | ||
- echo "There are failed instances. Aborting." | ||
- exit 1 | ||
artifacts: | ||
when: on_failure | ||
paths: | ||
- $CI_PROJECT_DIR/check/results |