forked from secure-software-engineering/phasar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
88 lines (80 loc) · 3.05 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
language: cpp
#compiler:
# - clang
# - gcc
cache:
directories:
- $TRAVIS_BUILD_DIR/boost_1_70_0/
matrix:
include:
- os: linux
dist: bionic
sudo: enabled
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- build-essential
- sqlite3
- libsqlite3-dev
- bear
- python3
- git
- cmake
- zlib1g-dev
- libncurses5-dev
- graphviz
- doxygen
- libcurl4-gnutls-dev
- libmysqlcppconn-dev
- libboost-filesystem1.65-dev
- libboost-system1.65-dev
- libboost-graph1.65-dev
- libboost-program-options1.65-dev
- libboost-log1.65-dev
- libboost-thread1.65-dev
env:
# - MATRIX_EVAL="CC=clang && CXX=clang++"
# - os: osx
# osx_image: xcode11.3
# sudo: enabled
# env:
# - MATRIX_EVAL="CC=clang && CXX=clang++"
branches:
- development
- master
- f-FixTravisCI
# commands that need to be run before installing the dependencies
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://apt.llvm.org/llvm.sh; chmod +x llvm.sh ; sudo ./llvm.sh 10 ; sudo apt-get install -y libllvm-10-ocaml-dev libllvm10 llvm-10 llvm-10-dev llvm-10-doc llvm-10-examples llvm-10-runtime clang-10 clang-tools-10 clang-10-doc libclang-common-10-dev libclang-10-dev libclang1-10 clang-format-10 clangd-10 ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then travis_wait 80 brew update ; fi
- eval "${MATRIX_EVAL}"
# install all dependencies
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo "checking machine"; cat /proc/meminfo; cat /proc/cpuinfo; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then echo "checking machine"; hostinfo; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CC=/usr/bin/clang-10; export CXX=/usr/bin/clang++-10; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then travis_wait 80 brew bundle --verbose; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH="/usr/local/opt/llvm/bin:$PATH"; fi
- echo "checking C++ compiler"; clang++ --version
# Initialize all submodules
- git submodule update --init --recursive
# commands that need to be run before execution
# before_script
# build all interesting targets
script:
- mkdir -p build
- cd build
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DPHASAR_BUILD_UNITTESTS=ON ..
- make -j2
- sudo make install
# - ctest -j2
# Build the examples
- cd $TRAVIS_BUILD_DIR/examples/llvm-hello-world
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make; fi
# Override llvm-config to match the required one
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo ln -sf `which llvm-config-10` `which llvm-config`; llvm-config --version; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd $TRAVIS_BUILD_DIR/examples/plugins; make; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd $TRAVIS_BUILD_DIR/examples/use-phasar-as-library; mkdir build; cd build/; cmake ..; make; fi