Skip to content

Commit

Permalink
Clean up the Travis file
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Fanebust Dregi authored and markusdregi committed Jan 29, 2019
1 parent 06c0285 commit f476b59
Showing 1 changed file with 22 additions and 34 deletions.
56 changes: 22 additions & 34 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ os:
- osx

osx_image: xcode7.3
sudo: false
sudo: true
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 TEST_SUITE="-LE SLOW" # Run all tests not labeled as slow
- PYTHON_VERSION=2.7 TEST_SUITE="-L SLOW_1" # Run all tests labeled as SLOW in group 1
Expand Down Expand Up @@ -46,37 +47,24 @@ addons:

install:
- if [[ "$CC" == "gcc" ]]; then export CXX="g++-4.8"; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export CONDA_OS=MacOSX;
else
export CONDA_OS=Linux;
fi
- if [[ $PYTHON_VERSION == 2.7 ]]; then
export TRAVIS_PYTHON_VERSION="2.7";
fi
- if [[ $PYTHON_VERSION == 3.6 ]]; then
export TRAVIS_PYTHON_VERSION="3.6";
fi
# We do this conditionally because it saves us some downloading if the version is the same.
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-${CONDA_OS}-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-4.4.10-${CONDA_OS}-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export CONDA_HOME="$HOME/miniconda"
- export PATH="$CONDA_HOME/bin:$PATH"
- hash -r
- python --version
- pip install -r requirements.txt
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a # Useful for debugging any issues with conda
- wget https://raw.githubusercontent.com/Statoil/ert/master/travis/install_python_packages.py
- python install_python_packages.py

before_script:
- wget https://raw.githubusercontent.com/Statoil/ert/master/travis/build_total.py
- sudo pip install --upgrade -r requirements.txt

script:
- python build_total.py ecl ${TEST_SUITE}
- mkdir build
- pushd build
- cmake .. -DBUILD_TESTS=ON
-DENABLE_PYTHON=ON
-DINSTALL_CWRAP=OFF
-DBUILD_APPLICATIONS=ON
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR
-DINSTALL_ERT_LEGACY=ON
-DCMAKE_PREFIX_PATH=$INSTALL_DIR
-DERT_USE_OPENMP=ON
-DCMAKE_C_FLAGS='-Werror=all'
-DCMAKE_CXX_FLAGS='-Werror -Wno-unused-result'
- make
- make install
- export PYTHONPATH=$INSTALL_DIR/lib/python2.7/dist-packages:$INSTALL_DIR/lib64/python2.7/dist-packages:$PYTHONPATH
- export PYTHONPATH=$INSTALL_DIR/lib/python2.7/site-packages:$INSTALL_DIR/lib64/python2.7/site-packages:$PYTHONPATH
- set -e; python -c "import ecl"; set +e
- ctest --output-on-failure $TEST_SUITE

0 comments on commit f476b59

Please sign in to comment.