Tweak minizinc-test #52
Workflow file for this run
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: MiniZinc test | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
clingconversion: [5.2.1] | |
minizincversion: [2.6.3] | |
fzn2lpversion: [v0.1.4] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
- name: Conda install clingcon | |
shell: bash -l {0} | |
run: | | |
conda create -n test | |
conda activate test | |
conda install -c "potassco/label/dev" clingcon=${{matrix.clingconversion}} | |
# - name: Install clingcon | |
# run: | | |
# sudo add-apt-repository ppa:potassco/wip | |
# sudo apt-get update | |
# sudo apt-get install clingcon=${{matrix.clingconversion}}-jammy4 | |
- name: Test clingcon | |
run: | | |
conda activate test | |
clingcon --version | |
- name: Install MiniZinc | |
run: | | |
wget https://github.com/MiniZinc/MiniZincIDE/releases/download/${{matrix.minizincversion}}/MiniZincIDE-${{matrix.minizincversion}}-bundle-linux-x86_64.tgz | |
tar xzf MiniZincIDE-${{matrix.minizincversion}}-bundle-linux-x86_64.tgz | |
echo "$(pwd)/MiniZincIDE-${{matrix.minizincversion}}-bundle-linux-x86_64/bin" >> $GITHUB_PATH | |
- name: Test MiniZinc | |
run: minizinc --version | |
- name: Checkout fzn2lp | |
uses: actions/checkout@v2 | |
with: | |
repository: "potassco/fzn2lp" | |
ref: ${{ matrix.fzn2lpversion }} | |
path: "fzn2lp" | |
- name: Build fzn2lp with current flatzinc | |
run: | | |
cd fzn2lp | |
sed -i 's|flatzinc = .*|flatzinc = { path = "../" }|g' Cargo.toml | |
cargo update | |
cargo build --release | |
echo "$(pwd)/target/release" >> $GITHUB_PATH | |
- name: Test fzn2lp | |
run: fzn2lp --version | |
- name: Checkout flatzingo | |
uses: actions/checkout@v2 | |
with: | |
repository: "potassco/flatzingo" | |
ref: "master" | |
path: "flatzingo" | |
- name: Install flatzingo | |
run: | | |
mkdir -p ~/.minizinc/solvers | |
mkdir -p ~/.minizinc/share | |
cp ./flatzingo/configuration/flatzingo.msc ~/.minizinc/solvers/ | |
cp -r ./flatzingo/share/minizinc/flatzingo ~/.minizinc/share/ | |
echo "$(pwd)/flatzingo" >> $GITHUB_PATH | |
- name: Install python stuff | |
run: | | |
sudo apt-get install -y python3-pip | |
pip3 install pytest | |
pip3 install --extra-index-url https://test.pypi.org/simple/ clingcon==${{matrix.clingconversion}}.post3 | |
- name: Test flatzingo | |
run: | | |
cd flatzingo | |
python3 -m pytest ./tests | |
- name: Checkout libminizinc | |
uses: actions/checkout@v2 | |
with: | |
repository: "MiniZinc/libminizinc" | |
ref: ${{ matrix.minizincversion }} | |
path: "libminizinc" | |
- name: Patch libminizinc 2.6.3 | |
run: | | |
sed -i 's/develop/0.6.0/' libminizinc/tests/requirements.txt | |
- name: Install libminizinc test requirements | |
run: pip3 install -r libminizinc/tests/requirements.txt | |
- name: Prepare libminizinc testcases | |
run: sed -i 's/"gecode", "cbc", "chuffed"/"flatzingo"/' libminizinc/tests/minizinc_testing/spec.py | |
- name: Run libminizinc tests | |
run: | | |
cd libminizinc/tests | |
pytest -k "not test_output_checker and not test_var_set_element and not bug269 and not bug347 and not test-search1" --driver=../../MiniZincIDE-${{ matrix.minizincversion }}-bundle-linux-x86_64/bin |