Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/maven-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on: [push, pull_request]

jobs:
test-ibex:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
# The different steps
steps:
- uses: actions/checkout@v4
Expand All @@ -27,7 +27,9 @@ jobs:

# Regression tests
- name: Test Ibex
run: mvn --file pom.xml test -Pcoverage -DtestFailureIgnore=true -Dgroups=ibex
run: |
export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/ibex/3rd
mvn --file pom.xml test -Pcoverage -DtestFailureIgnore=true -Dgroups=ibex

test-solver:
runs-on: ubuntu-latest
Expand Down
26 changes: 26 additions & 0 deletions scripts/Ibex.dms
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM ubuntu:latest

# install Java 21
RUN apt-get update && \
apt-get install -y sudo openjdk-21-jdk-headless default-jdk python3 vim git maven curl g++ gcc flex bison cmake git pkg-config

RUN curl https://codeload.github.com/ibex-team/ibex-lib/tar.gz/ibex-2.9.1 > ibex-2.9.1.tar.gz && \
tar -xzf ibex-2.9.1.tar.gz && \
cd ibex-lib-ibex-2.9.1 && \
# RUN #git clone https://github.com/ibex-team/ibex-lib.git && \
# cd ibex-lib && \
mkdir build && \
cd build && \
cmake -DLP_LIB=soplex -DBUILD_JAVA_INTERFACE=ON -DBUILD_SHARED_LIBS=ON -DJAVA_PACKAGE=org.chocosolver.solver.constraints.real .. && \
make && \
sudo make install && \
export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/ibex/3rd

RUN git clone --recurse-submodules https://github.com/chocoteam/choco-solver.git && \
cd choco-solver && \
# git checkout develop && \
mvn -q clean install -DskipTests
RUN cd choco-solver && \
# exporting LD_LIBRARY_PATH twice (or at least here) is mandatory
export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/ibex/3rd && \
mvn --file pom.xml test -DtestFailureIgnore=true -Dgroups=ibex
21 changes: 11 additions & 10 deletions scripts/install-ibex.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
#!/usr/bin/env bash
set -ex
# download Ibex and untar it
ibexver=2.8.8
ibexjavaver=1.2.0
root=$(pwd)
ibexver=2.9.1
curl https://codeload.github.com/ibex-team/ibex-lib/tar.gz/ibex-${ibexver} > ibex-${ibexver}.tar.gz
tar -xzf ibex-${ibexver}.tar.gz
curl https://codeload.github.com/ibex-team/ibex-java/tar.gz/${ibexjavaver} > ibex-java-${ibexjavaver}.tar.gz
tar -xzf ibex-java-${ibexjavaver}.tar.gz --directory ibex-lib-ibex-${ibexver}/plugins/

# prepare installation
cd ibex-lib-ibex-${ibexver}
./waf configure --enable-shared --with-jni --java-package-name=org.chocosolver.solver.constraints.real
./waf build
sudo ./waf install
export LD_LIBRARY_PATH=/usr/local/lib
cd -
mkdir build
cd build
cmake -DLP_LIB=soplex -DBUILD_JAVA_INTERFACE=ON -DBUILD_SHARED_LIBS=ON -DJAVA_PACKAGE=org.chocosolver.solver.constraints.real ..
make
sudo make install
export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/ibex/3rd

cd ${root}
sudo rm -r ibex-${ibexver}.tar.gz
sudo rm -r ibex-java-${ibexjavaver}.tar.gz

ibexsolve -v
2 changes: 1 addition & 1 deletion solver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<configuration>
<!--suppress UnresolvedMavenProperty -->
<!-- <argLine>${argLine} -Xms384m -Xmx768m -Djava.library.path=/usr/local/lib</argLine>-->
<argLine>${argLine} -Djava.library.path=/usr/local/lib</argLine>
<argLine>${argLine} -Djava.library.path=/usr/local/lib:/usr/local/lib/ibex/3rd</argLine>
<properties>
<property>
<name>listener</name>
Expand Down
Loading