forked from su2code/SU2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
70 lines (56 loc) · 2.09 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
# Continous Integration setup for SU2.
# Tests on the develop branch in both serial and parallel.
language: cpp
compiler:
- g++
notifications:
email:
recipients:
branches:
only:
- develop
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"
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"
TEST_SCRIPT=parallel_regression.py
# Serial build and test for AD
- CONFIGURE_COMMAND="./preconfigure.py --prefix=$TRAVIS_BUILD_DIR --enable-autodiff --enable-direct-diff"
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"
TEST_SCRIPT=parallel_regression_AD.py
before_install:
# install the necessary packages
- sudo apt-get update -qq
- sudo apt-get install -qq python-numpy python-scipy mpich2
install:
- echo $TRAVIS_BUILD_DIR
- echo $CONFIGURE_COMMAND
- $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 https://github.com/su2code/TestCases.git ./TestData
- cd TestData/
- git checkout develop
# Go back to SU2 root and copy the test data into the folder structure
- cd $TRAVIS_BUILD_DIR
- cp -R ./TestData/* ./TestCases/
# Enter the SU2/TestCases/ directory, which is now ready to run
- cd TestCases/
script:
# run the tests
python $TEST_SCRIPT