forked from apache/qpid-dispatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
121 lines (114 loc) · 3.73 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
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License
#
sudo: true
language: c
cache: ccache
matrix:
fast_finish: true
allow_failures:
- os: osx
include:
- name: "apache-rat:check"
os: linux
sudo: false
env: []
language: java
addons:
apt:
packages: []
cache:
directories:
- $HOME/.m2/repository
before_cache:
- rm -rf $HOME/.m2/repository/org/apache/qpid/*
install: []
before_script: []
script:
- mvn apache-rat:check
# prepending /usr/bin to PATH to avoid mismatched python interpreters in /opt
- os: linux
env:
- PATH="/usr/bin:$PATH" PROTON_VERSION=master BUILD_TYPE=Debug
- os: linux
env:
- PATH="/usr/bin:$PATH" PROTON_VERSION=0.30.0 BUILD_TYPE=Coverage
- os: linux
env:
- PATH="/usr/bin:$PATH" PROTON_VERSION=0.30.0 BUILD_TYPE=RelWithDebInfo
- DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=asan'
- os: osx
osx_image: xcode10.1
env:
- PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:$PATH" PROTON_VERSION=master
before_install:
- bash ./macports.sh
- export COLUMNS=80
- yes | sudo port install cmake swig swig-python libuv jsoncpp libwebsockets cyrus-sasl2 pkgconfig python37 py37-pip
# set aliases for CMake's PythonInterp and PythonLibs to find MacPort's `python` on the path first
- sudo port select --set python python37
- sudo port select --set python3 python37
- python -m venv p3venv
- source p3venv/bin/activate
- pip install unittest2
addons:
apt:
packages:
# Proton requirements
- cmake
- libsasl2-dev
- libssl-dev
- python2.7
- python2.7-dev
- sasl2-bin
- swig
# documentation
- asciidoc
- asciidoctor
- dblatex
# unit test requirement
- python-unittest2
- tox
# code coverage
- lcov
install:
- NPROC=2
- PREFIX=$PWD/install
- git clone --depth=10 --branch=$PROTON_VERSION https://github.com/apache/qpid-proton.git
# Build and install proton from source.
- mkdir qpid-proton/build
- pushd qpid-proton/build
- cmake .. -DCMAKE_INSTALL_PREFIX=$PREFIX -DBUILD_PYTHON=YES -DBUILD_JAVASCRIPT=NO -DBUILD_CPP=NO -DBUILD_GO=NO -DBUILD_RUBY=NO -DBUILD_PHP=NO -DBUILD_PERL=NO
- cmake --build . --target install -- -j $NPROC
- popd
before_script:
- source qpid-proton/build/config.sh
- mkdir build
- pushd build
- cmake .. -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${DISPATCH_CMAKE_ARGS}
- cmake --build . --target install -- -j $NPROC
script:
- pushd ../qpid-proton
- echo $(echo "Current proton commit:") $(git rev-parse HEAD) "(${PROTON_VERSION})"
- popd
# Workaround on macOS for PROTON-808 Binaries have their library locations stripped
- if [[ "${OSTYPE}" == "darwin"* ]]; then install_name_tool -add_rpath $PREFIX/lib/. $PREFIX/lib/proton/bindings/python/_cproton.so; fi
- ctest -V && if [ "$BUILD_TYPE" = "Coverage" ]; then cmake --build . --target coverage; fi
after_success:
- cd ${TRAVIS_BUILD_DIR}/build
- if [ "$BUILD_TYPE" = "Coverage" ]; then bash <(curl -s https://codecov.io/bash); fi