Skip to content

Commit

Permalink
Add regular Travis build
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Petter Øren Hauge authored and markusdregi committed Feb 6, 2019
1 parent 2f7ede5 commit 537d53a
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 10 deletions.
20 changes: 20 additions & 0 deletions .build_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!bin/bash

function build_install() {
pushd $1
pip install -r requirements.txt
mkdir build
pushd build
cmake .. -DENABLE_PYTHON=ON \
-DBUILD_APPLICATIONS=ON \
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \
-DCMAKE_PREFIX_PATH=$INSTALL_DIR \
-DCMAKE_C_FLAGS="-Werror=all" \
-DCMAKE_CXX_FLAGS="-Werror -Wno-unused-result"
make install
popd
popd
}

build_install $1

1 change: 1 addition & 0 deletions .libres_version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export LIBRES_VERSION=2.4.b1
45 changes: 35 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ dist: trusty
env:
global:
- ERT_SHOW_BACKTRACE=1
- LD_LIBRARY_PATH="$(pwd)/install/lib64"
- INSTALL_DIR="$(pwd)/install"
- LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${INSTALL_DIR}/lib64"
matrix:
- PYTHON_VERSION=2.7
- PYTHON_VERSION=3.6
Expand Down Expand Up @@ -45,7 +46,7 @@ addons:
- cmake
- cmake-data

install:
before_install:
- if [[ "$CC" == "gcc" ]]; then export CXX="g++-4.8"; fi

- if [[ $PYTHON_VERSION == 2.7 ]]; then
Expand All @@ -71,14 +72,38 @@ install:
- bash miniconda.sh -b -p $HOME/miniconda
- export CONDA_HOME="$HOME/miniconda"
- export PATH="$CONDA_HOME/bin:$PATH"
- hash -r
- pip install cwrap
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
- travis/install_python_packages.py
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
conda create -n ert_env pyqt=4.11.4 --yes;
else
conda create -n ert_env pyqt --yes;
fi
- source activate ert_env
- pip install --upgrade -r requirements.txt
# Checkout libres - need libecl version
- source .libres_version
- git clone https://github.com/equinor/libres
- pushd libres
- git checkout tags/$LIBRES_VERSION
- source .libecl_version
- popd
- git clone https://github.com/equinor/libecl
- pushd libecl
- git checkout tags/$LIBECL_VERSION
- popd

install:
# For now we have to make install libecl.
# Remove when it's possible to pip install
- bash .build_install.sh libecl
- bash .build_install.sh libres

script:
- travis/build_total.py ert
- mkdir build
- pushd build
- cmake .. -DBUILD_TESTS=ON
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR
-DCMAKE_PREFIX_PATH=$INSTALL_DIR
-DCMAKE_C_FLAGS='-Werror=all'
-DCMAKE_CXX_FLAGS='-Werror -Wno-unused-result'
- make install
- ctest --output-on-failure

0 comments on commit 537d53a

Please sign in to comment.