forked from fossology/fossology
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
208 lines (203 loc) · 5.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
204
205
206
207
208
# Copyright Siemens AG, 2014-2019
# SPDX-License-Identifier: GPL-2.0 LGPL-2.1
# build FOSSology on Travis CI - https://travis-ci.org/
language: php
dist: xenial
php: 7.0
cache:
ccache: true
directories:
- $HOME/.composer
env:
global:
- PATH="/usr/lib/ccache/:$PATH"
- COMPOSER_HOME="$HOME/.composer/"
addons:
apt:
packages: &default_packages
- cabextract
- genisoimage
- libboost-program-options-dev
- libboost-regex-dev
- libboost-system-dev
- libboost-filesystem-dev
- libglib2.0-dev
- libcppunit-dev
- libcunit1-dev
- libdbd-sqlite3-perl
- libjsoncpp-dev
- libjson-c-dev
- liblocal-lib-perl
- libmagic-dev
- librpm-dev
- libspreadsheet-writeexcel-perl
- libtext-template-perl
- php-cli
- php-pgsql
- php-zip
- php-xml
- php-mbstring
- poppler-utils
- p7zip
- p7zip-full
- rpm
- sleuthkit
- unrar-free
- upx-ucl
- libicu-dev
services: postgresql
jobs:
fast_finish: true
include:
- name: Syntax Check
script:
- src/testing/syntax/syntaxtest.sh
- composer validate --no-check-all --working-dir=src --strict
- name: Static Code Analysis
addons:
apt:
packages:
- cppcheck
script: cppcheck -q -isrc/nomos/agent_tests/testdata/NomosTestfiles/ -isrc/testing/dataFiles/ src/
- name: Copy/Paste Detector
install: composer install --prefer-dist --working-dir=src
script: src/vendor/bin/phpcpd src/cli/ src/copyright/ src/decider*/ src/lib/ src/monk/ src/nomos/ src/readmeoss/ src/spdx2/ src/www/
- name: PHP Codesniffer
install: composer install --prefer-dist --working-dir=src
script: src/vendor/bin/phpcs --standard=src/fossy-ruleset.xml -p
#### Docker tests ###########################
- name: Docker Tests
addons: {}
services: docker
before_script: docker-compose build
script:
- src/testing/docker/test-cluster.sh
- src/testing/docker/test-standalone.sh
#### C/C++ agent tests ###########################
- &compiler-tests
env: CC=gcc-5 CXX=g++-5 CFLAGS='-Wall'
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- *default_packages
- gcc-5
- g++-5
install:
- composer install --prefer-dist --working-dir=src
- ./install/scripts/install-spdx-tools.sh
- sudo /usr/sbin/update-ccache-symlinks
- ls /usr/lib/ccache/
before_script: &default-before-script
./utils/prepare-test -afty
script:
- make test
after_success:
- ccache -s
- <<: *compiler-tests
env: CC=gcc-6 CXX=g++-6 CFLAGS='-Wall'
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- *default_packages
- gcc-6
- g++-6
- <<: *compiler-tests
env: CC=gcc-7 CXX=g++-7 CFLAGS='-Wall'
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- *default_packages
- gcc-7
- g++-7
- <<: *compiler-tests
env: CC=gcc-8 CXX=g++-8 CFLAGS='-Wall'
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- *default_packages
- gcc-8
- g++-8
- <<: *compiler-tests
env: CC=gcc-6 CXX=g++-6 CFLAGS='-Wall' PGPORT=5432
addons:
postgresql: "10"
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- *default_packages
- gcc-6
- g++-6
- postgresql-10
- postgresql-client-10
before_script: &postgres-before-script
# Use default port
- sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/10/main/postgresql.conf
# Use 9.6 auth config:
- sudo cp /etc/postgresql/{9.5,10}/main/pg_hba.conf
- sudo service postgresql restart
- *default-before-script
#### PHPUnit tests ###########################
- &phpunit-tests
php: 5.6
addon: {}
install: composer install --prefer-dist --working-dir=src
before_script: ./utils/prepare-test -afty
script:
- make build-lib VERSIONFILE build-cli
- src/vendor/bin/phpunit -csrc/phpunit.xml --testsuite="Fossology PhpUnit Test Suite"
after_success: php src/vendor/bin/php-coveralls -vv -o coveralls.json -x clover.xml
- &php7-phpunit-tests
<<: *phpunit-tests
php: 7.0
install: composer update --ignore-platform-reqs --with-dependencies --prefer-dist --working-dir=src phpunit/phpunit
script:
- set -o pipefail
- make build-lib VERSIONFILE build-cli
- phpdbg -qrr src/vendor/bin/phpunit -csrc/phpunit.xml --testsuite="Fossology PhpUnit Test Suite" --colors=always | grep -v 'script>\|c.log'
- &php71-phpunit-tests
<<: *php7-phpunit-tests
php: 7.1
- <<: *php7-phpunit-tests
php: 7.2
- <<: *php7-phpunit-tests
php: 7.2
env: PGPORT=5432
addons:
postgresql: "10"
apt:
packages:
- postgresql-10
- postgresql-client-10
- *default_packages
before_script: *postgres-before-script
- stage: GitHub Page Release
name: GitHub Page deploy
addons:
apt:
packages:
- doxygen
- graphviz
script:
- doxygen -v
- bash utils/deploy-pages.sh
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
keep-history: false
local-dir: ./code_docs
repo: $GH_REPO_REF
target-branch: master
on:
branch: master
allow_failures:
- name: Copy/Paste Detector