93be33a6c2 Add complete predicate REVERT: 4f10c82056 Merge branch 'MiniZinc:master' into feature/on_restart REVERT: 0848ce7ec7 Add changelog for 2.5.5 REVERT: 44e2f770d5 Add test for insertion of ArrayLits into CSE REVERT: 8a68d3dea8 Don't insert par expressions into CSE map unless they're an ArrayLit REVERT: 6bf6f1180f Increase version number of development build REVERT: dcaac92a74 Make min/max on array of opt vars return non-optional var. This is consistent with other functions on optional arrays like sum, product, exists, forall. REVERT: 32aa288884 Update changelog REVERT: a4edf0669f Fix flattening of all-par set literals REVERT: 8c1c9605f6 Fix chain compressor, needs to ignore par constants REVERT: 0cad1c6306 Use file_path on include paths to ensure separator consistency REVERT: 05ad7d1931 Update changelog REVERT: 22f5e2557b Define HAVE_CONFIG_H only for UNIX REVERT: 81c7778d55 Define HAVE_CONFIG_H for CBC REVERT: 1f56608e10 mzn-test: don't check symmetry breaking constraints REVERT: 1a9767457e mzn-test: fix parsing %%%mzn-stat: ... output REVERT: a41533fd54 MIP: report CPU time in %%%mzn-stat: solveTime= REVERT: 9d490acd52 Updated docs on OR-Tools v8 installation REVERT: c513f6599f Add changelog for 2.5.4 REVERT: b2eef2772b Follow ids to declarations when flattening par arrays. Fixes #448. REVERT: c5c846d426 Check if result of flattening rhs of a vardecl is par. REVERT: c496052767 Escape strings when pretty printing include items REVERT: 9e379c995e Canonicalise file names before adding include items into "already seen" list REVERT: d5d5d0d88c Use generic flattening inside generators. Fixes #451. REVERT: dc8630a6e9 Small fix to multi-pass library change: use original include path if it is absolute REVERT: 79c6092bd8 Strip library paths from includes in multi-pass compilation. Fixes #455. REVERT: 897875d6d7 Compile infinite domains with holes into constraints. Fixes #457. REVERT: b4e700dc67 Don't create copies of global declarations when creating par versions of functions REVERT: 0e8cc42bb1 Fix typechecker to coerce bool to int in the objective. REVERT: e05523b344 Add test for dzn output of arrays REVERT: 1e0269000e Don't evaluate output_only arrays when generating dzn output. REVERT: 57018c31d6 Fix matrix transposition in lex2 globals REVERT: 2617c0c829 Fix output variables in lex_chain tests REVERT: ef1a250c98 another efort to fix tests REVERT: c00e199dfd Fix test globals_lex_chain.mzn REVERT: b5c997d045 Fix code analysis REVERT: 3352cf0bd5 SCIP constraint handler for lex_chain_..._orbitope REVERT: 4e71a2cc97 Globals lex_chain_..., including lex_chain_..._orbitope REVERT: d807428baf Move test specifcation into the correct folder REVERT: 5be74bc74d MIP decompositions for lex_less_(bool, int, float) REVERT: 36a554ba40 Don't modify infinte domain of optional variables. Fixes #456. REVERT: f9e5306d75 Run clang-format REVERT: 4b57667608 Fix comment reference to relevant test case REVERT: 648f2ab36d Fix equality of indirection annotations REVERT: ef7be5fd78 MIP decompositions for lex_lesseq_(bool=int, float) REVERT: 6511b14e73 Propagate cv flag correctly. REVERT: 6f27ecf1c0 Never insert par expressions into the CSE map. REVERT: 7414f3ca0f Fix cplex id in example configuration REVERT: 7ad7cec506 Update strictly_decreasing with documentation and opt version REVERT: 8029f6e957 Support undefined enums in type checker. REVERT: 79e0f0f546 Revert using mzn_in_symmetry_breaking_constraint() for SCIP's orbisack REVERT: e88efda76c Fix format REVERT: 4802031dc1 Added test mzn_in_symmetry_breaking_constraint() REVERT: e21cc2515a More format fixes 02 ... REVERT: 5bbd67c130 More format fixes... REVERT: d5f9b777ea Format fixes REVERT: 43757a09a0 Remove MIP-specific fzn_less(eq)_bool(_reif).mzn REVERT: c93b5736a3 SCIP: orbisack constraint handler 'fzn_lex_lesseq__orbisack' REVERT: 4516bb4e2c mzn-test.py: add OR-Tools as checker REVERT: e2176f017d Add fix and test for crash with empty enum. REVERT: ac7db35951 Fix documentation bugs. REVERT: 47ba245832 Fix the incorrect renaming of key in model output interface REVERT: 925796ed20 Fail on empty var domains in agenda REVERT: 1ec19d7025 Fix error messages in CMake FindGurobi, FindCPlex REVERT: 6d169475c1 mzn-test.py: Use -i for intermediate solutions REVERT: df2f3e423a Allow coercion of JSON lists to enum definitions REVERT: 2b0b8165e5 Fix clang-tidy errors REVERT: 6597bc1920 Change the CI build image location REVERT: 360c988452 Remove illegal duplicate keys in .gitlab-ci.yml REVERT: 6a5d69c64b Add missing par opt versions of coercion functions REVERT: 63014e3d8f Don't propagate annotations into annotation calls. Avoids infinite recursion. REVERT: 54b19428ab Don't use GRB_INT_PAR_NONCONVEX if it's undefined REVERT: a5bb56c47d Added piecewise_linear for non-continuous intervals git-subtree-dir: software/minizinc git-subtree-split: 93be33a6c254e54be7cd38abb7ebd6a6022f0c46
297 lines
12 KiB
YAML
297 lines
12 KiB
YAML
stages:
|
|
- build
|
|
- test
|
|
- trigger
|
|
|
|
.download_vendor: &download_vendor
|
|
- curl --location --header "PRIVATE-TOKEN:$ACCESS_TOKEN" --silent https://gitlab.com/api/v4/snippets/1796163/raw | tr -d '\r' > download.sh
|
|
- sh download.sh vendor master vendor:${MZNARCH} vendor.zip
|
|
- unzip -q vendor.zip
|
|
|
|
.download_vendor: &download_vendor_win
|
|
- curl -o download.sh --location --header "PRIVATE-TOKEN:%ACCESS_TOKEN%" --silent https://gitlab.com/api/v4/snippets/1796163/raw
|
|
- dos2unix download.sh
|
|
- sh download.sh vendor master vendor:%MZNARCH% vendor.zip
|
|
- unzip -q vendor.zip
|
|
|
|
.download_bundle: &download_bundle
|
|
- curl --location --header "PRIVATE-TOKEN:$ACCESS_TOKEN" --silent https://gitlab.com/api/v4/snippets/1796163/raw | tr -d '\r' > download.sh
|
|
- sh download.sh vendor master bundle:${MZNARCH} vendor.zip
|
|
- unzip -q vendor.zip
|
|
|
|
.download_bundle: &download_bundle_win
|
|
- curl -o download.sh --location --header "PRIVATE-TOKEN:%ACCESS_TOKEN%" --silent https://gitlab.com/api/v4/snippets/1796163/raw
|
|
- dos2unix download.sh
|
|
- sh download.sh vendor master bundle:%MZNARCH% vendor.zip
|
|
- unzip -q vendor.zip
|
|
|
|
variables:
|
|
# CCache settings
|
|
CCACHE_DIR: "$CI_PROJECT_DIR/.ccache"
|
|
CCACHE_MAXSIZE: "100M"
|
|
|
|
default:
|
|
interruptible: true
|
|
|
|
# ----------- Build MiniZinc -----------
|
|
|
|
.build:
|
|
stage: build
|
|
before_script:
|
|
- *download_vendor
|
|
script:
|
|
- cmake -S . -B build -G"$CMAKE_ARCH" -DCMAKE_BUILD_TYPE=Release -DBUILD_REF=$CI_PIPELINE_ID -DUSE_PROPRIETARY=OFF -DGecode_ROOT="$CI_PROJECT_DIR/vendor/gecode" -DGurobi_ROOT="$CI_PROJECT_DIR/vendor/gurobi" -DCPlex_ROOT="$CI_PROJECT_DIR/vendor/CPLEX_Studio/cplex" -DOsiCBC_ROOT="$CI_PROJECT_DIR/vendor/cbc" -DSCIP_ROOT="$CI_PROJECT_DIR/vendor/scip" -DXpress_ROOT="$CI_PROJECT_DIR/vendor/xpressmp" -DCMAKE_INSTALL_PREFIX="$CI_PROJECT_DIR/minizinc"
|
|
- cmake --build build --config Release --target install
|
|
artifacts:
|
|
paths: [minizinc/]
|
|
cache:
|
|
key: "$CI_JOB_STAGE:$CI_JOB_NAME"
|
|
paths: [.ccache, vendor.zip*]
|
|
only: [tags, merge_requests, pipelines, develop, master, feature/on_restart]
|
|
|
|
build:linux:
|
|
extends: .build
|
|
image: dekker1/minibuild:cpp
|
|
variables:
|
|
MZNARCH: "linux"
|
|
CMAKE_ARCH: "Ninja"
|
|
tags: [linux, docker]
|
|
|
|
build:musl:
|
|
extends: .build
|
|
image: dekker1/minibuild:alpine
|
|
variables:
|
|
MZNARCH: "musl"
|
|
CMAKE_ARCH: "Ninja"
|
|
tags: [linux, docker]
|
|
|
|
build:osx:
|
|
extends: .build
|
|
variables:
|
|
MZNARCH: "osx"
|
|
CMAKE_ARCH: "Ninja"
|
|
tags: [osx, cmake, cpp]
|
|
|
|
build:win64:
|
|
extends: .build
|
|
variables:
|
|
MZNARCH: "win64"
|
|
CMAKE_ARCH: "Ninja"
|
|
BUILDCACHE_DIR: "$CI_PROJECT_DIR/.ccache"
|
|
BUILDCACHE_MAX_CACHE_SIZE: "104857600"
|
|
before_script:
|
|
- *download_vendor_win
|
|
script:
|
|
- cmake -S . -B build -G"%CMAKE_ARCH%" -DCMAKE_BUILD_TYPE=Release -DBUILD_REF=%CI_PIPELINE_ID% -DCCACHE_PROGRAM:STRING=buildcache -DUSE_PROPRIETARY=OFF -DGecode_ROOT="%CI_PROJECT_DIR%/vendor/gecode" -DGurobi_ROOT="%CI_PROJECT_DIR%/vendor/gurobi" -DCPlex_ROOT="%CI_PROJECT_DIR%/vendor/CPLEX_Studio/cplex" -DOsiCBC_ROOT="%CI_PROJECT_DIR%/vendor/cbc" -DSCIP_ROOT="%CI_PROJECT_DIR%/vendor/scip" -DXpress_ROOT="%CI_PROJECT_DIR%/vendor/xpressmp" -DCMAKE_INSTALL_PREFIX="%CI_PROJECT_DIR%/minizinc"
|
|
- cmake --build build --config Release --target install
|
|
cache:
|
|
key: "build_win64"
|
|
tags: [win64, cmake, cpp, ninja, buildcache]
|
|
|
|
build:wasm_complete:
|
|
extends: .build
|
|
image: emscripten/emsdk
|
|
variables:
|
|
MZNARCH: "wasm"
|
|
CMAKE_ARCH: "Unix Makefiles"
|
|
script:
|
|
- apt-get update && apt-get install -qq python3
|
|
- emcmake cmake -S . -B build -G"$CMAKE_ARCH" -DCMAKE_FIND_ROOT_PATH="/" -DCMAKE_BUILD_TYPE=MinSizeRel -v -DBUILD_REF=$CI_PIPELINE_ID -DUSE_PROPRIETARY=OFF -DGecode_ROOT="$CI_PROJECT_DIR/vendor/gecode" -DGurobi_ROOT="$CI_PROJECT_DIR/vendor/gurobi" -DCPlex_ROOT="$CI_PROJECT_DIR/vendor/CPLEX_Studio/cplex" -DOsiCBC_ROOT="$CI_PROJECT_DIR/vendor/cbc" -DSCIP_ROOT="$CI_PROJECT_DIR/vendor/scip" -DXpress_ROOT="$CI_PROJECT_DIR/vendor/xpressmp" -DCMAKE_INSTALL_PREFIX="$CI_PROJECT_DIR/minizinc"
|
|
- cmake --build build --config MinSizeRel --target install
|
|
tags: [docker, high-mem]
|
|
when: manual
|
|
|
|
build:wasm_minimal:
|
|
extends: .build
|
|
image: emscripten/emsdk
|
|
variables:
|
|
MZNARCH: "wasm"
|
|
CMAKE_ARCH: "Unix Makefiles"
|
|
script:
|
|
- apt-get update && apt-get install -qq python3
|
|
- emcmake cmake -S . -B build -G"$CMAKE_ARCH" -DCMAKE_BUILD_TYPE=MinSizeRel -v -DBUILD_REF=$CI_PIPELINE_ID -DUSE_PROPRIETARY=OFF -DGecode_ROOT="$CI_PROJECT_DIR/vendor/gecode" -DGurobi_ROOT="$CI_PROJECT_DIR/vendor/gurobi" -DCPlex_ROOT="$CI_PROJECT_DIR/vendor/CPLEX_Studio/cplex" -DOsiCBC_ROOT="$CI_PROJECT_DIR/vendor/cbc" -DSCIP_ROOT="$CI_PROJECT_DIR/vendor/scip" -DXpress_ROOT="$CI_PROJECT_DIR/vendor/xpressmp" -DCMAKE_INSTALL_PREFIX="$CI_PROJECT_DIR/minizinc"
|
|
- cmake --build build --config MinSizeRel --target install
|
|
tags: [docker]
|
|
when: manual
|
|
|
|
# ----------- Test Suite -----------
|
|
|
|
test:format:
|
|
stage: test
|
|
image: dekker1/minibuild:clang-format
|
|
script:
|
|
- cmake -S . -B build -GNinja -DCLANG_FORMAT_EXECUTABLE="run-clang-format" -DCLANG_FORMAT_FLAGS="--color always"
|
|
- cmake --build build --target format
|
|
tags: [linux, docker]
|
|
only:
|
|
changes:
|
|
- "**/*.{cpp,c,h,hh,hpp}"
|
|
- .clang-format
|
|
refs:
|
|
- merge_requests
|
|
needs: []
|
|
|
|
test:analyse:
|
|
extends: .build
|
|
stage: test
|
|
image: dekker1/minibuild:clang-tidy
|
|
variables:
|
|
MZNARCH: "linux"
|
|
CMAKE_ARCH: "Ninja"
|
|
script:
|
|
- cmake -S . -B build -G"$CMAKE_ARCH" -DCMAKE_CXX_CLANG_TIDY="clang-tidy" -DCMAKE_BUILD_TYPE="Debug" -DGecode_ROOT="$CI_PROJECT_DIR/vendor/gecode" -DGurobi_ROOT="$CI_PROJECT_DIR/vendor/gurobi" -DCPlex_ROOT="$CI_PROJECT_DIR/vendor/CPLEX_Studio/cplex" -DOsiCBC_ROOT="$CI_PROJECT_DIR/vendor/cbc" -DSCIP_ROOT="$CI_PROJECT_DIR/vendor/scip" -DXpress_ROOT="$CI_PROJECT_DIR/vendor/xpressmp"
|
|
- cmake --build build --config Debug
|
|
tags: [linux, docker]
|
|
only:
|
|
changes:
|
|
- "**/*.{cpp,c,h,hh,hpp}"
|
|
- .clang-tidy
|
|
refs:
|
|
- merge_requests
|
|
needs: []
|
|
|
|
.tests:
|
|
stage: test
|
|
variables:
|
|
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
|
|
MZN_SOLVER_PATH: "$CI_PROJECT_DIR/vendor/chuffed/share/minizinc/solvers/:$CI_PROJECT_DIR/vendor/gecode"
|
|
before_script:
|
|
- *download_bundle
|
|
# TODO: Add gecode configuration to the Gecode solver
|
|
- "echo '{\"id\":\"org.gecode.gecode\",\"name\":\"Gecode\",\"description\":\"Gecode FlatZinc executable\",\"version\":\"6.1.1\",\"mznlib\":\"share/gecode/mznlib\",\"executable\":\"bin/fzn-gecode\",\"tags\":[\"cp\",\"int\",\"float\",\"set\",\"restart\"],\"stdFlags\":[\"-a\",\"-f\",\"-n\",\"-p\",\"-r\",\"-s\",\"-t\"],\"extraFlags\":[[\"-c-d\",\"Recomputation commit distance\",\"int\",\"8\"],[\"-a-d\",\"Recomputation adaption distance\",\"int\",\"2\"],[\"-decay\",\"Decay factor\",\"float\",\"0.99\"],[\"-node\",\"Node cutoff\",\"int\",\"0\"],[\"-fail\",\"Failure cutoff\",\"int\",\"0\"],[\"-restart\",\"Restart sequence type\",\"opt:none:constant:linear:luby:geometric\",\"none\"],[\"-restart-base\",\"Base for geometric restart sequence\",\"float\",\"1.5\"],[\"-restart-scale\",\"Scale factor for restart sequence\",\"int\",\"250\"],[\"-nogoods\",\"Use no-goods from restarts\",\"bool\",\"false\"],[\"-nogoods-limit\",\"Depth limit for no-good extraction\",\"int\",\"128\"]],\"supportsMzn\":false,\"supportsFzn\":true,\"needsSolns2Out\":true,\"needsMznExecutable\":false,\"needsStdlibDir\":false,\"isGUIApplication\":false}' > vendor/gecode/gecode.msc"
|
|
- export PATH=$CI_PROJECT_DIR/minizinc/bin:$PATH
|
|
- minizinc --solvers
|
|
- cd tests
|
|
- python3 -m venv env
|
|
- source env/bin/activate
|
|
- pip install -r requirements.txt
|
|
after_script:
|
|
- echo "Test results at https://minizinc.gitlab.io/-/minizinc/-/jobs/${CI_JOB_ID}/artifacts/tests/output/report.html"
|
|
artifacts:
|
|
when: always
|
|
paths:
|
|
- tests/output
|
|
reports:
|
|
junit: tests/output/junit*.xml
|
|
cache:
|
|
key: "$CI_JOB_STAGE:$CI_JOB_NAME"
|
|
paths: [.cache/pip, vendor.zip*]
|
|
only: [merge_requests, pipelines, master]
|
|
|
|
# Linux specific config
|
|
.tests_linux:
|
|
extends: .tests
|
|
image: python:latest
|
|
variables:
|
|
MZNARCH: "linux"
|
|
tags: [linux, docker]
|
|
dependencies: ["build:linux"]
|
|
needs: ["build:linux"]
|
|
|
|
# OSX specific config
|
|
.tests_osx:
|
|
extends: .tests
|
|
variables:
|
|
MZNARCH: "osx"
|
|
tags: [osx]
|
|
dependencies: ["build:osx"]
|
|
needs: ["build:osx"]
|
|
|
|
# Windows specific config
|
|
.tests_win64:
|
|
extends: .tests
|
|
variables:
|
|
MZNARCH: "win64"
|
|
MZN_SOLVER_PATH: "$CI_PROJECT_DIR/vendor/chuffed/share/minizinc/solvers;$CI_PROJECT_DIR/vendor/gecode"
|
|
before_script:
|
|
- *download_bundle_win
|
|
# TODO: Add gecode configuration to the Gecode solver
|
|
- 'echo {"id":"org.gecode.gecode","name":"Gecode","description":"Gecode FlatZinc executable","version":"6.1.1","mznlib":"share/gecode/mznlib","executable":"bin/fzn-gecode","tags":["cp","int","float","set","restart"],"stdFlags":["-a","-f","-n","-p","-r","-s","-t"],"extraFlags":[["-c-d","Recomputation commit distance","int","8"],["-a-d","Recomputation adaption distance","int","2"],["-decay","Decay factor","float","0.99"],["-node","Node cutoff","int","0"],["-fail","Failure cutoff","int","0"],["-restart","Restart sequence type","opt:none:constant:linear:luby:geometric","none"],["-restart-base","Base for geometric restart sequence","float","1.5"],["-restart-scale","Scale factor for restart sequence","int","250"],["-nogoods","Use no-goods from restarts","bool","false"],["-nogoods-limit","Depth limit for no-good extraction","int","128"]],"supportsMzn":false,"supportsFzn":true,"needsSolns2Out":true,"needsMznExecutable":false,"needsStdlibDir":false,"isGUIApplication":false} > vendor/gecode/gecode.msc'
|
|
- set PATH=%CI_PROJECT_DIR%/minizinc/bin;%PATH%
|
|
- cd tests
|
|
- python -m venv env
|
|
- call env\Scripts\activate.bat
|
|
- pip install -r requirements.txt
|
|
after_script:
|
|
- 'echo Test results at https://minizinc.gitlab.io/-/minizinc/-/jobs/%CI_JOB_ID%/artifacts/tests/output/report.html'
|
|
tags: [win64]
|
|
dependencies: ["build:win64"]
|
|
needs: ["build:win64"]
|
|
cache:
|
|
key: test_win64
|
|
|
|
.tests_fast:
|
|
script:
|
|
- pytest
|
|
|
|
.tests_full:
|
|
script:
|
|
- pytest --all-suites
|
|
when: manual
|
|
|
|
test:linux:fast:
|
|
extends: [.tests_linux, .tests_fast]
|
|
|
|
test:linux:full:
|
|
extends: [.tests_linux, .tests_full]
|
|
|
|
test:osx:fast:
|
|
extends: [.tests_osx, .tests_fast]
|
|
|
|
test:osx:full:
|
|
extends: [.tests_osx, .tests_full]
|
|
|
|
test:win64:fast:
|
|
extends: [.tests_win64, .tests_fast]
|
|
cache:
|
|
key: test_win64_fast
|
|
|
|
test:win64:full:
|
|
extends: [.tests_win64, .tests_full]
|
|
cache:
|
|
key: test_win64_full
|
|
|
|
# ----------- Documentation -----------
|
|
|
|
documentation:
|
|
stage: test
|
|
image: guidotack/sphinx-doc:latest
|
|
variables:
|
|
MZNARCH: "linux"
|
|
before_script:
|
|
- *download_bundle
|
|
script:
|
|
- cp $CI_PROJECT_DIR/share/minizinc/gecode_presolver/gecode.mzn $CI_PROJECT_DIR/share/minizinc/std/
|
|
- cp $CI_PROJECT_DIR/vendor/chuffed/share/minizinc/chuffed/chuffed.mzn $CI_PROJECT_DIR/share/minizinc/std/
|
|
- echo 'include "globals.mzn"; include "gecode.mzn"; include "chuffed.mzn";' > $CI_PROJECT_DIR/share/minizinc/std/all.mzn
|
|
- ./minizinc/bin/mzn2doc --rst-output --include-stdlib --output-base $CI_PROJECT_DIR/docs/en/lib $CI_PROJECT_DIR/share/minizinc/std/all.mzn
|
|
- ./minizinc/bin/mzn2doc --rst-output --include-stdlib --output-base $CI_PROJECT_DIR/docs/chi/lib $CI_PROJECT_DIR/share/minizinc/std/all.mzn
|
|
- cd $CI_PROJECT_DIR/docs/en
|
|
- make html latexpdf
|
|
- cd $CI_PROJECT_DIR/docs/chi
|
|
- make html latexpdf
|
|
- mkdir -p $CI_PROJECT_DIR/docs-deploy/en
|
|
- mkdir -p $CI_PROJECT_DIR/docs-deploy/chi
|
|
- cp -r $CI_PROJECT_DIR/docs/en/_build/html/* $CI_PROJECT_DIR/docs-deploy/en/
|
|
- cp $CI_PROJECT_DIR/docs/en/_build/latex/MiniZinc.pdf $CI_PROJECT_DIR/docs-deploy/en/MiniZinc\ Handbook.pdf
|
|
- cp -r $CI_PROJECT_DIR/docs/chi/_build/html/* $CI_PROJECT_DIR/docs-deploy/chi/
|
|
- cp $CI_PROJECT_DIR/docs/chi/_build/latex/MiniZinc.pdf $CI_PROJECT_DIR/docs-deploy/chi/MiniZinc\ Handbook.pdf
|
|
artifacts:
|
|
paths:
|
|
- docs-deploy
|
|
tags:
|
|
- linux
|
|
- docker
|
|
only: [tags, merge_requests, pipelines, develop, master]
|
|
dependencies: ["build:linux"]
|
|
needs: ["build:linux"]
|
|
|
|
# ----------- Trigger FindMUS pipeline -----------
|
|
|
|
trigger:findmus:
|
|
stage: trigger
|
|
trigger:
|
|
project: minizinc/FindMUS
|
|
branch: develop
|
|
only: [develop]
|