forked from fossology/fossology
-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
181 lines (175 loc) · 4.95 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
# SPDX-FileCopyrightText: © 2014-2021 Siemens AG
# SPDX-License-Identifier: GPL-2.0-only AND LGPL-2.1-only
# build FOSSology on Travis CI - https://travis-ci.org/
language: php
dist: bionic
os: linux
php: 7.1
cache:
ccache: true
directories:
- $HOME/.composer
env:
global:
- PATH="/usr/lib/ccache/:$TRAVIS_BUILD_DIR/src/ununpack/agent/:$PATH"
- COMPOSER_HOME="$HOME/.composer/"
- PGPORT=5432
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
- php-gd
- poppler-utils
- p7zip
- p7zip-full
- rpm
- sleuthkit
- unrar-free
- upx-ucl
- libicu-dev
- libgcrypt20-dev
- cppcheck
services: postgresql
jobs:
fast_finish: true
include:
#### 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-6 CXX=g++-6 CFLAGS='-Wall'
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- *default_packages
- gcc-6
- g++-6
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-7 CXX=g++-7 CFLAGS='-Wall'
addons:
apt:
sources:
- sourceline: 'ppa: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:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- *default_packages
- gcc-8
- g++-8
- <<: *compiler-tests
env: CC=gcc-9 CXX=g++-9 CFLAGS='-Wall'
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- *default_packages
- gcc-9
- g++-9
- <<: *compiler-tests
env: CC=gcc-10 CXX=g++-10 CFLAGS='-Wall'
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- *default_packages
- gcc-10
- g++-10
- <<: *compiler-tests
env: CC=gcc-10 CXX=g++-10 CFLAGS='-Wall'
addons:
postgresql: "13"
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- *default_packages
- gcc-10
- g++-10
- postgresql-13
- postgresql-client-13
before_script: &postgres-before-script
# Use default port
- sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/13/main/postgresql.conf
# Use 10 auth config:
- sudo cp /etc/postgresql/{10,13}/main/pg_hba.conf
- sudo service postgresql restart
- *default-before-script
#### PHPUnit tests ###########################
- &php7-phpunit-tests
addons: {}
php: 7.1
install: composer update --ignore-platform-reqs --with-dependencies --prefer-dist --working-dir=src phpunit/phpunit
before_script: ./utils/prepare-test -afty
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'
after_success: php src/vendor/bin/php-coveralls -vv -o coveralls.json -x clover.xml
- <<: *php7-phpunit-tests
php: 7.2
- <<: *php7-phpunit-tests
php: 7.3
- <<: *php7-phpunit-tests
php: 7.4
addons:
postgresql: "13"
apt:
packages:
- postgresql-13
- postgresql-client-13
- *default_packages
script:
- set -o pipefail
- make build-lib VERSIONFILE build-cli
- ./src/vendor/bin/phpunit -csrc/phpunit.xml --testsuite="Fossology PhpUnit Test Suite" --colors=always
before_script: *postgres-before-script