Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit e3dd83d

Browse files
committed
Merge pull request #98 from dawagner/travis-docker
travis: Use the docker infrastructure As advertised by travis news: http://blog.travis-ci.com/2014-12-17-faster-builds-with-container-based-infrastructure/ using the new docker infra is faster and more reliable. This comes with the cost of not being able to use "sudo", though. Installing packages is still possible by specifying them in an "addons.apt" section in .travis.yml. We have to remove "sudo make install" but we aren't using the installed libs and binaries anyway. I had some syntax issues with the "addons" and "env" sections and had to remove the coverity subsection which wasn't configure for the 01org repository anyway. I'm also removing the email notification since I never received any email and actually don't want to.
2 parents 541735d + 1297bd1 commit e3dd83d

File tree

1 file changed

+32
-38
lines changed

1 file changed

+32
-38
lines changed

.travis.yml

Lines changed: 32 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,52 @@
1+
# Use travis docker infrastructure
2+
sudo: false
13
language: cpp
4+
5+
env:
6+
global:
7+
- PREFIX=$HOME/prefix
8+
29
compiler:
3-
- gcc
4-
# - clang # not supported yet
10+
- gcc
11+
# clang not supported yet
12+
# - clang
513

6-
# Install a recent gcc, gcov and cmake,
14+
# Install a recent gcc and gcov,
715
# it will not be necessary once travis worker is based on ubuntu > 12.04.
816
# Install SWIG for bindings generation
9-
before_install:
10-
- sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
11-
- sudo add-apt-repository --yes ppa:kalakris/cmake # Non official cmake backport
12-
- sudo apt-get update -qq
13-
- sudo pip install cpp-coveralls
17+
# Install valgrind for memcheck tests
18+
addons:
19+
apt:
20+
sources:
21+
- ubuntu-toolchain-r-test
22+
packages:
23+
- swig
24+
- valgrind
25+
- g++-4.8
1426

1527
install:
16-
- sudo apt-get install --yes swig cmake valgrind g++-4.8
17-
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 100
18-
- sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-4.8 100
19-
- sudo wget --directory-prefix /usr/include/
28+
- pip install --user cpp-coveralls; export PATH=$HOME/.local/bin:$PATH
29+
- wget --directory-prefix $PREFIX/include
2030
https://raw.github.com/philsquared/Catch/master/single_include/catch.hpp
2131

32+
before_script:
33+
- if [ "$CC" = "gcc" ]; then export CC=gcc-4.8 CXX=g++-4.8; fi
34+
2235
# how to build
2336
script:
2437
- ( mkdir build_debug && cd build_debug &&
25-
cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERAGE=ON .. &&
38+
cmake -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_BUILD_TYPE=Debug -DCOVERAGE=ON .. &&
2639
make -j &&
2740
CTEST_OUTPUT_ON_FAILURE=1 make ExperimentalTest ExperimentalMemCheck )
2841
- ( mkdir build && cd build &&
29-
cmake .. &&
42+
cmake -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=../install .. &&
3043
make -j &&
31-
sudo make install &&
32-
sudo ldconfig &&
33-
CTEST_OUTPUT_ON_FAILURE=1 make test )
44+
CTEST_OUTPUT_ON_FAILURE=1 make test &&
45+
make install)
3446
- ( cd skeleton-subsystem &&
35-
cmake . &&
47+
cmake -DCMAKE_INSTALL_PREFIX=../install . &&
3648
make &&
37-
sudo make install &&
38-
sudo ldconfig )
49+
make install )
3950

4051
after_success:
4152
# Push coverage info on coveralls.io.
@@ -48,26 +59,9 @@ after_success:
4859
--exclude "test/test-subsystem"
4960
--exclude "bindings/c/Test.cpp"
5061
--exclude "test/tokenizer"
62+
--gcov /usr/bin/gcov-4.8
5163
--gcov-options '\--long-file-names --preserve-paths'
5264

5365
notifications:
54-
email:
55-
5666
irc:
5767
- "chat.freenode.net#parameter-framework"
58-
59-
env:
60-
global:
61-
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
62-
# via the "travis encrypt" command using the project repo's public key
63-
- secure: "Y+iKBg65e4dleuMwxAo1XSl/QkF4AtCe35ltu2DhPbeMJCywBmu0aeDb04oEaZJL+BxP+KMoRqRjeoGI3W/sh0gAq03iQ+P4C8KwRb9fdYPPVwH3NP3fyN27gFBH9GS8uMth68o2KP/oO/aqNwii/KbMZtubp7MhY/wnvz4DLCQ="
64-
65-
addons:
66-
coverity_scan:
67-
project:
68-
name: "dawagner/parameter-framework"
69-
description: "Plugin-based and rule-based framework for managing parameters"
70-
notification_email: [email protected]
71-
build_command_prepend: "cmake ."
72-
build_command: "make -j 12"
73-
branch_pattern: coverity_scan

0 commit comments

Comments
 (0)