-
Notifications
You must be signed in to change notification settings - Fork 11
/
.travis.yml
208 lines (189 loc) · 4.24 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# SPDX-FileCopyrightText: 2024 OGL authors
#
# SPDX-License-Identifier: GPL-3.0-or-later
language: cpp
sudo: true
compiler:
- gcc
dist: focal
os:
- linux
cache:
directories:
- $HOME/cache
stages:
- build
- run
addons:
apt:
update: true
packages:
- flexc++
- libfl-dev
- lcov
- libopenmpi-dev
- ipython3
script: skip
_build: &_build
stage: build
if:
branch = dev OR env(EXTERNAL_GINKGO) = OFF
before_install:
- sudo sh -c "wget --no-check-certificate -O - https://dl.openfoam.org/gpg.key | apt-key add -"
- sudo add-apt-repository http://dl.openfoam.org/ubuntu
- sudo apt update
- sudo apt-get -y install openfoam$VERSION
- source /opt/openfoam$VERSION/etc/bashrc
- mkdir -p $HOME/data
install:
- ./scripts/travis_install_external_ginkgo.sh
before_script:
- cmake --version
- mkdir build
- cd build
- cmake -DOGL_USE_EXTERNAL_GINKGO=$EXTERNAL_GINKGO ..
script:
- make -j4 && make install
_run: &_run
stage: run
before_install:
- git clone -b develop https://github.com/greole/owls.git $HOME/owls
- cd $HOME/owls
- python setup.py install --user
- source /opt/openfoam$VERSION/etc/bashrc
install:
- git clone https://github.com/greole/OBR.git $HOME/OBR
- pip install docopt --user
- pip install packaging --user
- cd $HOME/OBR/
- if [[ ! -d $HOME/cache/airFoil2D ]]; then python obr_create_tree.py --folder $HOME/cache/airFoil2D --parameters examples/airFoil2DCI.json; fi
script:
- ls /opt
- ls $FOAM_SRC
- ls $FOAM_USER_LIBBIN
- cd $HOME/OBR
- cat $HOME/OBR/examples/airFoil2DCI.json
- python obr_benchmark_cases.py --folder $HOME/cache/airFoil2D --results_folder=Test --report=report.csv
- mkdir -p $HOME/data
- cp report.csv $HOME/data/report.csv
- cat $HOME/data/report.csv
_validate: &_validate
stage: validate
script:
- cat $HOME/data/report.csv
- echo $TRAVIS_BUILD_DIR
- python $TRAVIS_BUILD_DIR/scripts/travis_check_results.py $HOME/data/report.csv
jobs:
Include:
# Version 8 builds
- <<: *_build
ENV:
- VERSION=8
- EXTERNAL_GINKGO=OFF
- GINKGO_VERSION=ogl
workspaces:
create:
name:
foam_env_8
paths:
- /home/travis/OpenFOAM/travis-8
- /opt/openfoam8
- <<: *_build
ENV:
- VERSION=8
- EXTERNAL_GINKGO=ON
- GINKGO_VERSION=ogl
workspaces:
create:
name:
foam_user_libbin_8
paths:
/home/travis/OpenFOAM/travis-8
# - <<: *_build
# ENV:
# - VERSION=8
# - EXTERNAL_GINKGO=ON
# - GINKGO_VERSION=ogl
# - <<: *_build
# ENV:
# - VERSION=8
# - EXTERNAL_GINKGO=ON
# - GINKGO_VERSION=ogl
# Version 9 builds
- <<: *_build
ENV:
- VERSION=9
- EXTERNAL_GINKGO=ON
- GINKGO_VERSION=ogl
- <<: *_build
ENV:
- VERSION=9
- EXTERNAL_GINKGO=OFF
- GINKGO_VERSION=ogl
# Runs
- <<: *_run
ENV:
- VERSION=8
- SOLVER=CG
- PRECOND=NoPrecond
workspaces:
use:
- foam_env_8
create:
name:
CGData
paths:
/home/travis/data
- <<: *_run
ENV:
- VERSION=8
- SOLVER=BiCGStab
- PRECOND=NoPrecond
workspaces:
use:
- foam_env_8
create:
name:
BiCGStabData
paths:
/home/travis/data
- <<: *_run
ENV:
- VERSION=8
- SOLVER=CG
- PRECOND=BJ
workspaces:
use:
- foam_env_9
- <<: *_run
ENV:
- VERSION=8
- SOLVER=BiCGStab
- PRECOND=BJ
workspaces:
use:
- foam_env_8
- <<: *_run
ENV:
- VERSION=8
- SOLVER=IR
- PRECOND=NoPrecond
workspaces:
use:
- foam_env_8
- <<: *_validate
ENV:
- SOLVER=CG
- PRECOND=NoPrecond
workspaces:
use:
- foam_env_8
- CGData
- <<: *_validate
ENV:
- SOLVER=BiCGStab
- PRECOND=NoPrecond
workspaces:
use:
- foam_env_8
- BiCGStabData