-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improves travis-ci config to support ubuntu/centos+gcc, cpplint #263
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,74 @@ | ||
sudo: required | ||
dist: trusty | ||
|
||
language: cpp | ||
|
||
compiler: | ||
# gcc test is disabled (see #120) | ||
# - gcc | ||
- clang | ||
services: | ||
- docker | ||
|
||
matrix: | ||
include: | ||
- env: | ||
- DIST=centos | ||
- VERSION=6 | ||
- env: | ||
- DIST=centos | ||
- VERSION=7 | ||
- env: | ||
- DIST=centos | ||
- VERSION=7 | ||
- SCL=devtoolset-4 # gcc 5.2 (enabled function multiversioning) | ||
- env: | ||
- DIST=ubuntu | ||
- VERSION=12.04 | ||
- env: | ||
- DIST=ubuntu | ||
- VERSION=14.04 | ||
- env: | ||
- DIST=ubuntu | ||
- VERSION=16.04 # gcc 5.3 (enabled function multiversioning) | ||
|
||
before_install: | ||
- lsb_release -a | ||
- uname -a | ||
- sudo apt-get -qq update | ||
- docker pull ${DIST}:${VERSION} | ||
- docker run -w /root --name test -d ${DIST}:${VERSION} sleep infinity | ||
- docker cp . test:/root/ | ||
- if [ "$DIST" == "centos" ]; then | ||
if [ $VERSION -eq 6 ]; then | ||
docker exec test rpm -Uvh http://download.jubat.us/yum/rhel/6/stable/x86_64/jubatus-release-6-2.el6.x86_64.rpm; | ||
elif [ $VERSION -eq 7 ]; then | ||
docker exec test rpm -Uvh http://download.jubat.us/yum/rhel/7/stable/x86_64/jubatus-release-7-2.el7.x86_64.rpm; | ||
fi; | ||
if [ -n "$SCL" ]; then | ||
docker exec test yum -y install centos-release-scl; | ||
fi; | ||
fi | ||
|
||
install: | ||
# msgpack | ||
- sudo apt-get -qq install libmsgpack-dev | ||
# oniguruma | ||
- wget https://github.com/kkos/oniguruma/releases/download/v5.9.6/onig-5.9.6.tar.gz && tar xvf onig-5.9.6.tar.gz | ||
- pushd onig-5.9.6 && ./configure && make && sudo make install && popd | ||
- sudo ldconfig | ||
- if [ "$DIST" == "centos" ]; then | ||
docker exec test yum -y install redhat-lsb gcc-c++ bzip2 msgpack-devel oniguruma-devel; | ||
if [ -n "$SCL" ]; then | ||
docker exec test yum -y install ${SCL}-gcc-c++ ${SCL}-binutils; | ||
docker exec test bash -c "echo 'source scl_source enable ${SCL}' > /root/.bashrc"; | ||
fi; | ||
fi | ||
- if [ "$DIST" == "ubuntu" ]; then | ||
docker exec test apt-get update; | ||
docker exec test apt-get -qq install lsb-release autoconf automake make g++ python2.7 wget tar bzip2 libmsgpack-dev; | ||
docker exec test bash -c "wget --no-check-certificate https://github.com/kkos/oniguruma/releases/download/v5.9.6/onig-5.9.6.tar.gz && tar xvf onig-5.9.6.tar.gz && cd onig-5.9.6 && ./configure && make && make install && ldconfig"; | ||
if [ "$VERSION" != "12.04" ]; then | ||
docker exec test ln -sf /usr/bin/python2.7 /usr/bin/python; | ||
fi; | ||
fi | ||
|
||
before_script: | ||
- docker exec test lsb_release -a | ||
- docker exec -t test bash -ic "g++ --version" | ||
|
||
script: | ||
- ./waf configure | ||
- ./waf build --checkall | ||
- docker exec -t test bash -ic "./waf configure" | ||
- docker exec -t test bash -ic "./waf build --checkall" | ||
- docker exec -t test bash -ic "./waf cpplint" | ||
- if [ -n "$SCL" ]; then docker exec test ./waf build --checkall; fi | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this line needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 将来的にCentOS7でも #246 / #250 の全機能を使ったバイナリを配布することを考慮して, ※ SCLが設定されている場合,bash経由でコマンドを実行すると51行目で出力した .bashrc が有効となりますが,bashを経由しないでコマンドを実行すると .bashrc を読み込まないのでSCL環境外でそのコマンドを実行するという動作になります There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ありがとうございます、意図了解しました。 なお、手元で試してみたところ、現時点では SCL-enabled であってもシステム側のランタイムライブラリが使われるようです。
|
||
|
||
branches: | ||
only: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a memorandum: It seems that Travis CI currently ignores this settings for matrix builds. travis-ci/travis-ci#3655