forked from fossology/fossology
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
93 lines (84 loc) · 4.38 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
# Copyright Siemens AG, 2014-2015
# SPDX-License-Identifier: GPL-2.0 LGPL-2.1
# build FOSSology on Travis CI - https://travis-ci.org/
language: php
php:
- '5.6'
addons:
- postgresql: "9.3"
cache:
- apt
install:
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo add-apt-repository 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.5 main'
- sudo add-apt-repository 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.6 main'
- sudo apt-get update -qq
- apt-cache --names-only search '^(gcc|clang)-[0-9.]+$'
- sudo apt-get install -qq debhelper libglib2.0-dev libmagic-dev libxml2-dev
- sudo apt-get install -qq libtext-template-perl librpm-dev rpm libpcre3-dev libssl-dev
- sudo apt-get install -qq apache2 libapache2-mod-php5 php5-pgsql php-pear php5-cli
- sudo apt-get install -qq binutils bzip2 cabextract cpio sleuthkit genisoimage poppler-utils
- sudo apt-get install -qq rpm upx-ucl unrar-free unzip p7zip-full p7zip wget git-core subversion
- sudo apt-get install -qq libpq-dev libcunit1-dev libcppunit-dev
- sudo apt-get install -qq libboost-regex-dev libboost-program-options-dev
- sudo apt-get install $CXX $CC --force-yes || sudo apt-get install $CC --force-yes
- sudo apt-get install -qq cppcheck
- sudo apt-get install liblocal-lib-perl
- sudo apt-get install libspreadsheet-writeexcel-perl libdbd-sqlite3-perl
- sudo mkdir -p /var/local/cache/fossology
- sudo chown $(whoami) /var/local/cache/fossology
before_script:
- cd src/
- composer install --dev
- cd vendor/ && git clone https://github.com/dmgerman/ninka.git && cd ninka/ && perl Makefile.PL && make && sudo make install && cd ../..
- cd ..
- install/scripts/install-spdx-tools.sh
- psql -c "CREATE USER fossy WITH PASSWORD 'fossy' CREATEDB;" -U postgres
- psql -c "create database fossology;" -U postgres
env:
global:
- PHPTESTSUITE='Fossology PhpUnit Agent Test Suite'
- CHECKBEFORE='cppcheck -q -isrc/nomos/agent_tests/testdata/NomosTestfiles/ -isrc/testing/dataFiles/ src/'
- MAKETARGETS='all test-lib'
matrix:
- CC=gcc CXX=g++ MAKETARGETS='all test-lib test-monk test-nomos'
- CC=clang-3.6 CXX=clang++-3.6 MAKETARGETS='all test-lib test-monk test-nomos'
- CC=gcc-4.6 CXX=g++-4.6 MAKETARGETS='all test-lib test-monk test-nomos'
- CC=gcc-4.8 CXX=g++-4.8 MAKETARGETS='all test-lib test-monk test-nomos'
- CC=gcc-4.9 CXX=g++-4.9 MAKETARGETS='all test-lib test-monk test-nomos'
- CC=gcc-5 CXX=g++-5 MAKETARGETS='all test-lib test-monk test-nomos'
- CC=gcc-5 CXX=g++-5 CFLAGS='-Wall -Werror'
- CC=clang-3.6 CXX=clang++-3.6 CFLAGS='-Wall -Werror -Wno-error=deprecated-register'
- CHECKBEFORE='src/vendor/bin/phpcpd src/cli/ src/copyright/ src/decider*/ src/lib/ src/monk/ src/nomos/ src/readmeoss/ src/spdx2/ src/www/'
CC=gcc-5 CXX=g++-5 MAKETARGETS='build-lib VERSIONFILE build-cli'
matrix:
include:
- php: 5.4
env: PHPTESTSUITE='Fossology PhpUnit Test Suite' CHECKBEFORE='' MAKETARGETS='build-lib VERSIONFILE build-cli'
- php: 5.5
env: PHPTESTSUITE='Fossology PhpUnit Test Suite' CHECKBEFORE='' MAKETARGETS='build-lib VERSIONFILE build-cli'
- php: 5.6
env:
PHPTESTSUITE='Fossology PhpUnit Test Suite'
CHECKBEFORE='src/vendor/bin/phpcs --standard=src/fossy-ruleset.xml src/lib/php/*/ src/www/ui/page/ src/www/ui/async/ src/spdx2 src/monk'
MAKETARGETS='build-lib VERSIONFILE build-cli'
- php: 7.0
env: PHPTESTSUITE='Fossology PhpUnit Test Suite' CHECKBEFORE='' MAKETARGETS='build-lib VERSIONFILE build-cli'
allow_failures:
- env: CHECKBEFORE='src/vendor/bin/phpcpd src/cli/ src/copyright/ src/decider*/ src/lib/ src/monk/ src/nomos/ src/readmeoss/ src/spdx2/ src/www/'
CC=gcc-5 CXX=g++-5 MAKETARGETS='build-lib VERSIONFILE build-cli'
- php: 7.0
env: PHPTESTSUITE='Fossology PhpUnit Test Suite' CHECKBEFORE='' MAKETARGETS='build-lib VERSIONFILE build-cli'
- php: 7.1
env: PHPTESTSUITE='Fossology PhpUnit Test Suite' CHECKBEFORE='' MAKETARGETS='build-lib VERSIONFILE build-cli'
script:
- set -e
- $CHECKBEFORE
- make $MAKETARGETS
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.5" ]]; then composer require --dev --no-update phpunit/phpunit ~4; fi
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.6" ]]; then composer require --no-update phpunit/phpunit ~5; fi
- phpunit -csrc/phpunit.xml --testsuite="$PHPTESTSUITE"
- set +e
after_script:
- mkdir -p build/logs
- php src/vendor/bin/coveralls -vv -x clover.xml