forked from su2code/SU2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
96 lines (76 loc) · 3.05 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Continous Integration setup for SU2.
# Tests on the develop branch in both serial and parallel.
dist: trusty
sudo: required
language: python
compiler:
- gcc
notifications:
email:
recipients:
branches:
only:
- develop
python:
- 2.7
- 3.6
env:
global:
CXXFLAGS="-O3 -Wall -Wextra -Wno-unused-parameter -Wno-empty-body -Wno-format-security"
matrix:
# Serial build and test
- CONFIGURE_COMMAND="./preconfigure.py --prefix=$TRAVIS_BUILD_DIR --enable-PY_WRAPPER --disable-tecio"
TEST_SCRIPT=serial_regression.py
# Parallel build and test
- CONFIGURE_COMMAND="./preconfigure.py --enable-mpi --with-cc=mpicc --with-cxx=mpicxx --prefix=$TRAVIS_BUILD_DIR --enable-PY_WRAPPER --disable-tecio"
TEST_SCRIPT=parallel_regression.py
# Serial build and test for AD
- CONFIGURE_COMMAND="./preconfigure.py --with-cc=gcc --with-cxx=g++ --prefix=$TRAVIS_BUILD_DIR --enable-autodiff --enable-direct-diff --disable-tecio"
TEST_SCRIPT=serial_regression_AD.py
# Parallel build and test for AD:
- CONFIGURE_COMMAND="./preconfigure.py --enable-mpi --with-cc=mpicc --with-cxx=mpicxx --prefix=$TRAVIS_BUILD_DIR --enable-autodiff --enable-direct-diff --disable-tecio"
TEST_SCRIPT=parallel_regression_AD.py
before_install:
# Temporarily fixes Travis CI issue with paths for Python packages
- export PATH=/usr/bin:$PATH
# Install the necessary packages using apt-get with sudo
- sudo apt-get update -qq
- sudo apt-get install -qq build-essential libopenmpi-dev
# Install Python dependencies
# http://conda.pydata.org/docs/travis.html#the-travis-yml-file
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda install -q python=$TRAVIS_PYTHON_VERSION numpy scipy mpi4py swig
# to avoid interference with MPI
- test -n $CC && unset CC
- test -n $CXX && unset CXX
install:
# Configure, make, and install SU2
- echo $TRAVIS_BUILD_DIR
- echo $CONFIGURE_COMMAND
- ./bootstrap
- autoreconf -f -i
- $CONFIGURE_COMMAND
- make -j 4
- make install
# Add environmental variables according to the configure step
- export SU2_RUN=$TRAVIS_BUILD_DIR/bin
- export SU2_HOME=$TRAVIS_BUILD_DIR
- export PATH=$PATH:$SU2_RUN
- export PYTHONPATH=$PYTHONPATH:$SU2_RUN
before_script:
# Get the test cases
- git clone -b develop https://github.com/su2code/TestCases.git ./TestData
- cp -R ./TestData/* ./TestCases/
# Get the tutorial cases
- git clone -b develop https://github.com/su2code/su2code.github.io ./Tutorials
# Enter the SU2/TestCases/ directory, which is now ready to run
- cd TestCases/
script:
# Run the tests via the Python scripts
- python $TEST_SCRIPT