Skip to content

Commit

Permalink
one more quick merge of main
Browse files Browse the repository at this point in the history
  • Loading branch information
ozgurakgun committed Feb 26, 2024
2 parents 2dfdcd8 + ce04d2e commit ea977ab
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ on:
- Makefile
- src/**
- etc/build/**
- etc/hs-deps/**
- .github/workflows/build.yml
pull_request: # and for PRs
paths:
- conjure-cp.cabal
- Makefile
- src/**
- etc/build/**
- etc/hs-deps/**
- .github/workflows/build.yml
# other branches that want testing must create a PR

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- src/**
- tests/**
- etc/build/**
- etc/hs-deps/**
- etc/savilerow/**
- .github/workflows/test.yml
pull_request: # and for PRs
Expand All @@ -21,6 +22,7 @@ on:
- src/**
- tests/**
- etc/build/**
- etc/hs-deps/**
- etc/savilerow/**
- .github/workflows/test.yml
# other branches that want testing must create a PR
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ WORKDIR /conjure/
RUN mkdir -p /root/.local/bin
ENV PATH /root/.local/bin:$PATH
ENV LD_LIBRARY_PATH /root/.local/bin/lib:$LD_LIBRARY_PATH

ENV MZN_STDLIB_DIR /root/.local/bin/share/minizinc/
# Dependencies
RUN apt-get update
RUN apt-get install -y --no-install-recommends build-essential # so we can compile stuff
Expand Down Expand Up @@ -45,6 +45,7 @@ RUN PROCESSES=2 etc/build/install-glucose.sh
RUN PROCESSES=2 etc/build/install-kissat.sh
RUN PROCESSES=2 etc/build/install-lingeling.sh
RUN PROCESSES=2 etc/build/install-minion.sh
RUN PROCESSES=2 etc/build/install-minizinc.sh
RUN PROCESSES=2 etc/build/install-nbc_minisat_all.sh
RUN PROCESSES=2 etc/build/install-open-wbo.sh
RUN PROCESSES=2 etc/build/install-ortools.sh
Expand Down Expand Up @@ -72,6 +73,7 @@ FROM ubuntu:23.10
WORKDIR /conjure
ENV PATH /root/.local/bin:$PATH
ENV LD_LIBRARY_PATH /root/.local/bin/lib:$LD_LIBRARY_PATH
ENV MZN_STDLIB_DIR /root/.local/bin/share/minizinc/
RUN apt-get update
RUN apt-get install -y --no-install-recommends default-jre-headless # savilerow
RUN mkdir -p /root/.local/bin/lib
Expand Down
28 changes: 28 additions & 0 deletions etc/build/install-minizinc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

# version as of 23 February 2024
VERSION=2.8.3
set -o errexit
set -o nounset

export BIN_DIR=${BIN_DIR:-${HOME}/.local/bin}

rm -rf tmp-install-minizinc
mkdir tmp-install-minizinc
pushd tmp-install-minizinc
git clone https://github.com/MiniZinc/libminizinc.git
cd libminizinc
git checkout $VERSION
mkdir build
cd build
cmake ..
cmake --build .
cp minizinc ${BIN_DIR}/minizinc
mkdir -p ${BIN_DIR}/share
cp -r ../share/minizinc ${BIN_DIR}/share/minizinc
echo "minizinc executable is at ${BIN_DIR}/minizinc"
ls -l ${BIN_DIR}/minizinc
export MZN_STDLIB_DIR=${BIN_DIR}/share/minizinc/
echo "set env variable MZN_STDLIB_DIR to ${BIN_DIR}/share/minizinc. Please consider making it permanent"
popd
rm -rf tmp-install-minizinc

0 comments on commit ea977ab

Please sign in to comment.