-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
141 lines (114 loc) · 3.76 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
branches:
only:
- master
os:
- linux
env:
matrix:
- PY=3.8 NUMPY=1.18 SCIPY=1.4 PYOPTSPARSE=v2.1.5 SNOPT=7.7 PETSc=3.12
language:
- generic
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gfortran
- libblas-dev
- liblapack-dev
- libopenmpi-dev
- openmpi-bin
install:
# get key decrypted, placed, chmodded, and added for passwordless access to WebFaction
- if [ "$encrypted_4548f0b84c7d_key" ]; then
openssl aes-256-cbc -K $encrypted_4548f0b84c7d_key -iv $encrypted_4548f0b84c7d_iv -in travis_deploy_rsa.enc -out /tmp/travis_deploy_rsa -d;
eval "$(ssh-agent -s)";
chmod 600 /tmp/travis_deploy_rsa;
ssh-add /tmp/travis_deploy_rsa;
echo -e "Host web543.webfaction.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config;
else
echo "KEY NOT FOUND";
fi
# if we have a cached miniconda environment then just activate the cached one, otherwise, build one
- if [ "$CACHED_ENV" ]; then
echo "Using cached environment..."
export PATH=$HOME/miniconda/bin:$PATH;
source $HOME/miniconda/bin/activate PY$PY;
else
echo "Building python environment...";
wget -q "https://repo.continuum.io/miniconda/Miniconda${PY:0:1}-latest-Linux-x86_64.sh" -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda;
source "$HOME/miniconda/etc/profile.d/conda.sh";
hash -r;
conda config --set always_yes yes --set changeps1 no;
conda update -q conda;
conda info -a;
conda create --yes -n PY$PY python=$PY;
conda activate PY$PY;
conda config --add channels conda-forge;
conda install --yes cython sphinx mock swig pip numpy=$NUMPY scipy=$SCIPY mpi4py matplotlib;
sudo apt-get install gfortran;
sudo apt-get install texlive-latex-extra
python -m pip install --upgrade pip;
echo " >> Installing optional packages for test coverage";
python -m pip install psutil objgraph git+https://github.com/mdolab/pyXDSM;
python -m pip install testflo --user;
python -m pip install ssh --user;
python -m pip install pdflatex --user;
python -m pip install pyspice --user;
pyspice-post-installation --check-install;
echo "Clone the build_pyoptsparse script";
echo $PWD;
git clone https://github.com/OpenMDAO/build_pyoptsparse;
if [ "$SNOPT_LOCATION" ]; then
echo "Install SNOPT";
cd build_pyoptsparse/pyoptsparse/pyoptsparse/pySNOPT;
scp -r "$SNOPT_LOCATION";
cd ../../../../;
echo $PWD;
fi
echo "Build pyoptsparse";
cd build_pyoptsparse;
chmod 755 ./build_pyoptsparse.sh;
./build_pyoptsparse.sh v2.1.5 SNOPT=7.7;
cd ..;
echo $PWD
git clone https://github.com/OpenMDAO/MBI.git;
cd MBI;
python setup.py build install;
cd ..;
echo $PWD
if [ "$PETSc" ]; then
echo " >> Installing parallel processing dependencies";
conda install --yes petsc4py=$PETSc;
fi
fi
# Install Dymos
- python -m pip install git+https://github.com/OpenMDAO/dymos.git --user;
# Install TMS
# - python -m pip install git+ssh://[email protected]/OpenMDAO/TMS.git;
# Install pycycle
# - python -m pip install git+ssh://[email protected]/OpenMDAO/pycycle.git;
# Install OpenMDAO
- |
echo "Installing here because we need to override Dymos's versions requirement for OpenMDAO"
git clone https://github.com/OpenMDAO/OpenMDAO.git
cd OpenMDAO;
pip install . --force-reinstall ;
echo "OpenMDAO commit: ";
git rev-parse HEAD;
cd ..;
# install boring itself in developer mode.
- pip install -e .;
# display summary of installed packages and their versions
- conda list;
- cd boring/XDSM;
- python ODE_XDSM.py;
- python Design_XDSM.py;
- cd ../..;
script:
- export OMPI_MCA_rmaps_base_oversubscribe=1
- echo "Running Testflo"
- cd boring
- pwd
- python `which testflo` -n 1 --timeout=120 --show_skipped;