forked from openkim/kim-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
255 lines (245 loc) · 8.79 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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
#
# KIM-API: An API for interatomic models
# Copyright (c) 2013--2021, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
# Richard Berger
# Christoph Junghans
# Ryan S. Elliott
# Alexander Stukowski
#
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
#
# Release: This file is part of the kim-api-2.3.0 package.
#
language: cpp
env:
global:
- secure: "knFkRceVfuvlc7j9u5OUDHCMlPu531f/HR6TV4zboPc8UtbJ/Hiz7ooRO2VZheoMhdWJjaWQLYEJ1CGLyszziCbETeBj6cbNmzXVcgE2p2JWI76L7RLIMZrAjDeg0X+p9l7HcFvEBMIz87jqirwuyZZVBdYPxOL8ECiPJIyS2Ec5cwTyj4TBYomNfrL8lksj10ui6HOPQ63jsF8B68ZzsmPf2CSZPZgLqDZAyBxc+jGdOB7TF6O5dJALWzMW0AdWdpsOxRkBCZHQdUEqeYMBF0Ypq1Xj/Tol5Qsh0UMYTHZ4E72XwSLL+wyUKpCR96iWqI8jYnYY+/h/eNcVKABPMX2nE0xaqhNPbdEVJPMaayVdxJMzDWxt2eIXTxLRPjcoqCiLGF9G860dxfvTwz7RSQZtnJmTClO/5jHdoDltof372E0MJOh7W2lR22jNDAHT6tmPevZGyTsMN+vKJ/u46P1v5DbdeRAgdjikVYCqqaqUvWzqj5Urs4gZI/dyPyEAZy0mwOgKdpEQhcNCDquq03jCU/V9SlqLgkyZPcTA9PVFtFTgZhEm6rA+hK/vtqo6BZxewyoFGDgVXOylA4f90kPZqOgO83ufeYi+s8RGLxAxLddcsxh4wtGhgnEwQJlznjxfWCKiirRZ4ZXSikoa28R/RbmK27syhYFbjs27D3g="
matrix:
include:
- name: "macOS Debug"
if: branch != coverity_scan
os: osx
addons:
homebrew:
packages:
- ccache
env: CMAKE_BUILD_TYPE=Debug
before_script:
- export PATH="/usr/local/opt/ccache/libexec:$PATH" &&
export CXX17=true &&
export CXX=g++-9 &&
export CC=gcc-9 &&
export FC=gfortran-9
- env
script:
- ./scripts/ci-build-and-test
- name: "Fedora, Debug, Sanitize"
if: branch != coverity_scan
os: linux
services: docker
env: DISTRO=fedora
CMAKE_BUILD_TYPE=Debug
SANITIZE=true
CXX17=true
before_script:
- mkdir "${HOME}/work" &&
cd "${HOME}/work" &&
cp -r "${HOME}/.ccache" ccache
- env
script:
- ${TRAVIS_BUILD_DIR}/scripts/ci-docker-build-and-run
${TRAVIS_BUILD_DIR}
"${DISTRO}"
"${TRAVIS_REPO_SLUG}:${DISTRO}"
"${PWD}/ccache"
- name: "openSUSE, Debug, IWYU, Sanitize, LTO"
if: branch != coverity_scan
os: linux
services: docker
env: DISTRO=openSUSE
CMAKE_BUILD_TYPE=Debug
IWYU=true
SANITIZE=true
CXX17=true
CXXFLAGS="-flto=auto"
CFLAGS="-flto=auto"
FFLAGS="-flto=auto"
before_script:
- mkdir "${HOME}/work" &&
cd "${HOME}/work" &&
cp -r "${HOME}/.ccache" ccache
- env
script:
- ${TRAVIS_BUILD_DIR}/scripts/ci-docker-build-and-run
"${TRAVIS_BUILD_DIR}"
"${DISTRO}"
"${TRAVIS_REPO_SLUG}:${DISTRO}"
"${PWD}/ccache"
- name: "ubuntu, Debug, Sanitize"
if: branch != coverity_scan
os: linux
services: docker
env: DISTRO=ubuntu
CMAKE_BUILD_TYPE=Debug
SANITIZE=true
CXX17=true
before_script:
- mkdir "${HOME}/work" &&
cd "${HOME}/work" &&
cp -r "${HOME}/.ccache" ccache
- env
script:
- ${TRAVIS_BUILD_DIR}/scripts/ci-docker-build-and-run
"${TRAVIS_BUILD_DIR}"
"${DISTRO}"
"${TRAVIS_REPO_SLUG}:${DISTRO}"
"${PWD}/ccache"
- name: "ubuntu [email protected], Debug"
if: branch != coverity_scan
os: linux
services: docker
env: DISTRO=ubuntu_cmake310
CMAKE_BUILD_TYPE=Debug
before_script:
- mkdir "${HOME}/work" &&
cd "${HOME}/work" &&
cp -r "${HOME}/.ccache" ccache
- env
script:
- ${TRAVIS_BUILD_DIR}/scripts/ci-docker-build-and-run
"${TRAVIS_BUILD_DIR}"
"${DISTRO}"
"${TRAVIS_REPO_SLUG}:${DISTRO}"
"${PWD}/ccache"
- name: "centos (EPEL), Debug, Sanitize, Coverage"
if: branch != coverity_scan
os: linux
services: docker
env: DISTRO=centos
CMAKE_BUILD_TYPE=Debug
SANITIZE=true
COVERAGE=true
before_script:
- mkdir "${HOME}/work" &&
cd "${HOME}/work" &&
cp -r "${HOME}/.ccache" ccache
- env
script:
- ${TRAVIS_BUILD_DIR}/scripts/ci-docker-build-and-run
"${TRAVIS_BUILD_DIR}"
"${DISTRO}"
"${TRAVIS_REPO_SLUG}:${DISTRO}"
"${PWD}/ccache"
- name: "debian, Debug, Sanitize"
if: branch != coverity_scan
os: linux
services: docker
env: DISTRO=debian
CMAKE_BUILD_TYPE=Debug
SANITIZE=true
CXX17=true
before_script:
- mkdir "${HOME}/work" &&
cd "${HOME}/work" &&
cp -r "${HOME}/.ccache" ccache
- env
script:
- ${TRAVIS_BUILD_DIR}/scripts/ci-docker-build-and-run
"${TRAVIS_BUILD_DIR}"
"${DISTRO}"
"${TRAVIS_REPO_SLUG}:${DISTRO}"
"${PWD}/ccache"
- name: "Windows-MinGW, Debug"
if: branch != coverity_scan
os: windows
env: CMAKE_BUILD_TYPE=Debug
# Travis CI setup instructions for MSYS2/MINGW environment:
# https://docs.travis-ci.com/user/reference/windows/#how-do-i-use-msys2
# Additionaly installing 'mingw-w64-x86_64-doxygen' package.
before_install:
- |-
case $TRAVIS_OS_NAME in
windows)
[[ ! -f C:/tools/msys64/msys2_shell.cmd ]] && rm -rf C:/tools/msys64
choco uninstall -y mingw
choco upgrade --no-progress -y msys2
export msys2='cmd //C RefreshEnv.cmd '
export msys2+='& set MSYS=winsymlinks:nativestrict '
export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start'
export mingw64="$msys2 -mingw64 -full-path -here -c "\"\$@"\" --"
export msys2+=" -msys2 -c "\"\$@"\" --"
$msys2 pacman --sync --noconfirm --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-doxygen
## Install more MSYS2 packages from https://packages.msys2.org/base here
taskkill //IM gpg-agent.exe //F # https://travis-ci.community/t/4967
export PATH=/C/tools/msys64/mingw64/bin:$PATH
export MAKE=mingw32-make # so that Autotools can find it
;;
esac
before_cache:
- |-
case $TRAVIS_OS_NAME in
windows)
# https://unix.stackexchange.com/a/137322/107554
$msys2 pacman --sync --clean --noconfirm
;;
esac
cache:
directories:
- $HOME/AppData/Local/Temp/chocolatey
- /C/tools/msys64
before_script:
- export CMAKE_GENERATOR="MinGW Makefiles" &&
export MAKE=mingw32-make
- env
script:
- $mingw64 ./scripts/ci-build-and-test
- name: "Coverity Scan"
if: branch = coverity_scan
os: linux
env: COVERITY=true
before_install:
- echo -n | openssl s_client -connect https://scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
- env
script:
- true
after_success:
- cat /home/travis/build/openkim/kim-api/cov-int/scm_log.txt
cache:
- ccache
addons:
apt:
packages:
- make
- cmake
- git
- g++
- gfortran
- ccache
- wget
- vim-common
coverity_scan:
project:
name: "openkim/kim-api"
description: "OpenKIM is an online framework for making molecular simulations reliable, reproducible, and portable. Computer implementations of interatomic models are archived in OpenKIM, verified for coding integrity, and tested by computing their predictions for a variety of material properties. Models conforming to the KIM application programming interface (API) work seamlessly with major simulation codes that have adopted the KIM API standard."
notification_email: [email protected]
build_command_prepend: "cmake ."
build_command: "make"
branch_pattern: coverity_scan