forked from Ericsson/codechecker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
75 lines (61 loc) · 2.55 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
language:
- python
services:
- postgresql
matrix:
include:
- os: linux
sudo: required
dist: trusty
python: "2.7"
- os: osx
osx_image: xcode6.4
sudo: false
language: generic
before_install:
- git clone https://github.com/llvm-mirror/clang.git ~/llvm\
- chmod a+x ~/llvm/tools/scan-build-py/bin/intercept-build;
- export PATH=~/llvm/tools/scan-build-py/bin:$PATH;
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install python; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install thrift; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install doxygen; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install coreutils; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl http://llvm.org/releases/3.7.0/clang+llvm-3.7.0-x86_64-apple-darwin.tar.xz -o clang+llvm-3.7.0-x86_64-apple-darwin.tar.xz; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then tar xf clang+llvm-3.7.0-x86_64-apple-darwin.tar.xz -C ~/; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH=~/clang+llvm-3.7.0-x86_64-apple-darwin/bin/:$PATH; fi
install:
- pip install -r ./.ci/python_requirements
- pip install nose
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PG_DATA=$(brew --prefix)/var/postgres; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pg_ctl -w start -l postgres.log --pgdata ${PG_DATA}; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then createuser -s postgres && psql -c 'create database travis_ci_test;' -U postgres && cat postgres.log; fi
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
- llvm-toolchain-precise
packages:
- doxygen
- libpq-dev
- clang-3.7
- libc6-dev-i386
- gcc-multilib
- thrift-compiler
postgresql: "9.3"
script:
- ./change_clang_version.py
- source tests/test_env_setup.sh
- ./build_package.py -o $TEST_CODECHECKER_PACKAGE_DIR -v
- export TEST_USE_POSTGRESQL=false
- unset CODECHECKER_DB_DRIVER
- nosetests tests
- export TEST_USE_POSTGRESQL=true
- export TEST_DBUSERNAME="postgres"
- export TEST_DBPORT="5432"
- export CODECHECKER_DB_DRIVER=psycopg2
- nosetests tests/functional/package_test/
- export CODECHECKER_DB_DRIVER=pg8000
- nosetests tests/functional/package_test/
- ./tests/clean_tests.sh