This repository has been archived by the owner on Feb 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
181 lines (169 loc) · 6.85 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
language: c
dist: bionic
sudo: required
cache:
apt: true
addons:
apt:
packages:
- cmake
- libssl-dev
- doxygen
- libpq-dev
- libmariadbd-dev
- clang-tools-7
- unixodbc-dev
- libsqlite3-dev
- libc-ares-dev
homebrew:
packages:
- openssl
- doxygen
- mariadb-connector-c
- unixodbc
- libpq
- check
- c-ares
- sqlite
update: true
# Add coverity certificate to system ca-certificates
before_install:
- if [ "${COVERITY_SCAN_BRANCH}" = "1" ]; then echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-certificates.crt ; fi
# Deploy to GitHub pages
deploy:
provider: script
script: ./gh-pages-deploy.sh
skip_cleanup: true
on:
branch: master
condition: "$GHPAGES_DEPLOY = yes"
jobs:
include:
- stage: normal builds
os: linux
env:
- BUILD_TYPE="cmake" OPENSSL_ROOT_DIR="" GHPAGES_DEPLOY="yes"
compiler: clang
- os: linux
env:
- BUILD_TYPE="cmake" OPENSSL_ROOT_DIR=""
compiler: gcc
- os: linux
env:
- BUILD_TYPE="autotools" CONFIG_OPTS=""
compiler: gcc
# OSX is sometimes unreliable. Comment out if we start having issues.
- os: osx
osx_image: xcode12
compiler: clang
env:
- BUILD_TYPE="cmake" OPENSSL_ROOT_DIR="/usr/local/opt/openssl@1.1" SQLite_DIR="/usr/local/opt/sqlite"
- os: osx
osx_image: xcode12
compiler: clang
env:
- BUILD_TYPE="autotools" CONFIG_OPTS="--with-ssl-dir=/usr/local/opt/openssl@1.1 --with-sqlite-dir=/usr/local/opt/sqlite --with-mysql-dir=/usr/local/opt/mariadb-connector-c"
- stage: Static Analysis
os: linux
env:
- BUILD_TYPE="analyze" OPENSSL_ROOT_DIR="" SCAN_BUILD="scan-build-7"
- os: osx
osx_image: xcode12
compiler: clang
env:
- BUILD_TYPE="analyze" OPENSSL_ROOT_DIR="/usr/local/opt/openssl@1.1" SQLite_DIR="/usr/local/opt/sqlite" SCAN_BUILD="scan-build"
- os: linux
env:
- BUILD_TYPE="coverity"
- secure: "m9Xq+CAgMokwdfVp9mWvT7+j8oyyWuL3vdmZOSGKVwTzdcAQn+KxGSYdqDUt2wwbJBAt0pblPLzqYG9TgPrqXRiTgOO7UImuOkS6gDD/UfegQqiPmWBDVfR0/Do3MQKChT9zaPSvklu5+50Bre8Wp9ZcSdgQFkrk5gGpEmMt4tVVQmIeFAE04bN1KBCwjWqBGSG56JM4+F3ENCgiOsuQl2b7zGXkFeFCEHzBEp2MpsCrtn5RqNIDQUGSX2OqMWVEQXWWqX8OUmHK3MvGHw0KbIv59SKE642t9j12lSjyndIaG4DyRCuJz1ZTki6bjZL+k0PK4bsGpC2wFAX/5NZY1qHL55bfKKKx17y7SQ3D6sheuIcM8dnF2AH3iu4tUxtPuhhn+NM0FLmxkbH3emkZHkOpwUE45IvAWNmp/bRkZYMqX65vm7oKLhbh4B2ZdsrHW9LKxGkp8Tk7gfzCK6H905MHVHnvW1xs+6kzDvWjUcx6p3QMuYdvdCqU/fSCjxyVntyiwGDGH4a6nBqmVs3ImpmB/MTSJhv6nwH+qUIEKIfBrKdjeZHyBRCACtynrTvHybhEjzfpdn0NhTCBiF1mqQP0xmJ1CFi7iVBrVvPWuP9ZyzZgKdE5yctKWPK+9oU4a43boXWYP/QLp6sIpthhjJF2M5jbJQDySAbwW/+BZ1w="
addons:
coverity_scan:
project:
name: "Monetra/mstdlib"
description: "M standard library for C"
notification_email: brad@monetra.com
build_command_prepend: "cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -H. -B_builds"
build_command: "cmake --build _builds"
branch_pattern: coverity_scan
apt:
packages:
- cmake
- libssl-dev
- doxygen
- libpq-dev
- libmariadbd-dev
- unixodbc-dev
- clang-tools-7
- libsqlite3-dev
- libc-ares-dev
- stage: Runtime Analysis
os: linux
env:
- BUILD_TYPE="asan" OPENSSL_ROOT_DIR=""
compiler: clang
- os: osx
osx_image: xcode12
env:
- BUILD_TYPE="asan" OPENSSL_ROOT_DIR="/usr/local/opt/openssl@1.1" SQLite_DIR="/usr/local/opt/sqlite"
compiler: clang
install:
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
sudo mkdir -p /usr/local/bin /usr/local/libexec /usr/local/share/scan-build && \
sudo wget http://llvm.org/svn/llvm-project/cfe/trunk/tools/scan-build/bin/scan-build -O /usr/local/bin/scan-build && \
sudo wget http://llvm.org/svn/llvm-project/cfe/trunk/tools/scan-build/libexec/ccc-analyzer -O /usr/local/libexec/ccc-analyzer && \
sudo wget http://llvm.org/svn/llvm-project/cfe/trunk/tools/scan-build/libexec/c++-analyzer -O /usr/local/libexec/c++-analyzer && \
sudo wget http://llvm.org/svn/llvm-project/cfe/trunk/tools/scan-build/share/scan-build/sorttable.js -O /usr/local/share/scan-build/sorttable.js && \
sudo wget http://llvm.org/svn/llvm-project/cfe/trunk/tools/scan-build/share/scan-build/scanview.css -O /usr/local/share/scan-build/scanview.css && \
sudo chmod a+rx /usr/local/bin/* /usr/local/libexec/*
fi
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
# The libcheck in Ubuntu 18.04 can't be linked against, so we need to build our own.
MYDIR=`pwd` && \
cd /tmp && \
wget https://github.com/libcheck/check/releases/download/0.12.0/check-0.12.0.tar.gz && \
tar -zxvpf check-0.12.0.tar.gz && \
cd check-0.12.0 && \
./configure --prefix=/usr/local && \
make && \
sudo make install && \
cd "$MYDIR"
fi
# Put in 3rd party sources and chain build
#before_script:
# - |
# git clone https://github.com/c-ares/c-ares.git thirdparty/c-ares --depth 1
# wget http://sqlite.org/2017/sqlite-amalgamation-3200100.zip
# unzip sqlite-amalgamation-3200100.zip
# mv sqlite-amalgamation-3200100 thirdparty/sqlite-amalgamation
script:
- |
case "${BUILD_TYPE}" in
cmake)
cmake -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DMSTDLIB_BUILD_FOR_CI=TRUE -DOPENSSL_ROOT_DIR="$OPENSSL_ROOT_DIR" -DSQLite_DIR="$SQLite_DIR" -H. -B_builds && \
cmake --build _builds && \
cmake -E env CTEST_OUTPUT_ON_FAILURE=1 CK_VERBOSITY=verbose cmake --build _builds --target check
;;
asan)
cmake -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DMSTDLIB_BUILD_FOR_CI=TRUE -DOPENSSL_ROOT_DIR="$OPENSSL_ROOT_DIR" -DSQLite_DIR="$SQLite_DIR" -DM_ASAN=TRUE -H. -B_builds && \
cmake --build _builds && \
cmake -E env CTEST_OUTPUT_ON_FAILURE=1 CK_VERBOSITY=verbose CK_FORK=no CK_LOG_FILE_NAME=- cmake --build _builds --target check
;;
autotools)
./buildconf.sh && \
mkdir build && \
pushd build && \
../configure ${CONFIG_OPTS} && \
make -j2 && \
cp sql/sqlite/.libs/mstdlib_sql_sqlite.so sql/.libs/ && \
export CK_VERBOSITY=verbose && \
make check && \
popd
;;
analyze)
${SCAN_BUILD} cmake -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DMSTDLIB_BUILD_FOR_CI=TRUE -DOPENSSL_ROOT_DIR="$OPENSSL_ROOT_DIR" -DSQLite_DIR="$SQLite_DIR" -H. -B_builds && \
travis_wait 30 ${SCAN_BUILD} cmake --build _builds && \
cmake -E env CTEST_OUTPUT_ON_FAILURE=1 CK_VERBOSITY=verbose cmake --build _builds --target check
;;
esac