forked from darktable-org/rawspeed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
203 lines (190 loc) · 9.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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
notifications:
irc:
channels:
# - "chat.freenode.net#darktable"
- secure: "Sl/eC6JEqTMm82H4TANoyngf2oq+TfZ7oiqh3iDqmq0+yNxhnmWGlg+NwhfwpBOoh6eDICoq0CpxOLhXEbNGnILYeHlTbycf41qOS5zP0fquVIgfQJOs6ZNNQWxRO8G1ydkpIl4nMuzix+Uxb09LKN4Ymf2ifLh892yYqwJpwnzyhDZamDa0dNKJuu5r1pzsfAKrLrrd8NnUO6EqUzFz5NjexCZ+wRMKdvkHSGSpQwQ52KonvjnqvFPy11D0f/fZdtNpP9qcalLFXduH0IEafDP82526ri6qcIekJQjgz3eWcrTTuFWI1NOUozIs/maOsLf8NYi8Ql17sw1WorlHZ4Ma48rTUPBEot+lzRk03K+vQaBmFccB9ys0wTVZa4wmmM1051tqsGH7S2ezx8rnULClrMvOLadHiG8JYKwfO5ZjrLRRMndbXH7mSJDKUPrUIMAEvGRDoMP1uqaFf6MFe3mtXv5ZUcaj2GrxF3OIxZtvFFhGZ8HlYInXTGCV2Yaf0NtODWPUKqOYRGzeqPmO6mPVPNcSAyt7YrAT2N4vXUg/+hIAmBfjq+78PpbCZZsZTh12YDbzHmj2TS8ZflciCAhfABxwV1LlVMXXEB3fEpfRsB7Ee1jSd6lrVGy3BAx4GST8NDdI5GVVNKUMtguA8nzDd9iZoq966NlWxYlROlI="
skip_join: true
template:
- "%{repository}#%{build_number} (\x037%{branch}\x03 - \x02%{commit}\x02 : \x033%{author}\x03): \x1f\x02%{message}\x02\x1f"
- "Build details : <%{build_url}>"
email:
recipients:
- secure: "21/+N6QLMqeNojQjOQSooUi6bnHfy4doVO5xefDbpaaX/leFxP6PLv2yNL7d2lk0iwGRCitfbUqF0czmToTvZcE60EGttst5MnHUOyM8d9NR+dOZlVc8fsloIkiCC0nN575xSg5gwGFZmtG94wI0DQBiPQ4UDDPEDcim3c1OjQWn6o8Q4RmLSd65WJxioQRnNqOY0L+TN0T/Re7uIdri2swzNKC+bfdvpOV5Gef0yUPtzTF/0idq8pwwTJ0y8TGhIRDsNlyNdX3SI/TJiUFQDrwxPM1VidwK2FrST+HIYKC4O53KK2XbTN7+3jB0Wv7hdqZ6rzEanmPNRUmzOpbxqcDi8Kb/KJnBm9DkwaXJ1I1jEWdPOEYmoc4FUaA/7QZWtiQvIa1oDRHAQfEDjHJK1mm8z1esYDBrVHvx291DbKHv2AMzfqxrVG0DKG4piXNJMwDummU6SpekbbB5gXJ81dsQPJwOIpNUGax3aFq12sYHG6JSOdMAnzTvOL+WuHCsVnu2sR7LC8Y6kW03A+U/NP4kbbu4QQr4MLJRiE/t1Y14UiMuvz1K7X52V560oauWoGppB8/64EMm4P9SDxm0fosMaqCRmJduKU8pQlsNOnacQ10JlQkVYksXgnEWwrRYEtLSk3PVUf6awkRLES3UZDLSoepmVGRsttJnCAXZR3g="
on_success: always
on_failure: always
language: generic
before_install:
- if [[ "$TARGET" == "SONARQUBE" && ("$TRAVIS_PULL_REQUEST" != "false" || "$TRAVIS_SECURE_ENV_VARS" != "true" || ("$TRAVIS_BRANCH" != "develop" && "$TRAVIS_BRANCH" != "master")) ]]; then
exit;
fi;
- if [[ "$TARGET" == "WWW" && ("$TRAVIS_PULL_REQUEST" != "false" || "$TRAVIS_SECURE_ENV_VARS" != "true" || "$TRAVIS_BRANCH" != "develop") ]]; then
exit;
fi;
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$EXTRA" == "NODOCKER" ]]; then
echo "oracle-java8-installer hold" | sudo dpkg --set-selections;
echo "oracle-java9-installer hold" | sudo dpkg --set-selections;
travis_retry sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y;
travis_retry sudo apt-get update -q;
travis_retry sudo apt-get install -y -q -f --fix-missing clang-3.5 clang-3.9 cmake g++-5 git libiomp-dev libjpeg-dev libpugixml-dev libxml2-utils make ninja-build zlib1g-dev;
fi;
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
travis_retry brew update > /dev/null && brew tap Homebrew/bundle && cd .ci && brew bundle --verbose;
fi;
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$FLAVOR" == "Coverage" ]]; then
travis_retry sudo apt-get install -y -q -f --fix-missing rsync;
fi;
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$EXTRA" != "NODOCKER" ]]; then
travis_retry travis_wait 5 docker pull darktable/rawspeed;
fi;
before_script:
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$FLAVOR" == "Coverage" ]]; then
travis_retry rsync -vvrLtW --preallocate --delete --compress --compress-level=1 --stats --progress rsync://raw.pixls.us/data-unique/ $HOME/$RPUU_DST && cd $HOME/$RPUU_DST && sha1sum -c --strict filelist.sha1;
fi;
env:
global:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "rKETh/WScyiRebr6/7ex3FbMqgSL4gucYPj5Z0+F2UkOC+399MFuxHrZ744NwEPGjVvkL39btDVrViwmjp1BJraslQnuPJ8LS7DaVIQQJKnh/pLF8/BclcbGecXrIbSSAtgy3hwKp8N08DXpmyiyaLXsDrPE3/0Oz8JqT9n8b2nzkLDscJSjX73Gp+4DZiUsVzGYYsHq+1k7YbG0xEFrC0OVU3EyHN/bkOepLYUkEKuPj5yi/nRnHLt/1lVdHWBmvELezXnGfuDeGZGb8TbKDTCsv0sscKFDEzK2kzwpAIZbksBHVIcQS8cqcpx48LkvybXOc0vlrS+jMvSUDKAY62+JDZHZd3hCjSIMFVL9bf9b+7gMeevTMKJfLEe9Ro8bHITrKmy0S1Z+mozxdAkESjmFklKgkHBW72T8ttfz33R30Fr87dP9cRwlX2tiU06o8N13228Mh4vr4Cy1S342OOpnf+aw5pq0EydT1eVhjB+B6kmpGinTWbDNtInir2H0w0GlW1VHDZGWqEIB66Nq9aV7ugOBE6b2nsDmBgLS8Xk9OELnRLq2y51Z9nsVq0EnH4td+ciSDPulY9TuUbvBSioMTs8igArM10NFX3+NE13Nla0QiEp1sCKNgxouh5pfkTgmdRL4sQ0MWDPa/c85BaPBF+3xazbI8jZkB19QHKc="
- SRC_DIR=/build/rawspeed
- BUILD_DIR=/build/rawspeed-build
- INSTALL_PREFIX=/build/rawspeed-install
- CFLAGS="-pipe" CXXFLAGS="-pipe"
- TARGET=build
- RPUU_DST="raw-camera-samples/raw.pixls.us-unique/"
- DOCKER_RPUU="--volume $HOME/$RPUU_DST:/root/$RPUU_DST:ro"
jobs:
fast_finish: true
include:
- stage: test
os: linux
dist: trusty
sudo: required
services:
- docker
env: CC=gcc-8 CXX=g++-8
- os: linux
dist: trusty
sudo: required
services:
- docker
env: CC=clang-7 CXX=clang++-7
- os: linux
dist: trusty
sudo: required
services:
- docker
env: CC=gcc-8 CXX=g++-8 GCOV=gcov-8 FLAVOR=Coverage ECO="-DRAWSPEED_ENABLE_SAMPLE_BASED_TESTING=ON" EXTRA_OPTS="$DOCKER_RPUU"
cache:
directories:
- '$HOME/$RPUU_DST'
- os: osx
osx_image: xcode10
env: CC=cc CXX=c++ ECO="-DWITH_OPENMP=OFF"
#- os: osx
# env: CC=cc CXX=c++ FLAVOR=Coverage
- os: linux
dist: trusty
sudo: required
services:
- docker
env: CC=clang-7 CXX=clang++-7 TARGET=STATICANALYSIS ECO="-DUSE_CLANG_TIDY=ON"
- os: linux
dist: trusty
sudo: required
services:
- docker
env: CC=clang-7 CXX=clang++-7 ECO="-DWITH_OPENMP=OFF"
- os: linux
dist: trusty
sudo: required
env: CC=gcc-5 CXX=g++-5 EXTRA=NODOCKER
- os: linux
dist: trusty
sudo: required
env: CC=clang-3.5 CXX=clang++-3.5 EXTRA=NODOCKER ECO="-DWITH_OPENMP=OFF"
- os: linux
dist: trusty
sudo: required
env: CC=clang-3.9 CXX=clang++-3.9 EXTRA=NODOCKER
#- stage: deploy
# os: linux
# sudo: required
# dist: xenial
# edge: true
# services:
# - docker
# env: CC=gcc-8 CXX=g++-8 GCOV=gcov-8 TARGET=SONARQUBE FLAVOR=Coverage ECO="-DRAWSPEED_ENABLE_SAMPLE_BASED_TESTING=ON" EXTRA_OPTS="--tmpfs /root/.sonar --volume $HOME/.sonar/cache:/root/.sonar/cache $DOCKER_RPUU"
# git:
# depth: 9999999
# cache:
# directories:
# - '$HOME/$RPUU_DST'
# - '$HOME/.sonar/cache'
- stage: deploy
os: linux
dist: trusty
sudo: required
services:
- docker
env: CC=clang-7 CXX=clang++-7 TARGET=WWW
# linux clang Coverage build OOM's in gcov during final codecov report collection
# OSX gcc Coverage build produces invalid .gcno files
script:
- set -e
- if [[ ("$TRAVIS_OS_NAME" == "linux" && "$EXTRA" == "NODOCKER") || "$TRAVIS_OS_NAME" == "osx" ]]; then
export SRC_DIR="$TRAVIS_BUILD_DIR";
export BUILD_DIR="$SRC_DIR/build";
export INSTALL_PREFIX="$SRC_DIR/install";
export ECO="$ECO -DALLOW_DOWNLOADING_GOOGLETEST=ON";
mkdir "$BUILD_DIR";
mkdir "$INSTALL_PREFIX";
"$SRC_DIR/.ci/ci-script.sh";
fi;
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$EXTRA" != "NODOCKER" ]]; then
mkdir "$TRAVIS_BUILD_DIR/build";
if [[ "$TARGET" == "SONARQUBE" || "$TARGET" == "WWW" ]]; then
export BUILD_DIR="$SRC_DIR/build";
fi;
if [[ "$TARGET" == "WWW" && "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_SECURE_ENV_VARS" == "true" && "$TRAVIS_BRANCH" == "develop" ]]; then
"$TRAVIS_BUILD_DIR/.ci/www-prepare.sh";
fi;
export TARGET2="$TARGET";
export CMD="$SRC_DIR/.ci/ci-script.sh";
if [[ "$TARGET" == "STATICANALYSIS" ]]; then
export TARGET="build";
export CMD="scan-build-7 --use-cc=\"$CC\" --use-c++=\"$CXX\" --force-analyze-debug-code --status-bugs -disable-checker deadcode.DeadStores $CMD";
fi;
if [[ "$TARGET" == "SONARQUBE" ]]; then
export TARGET="build";
export CMD="build-wrapper-linux-x86-64 --out-dir \"$BUILD_DIR/bw-output/\" $CMD";
fi;
docker run --read-only --tmpfs /tmp --volume $TRAVIS_BUILD_DIR:$SRC_DIR:ro --volume "$TRAVIS_BUILD_DIR/build":$BUILD_DIR --workdir $BUILD_DIR --tmpfs $INSTALL_PREFIX $EXTRA_TMPFS $EXTRA_OPTS --env CC --env CXX --env GCOV --env CFLAGS --env CXXFLAGS --env SRC_DIR --env BUILD_DIR --env INSTALL_PREFIX --env TARGET --env FLAVOR --env ECO darktable/rawspeed sh -c "$CMD";
if [[ "$TARGET2" == "SONARQUBE" ]]; then
export CMD="sonar-scanner -Dproject.settings=\"$SRC_DIR/.ci/sonar-project.properties\" -Dsonar.login=\"$SONAR_TOKEN\" -Dsonar.projectVersion=\"$TRAVIS_COMMIT\"";
docker run --read-only --tmpfs /tmp --volume $TRAVIS_BUILD_DIR:$SRC_DIR:ro --volume "$TRAVIS_BUILD_DIR/build":$BUILD_DIR --workdir $SRC_DIR --tmpfs $INSTALL_PREFIX $EXTRA_TMPFS $EXTRA_OPTS --env CC --env CXX --env GCOV --env CFLAGS --env CXXFLAGS --env SRC_DIR --env BUILD_DIR --env INSTALL_PREFIX --env TARGET --env FLAVOR --env ECO darktable/rawspeed sh -c "$CMD";
fi;
export TARGET="$TARGET2";
fi;
after_success:
- if [[ "$FLAVOR" == "Coverage" && "$TARGET" != "SONARQUBE" ]]; then
cd "$TRAVIS_BUILD_DIR";
curl -s https://codecov.io/bash > codecov;
chmod +x codecov;
export PLATFORM="$TRAVIS_OS_NAME";
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
if [[ "$CC" == "cc" ]]; then
export CXX=GCC;
fi;
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export CXX=AppleClang;
fi;
./codecov -e PLATFORM,CXX -F unittests -X gcov -s "$TRAVIS_BUILD_DIR/build/gcov-reports-unittest" -Z;
if [[ "$TRAVIS_OS_NAME" == "linux" && "$FLAVOR" == "Coverage" ]]; then
./codecov -e PLATFORM,CXX -F integration,rpu_u -X gcov -s "$TRAVIS_BUILD_DIR/build/gcov-reports-rsa" -Z;
fi;
fi;
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$TARGET" == "WWW" && "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_SECURE_ENV_VARS" == "true" && "$TRAVIS_BRANCH" == "develop" ]]; then
"$TRAVIS_BUILD_DIR/.ci/www-finish.sh";
fi;