Skip to content

Commit

Permalink
Squashed '.travis/' changes from f50b3e4..7a40a28
Browse files Browse the repository at this point in the history
7a40a28 Update submodule before building
bc0a72e [Win32] Solve an issue in functions
99d898d [Win32] Add AppVeyor support
1e4f677 eigen: fix cflags
0fced9b eigen: fix for new pkg-config handling
4240350 eigen: update to 3.2.8
3b01c11 dependencies: update NAG to Mark 25
507fed5 Merge pull request #25 from olivier-stasse/master
971d761 Remove lcov from ppa installation and uses 1.12 release tarball
bf3d460 Merge pull request #23 from haudren/topic/fix-english
b889a27 Correct multiple typos and some syntax
70b93ea Pass CMAKE_ADDITIONAL_OPTIONS to git dependencies
ec12523 Merge pull request #21 from gergondet/topic/FixCatkinDependencies
72765fe Build ROS git dependencies in a separate workspace
ee85d3a Fix test on ROS_GIT_DEPENDENCIES
e54278a Reflect change to branch character delimiter in comment
f8c01cf Actually build ROS git dependencies
9756122 Factorize git dependency handling
d002d2a Stop relying on exit codes to avoid issues with set -e
bd9308e after_success: prevent failure
08bac20 [dependencies] Use -qq when installing ros packages
ca8a895 [dependencies] Automatically select the right ubuntu repository
edfdf75 Merge pull request #20 from gergondet/topic/Reforge
9979090 Only update the documentation if gh-pages branch exists
41133ab Re-write all scripts in a functions/main way
90c3ab9 Add support for ssh-formed git dependencies
66007c9 Add a script to install pybindgen-0.16
41116fc Fix eigen script for eigen 3.2.7
acf4e57 Adapt the scripts to non-travis environment
c000879 dependencies: update Eigen version to 3.2.7

git-subtree-dir: .travis
git-subtree-split: 7a40a28a601e0b841a9a884ce91902f162a749a8
  • Loading branch information
gergondet committed Oct 26, 2016
1 parent a8faff2 commit 99dd84d
Show file tree
Hide file tree
Showing 16 changed files with 843 additions and 359 deletions.
6 changes: 3 additions & 3 deletions .travis/after_failure
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
. .travis/common.sh
. `dirname $0`/common.sh

# Set debug mode
set -x
Expand All @@ -13,8 +13,8 @@ if [ -d debian ]; then
echo "Debian build failed"
else
if [ ! x${DIST} = x ]; then
echo "skipping this build"
exit 0
echo "skipping this build"
exit 0
fi

# Dump as much log as we can
Expand Down
185 changes: 107 additions & 78 deletions .travis/after_success
Original file line number Diff line number Diff line change
@@ -1,99 +1,128 @@
#!/bin/bash
. .travis/common.sh
. `dirname $0`/common.sh

# Set debug mode
set -x
set -v

if [ -d debian ]; then
if `test x${DIST} = x`; then
echo "distribution is not set, skipping this build"
exit 0
fi
echo "Target distribution: ${DIST}"
##############################
# -- Helper functions -- #
##############################

export GNUPGHOME="$root_dir/.travis/.gnupg"
# If the build is a success, upload the source package to Launchpad.
if `test x${DIST} = xunstable`; then
echo "Debian Sid package. Skipping Launchpad upload..."
upload_to_ppa()
{
if `test x${DIST} = x`; then
echo "distribution is not set, skipping this build"
exit 0
fi
echo "Target distribution: ${DIST}"

export GNUPGHOME="`dirname $0`/.gnupg"
# If the build is a success, upload the source package to Launchpad.
if `test x${DIST} = xunstable`; then
echo "Debian Sid package. Skipping Launchpad upload..."
else
if `! test ${CI_PULL_REQUEST} = false`; then
echo "skipping launchpad upload in pull request"
else
if `! test ${TRAVIS_PULL_REQUEST} = false`; then
echo "skipping launchpad upload in pull request"
else
dput ppa:${PPA_URI} "$build_dir"/export/*_source.changes
fi
fi
elif [[ ${TRAVIS_OS_NAME} = linux ]]; then
if [ ! x${DIST} = x ]; then
echo "skipping this build"
exit 0
dput ppa:${PPA_URI} "$build_dir"/export/*_source.changes
fi
fi
}

generate_coverage_data()
{
# Upload coveralls data.
if [ x${CC} = xgcc ]; then
cd $build_dir
# If tests failed, coveralls data may not have been written
lcov --directory $build_dir --base-directory $root_dir --capture --output-file coverage.info || true
# Note: ignore rules are given by a string such as "*test* *foo*"
# lcov expects: '*test*' '*foo*'
# We use -f to prevent expansion of *
set -f
lcov --remove coverage.info '/usr*' "$install_dir*" ${LCOV_IGNORE_RULES} -o coverage.info || true
set +f
cd $root_dir
HEAD=`git rev-parse HEAD`
coveralls-lcov "$build_dir/coverage.info" || true
cd -
else
echo "skipping coveralls upload in non-gcc builds"
fi
}

# Upload coveralls data.
if [ x${CC} = xgcc ]; then
cd $build_dir
# If tests failed, coveralls data may not have been written
lcov --directory $build_dir --base-directory $root_dir --capture --output-file coverage.info || true
lcov --remove coverage.info '/usr*' "$install_dir*" -o coverage.info || true
if `! test x${LCOV_IGNORE_RULES} = x`; then
# Note: ignore rules are given by a string such as "*test* *foo*"
# lcov expects: '*test*' '*foo*'
# We use -f to prevent expansion of *
set -f
lcov --remove coverage.info ${LCOV_IGNORE_RULES} -o coverage.info || true
set +f
fi
cd $root_dir
coveralls-lcov "$build_dir/coverage.info" || true
cd -
else
echo "skipping coveralls upload in non-gcc builds"
set_push_uri()
{
# If GH_PUSH_URI has already been provided
if `test x${GH_PUSH_URI} != x`; then
export GH_PUSH_URI=${GH_PUSH_URI}
# If encrypted username/tokens were not provided
elif `test x${GH_TOKEN} = x -o x${GH_USERNAME} = x`; then
echo "missing username and/or token for GitHub push"
export GH_PUSH_URI=""
else
export GH_PUSH_URI=https://${GH_USERNAME}:${GH_TOKEN}@github.com/${GH_REPO}
fi
if `test x${GH_PUSH_URI} != x`; then
cd $root_dir
git remote set-url origin "${GH_PUSH_URI}"
fi
return 0
}

update_documentation()
{
# If we are on the master branch:
if [[ ${CI_BRANCH} = master ]]; then
# Update the documentation.
# Retrieve last commit of the gh-pages branch.
if `git fetch --depth=1 origin gh-pages:gh-pages`; then
cd $build_dir/doc && $root_dir/cmake/github/update-doxygen-doc.sh \
-r $root_dir -b $build_dir
fi
fi
}

# If it's not a fork or a pull request
if `test x${TRAVIS_REPO_SLUG} = x${GH_REPO} -a ${TRAVIS_PULL_REQUEST} = false`; then
# If encrypted username/tokens were not provided
if `test x${GH_TOKEN} = x -o x${GH_USERNAME} = x`; then
echo "missing username and/or token for GitHub push"
else
cd $root_dir
# Set the push capable URL.
#
# Add the possibility to use three variables instead of one to
# work around string maximum length limitation issue.
if `test x${GH_PUSH_URI} = x`; then
export GH_PUSH_URI=https://${GH_USERNAME}:${GH_TOKEN}@github.com/${GH_REPO}
fi
git remote set-url origin "${GH_PUSH_URI}"
push_note()
{
# Push git note indicating success
cd $root_dir
HEAD=`git rev-parse HEAD`
notes_msg="Successful build.\n----\n\nDependencies commit id:"
for package in ${GIT_DEPENDENCIES}; do
git_dependency_parsing $package
cd $build_dir/$git_dep
commitid=`git rev-parse HEAD || echo unknown`
notes_msg="${notes_msg} $git_dep : $commitid\n"
done
cd $root_dir
git fetch --quiet --force origin refs/notes/jrl-ci:refs/notes/jrl-ci || true
git notes --ref=jrl-ci add -f -m "$(echo "${notes_msg}")" $HEAD
git push origin refs/notes/jrl-ci --force
}

# If we are on the master branch:
if [[ ${TRAVIS_BRANCH} = master ]]; then
# Update the documentation.
# Retrieve last commit of the gh-pages branch.
git fetch --depth=1 origin gh-pages:gh-pages
#########################
# -- Main script -- #
#########################

cd $build_dir/doc && $root_dir/cmake/github/update-doxygen-doc.sh \
-r $root_dir -b $build_dir
fi
if [ -d debian ]; then
upload_to_ppa
elif [[ ${CI_OS_NAME} = linux ]]; then
if [ ! x${DIST} = x ]; then
echo "skipping this build"
exit 0
fi

# Push git note indicating success
cd $root_dir
notes_msg="Successful build.\n----\n\nDependencies commit id:"
for package in ${GIT_DEPENDENCIES}; do
cd $build_dir/$package
commitid=`git rev-parse HEAD || echo unknown`
notes_msg="${notes_msg} $package : $commitid\n"
done
cd $root_dir
git fetch --quiet --force origin refs/notes/travis:refs/notes/travis || true
git notes --ref=travis add -f -m "$(echo "${notes_msg}")" $HEAD
git push origin refs/notes/travis --force
fi
generate_coverage_data
# If it's not a fork or a pull request
if `test x${CI_REPO_SLUG} = x${GH_REPO} -a ${CI_PULL_REQUEST} = false`; then
set_push_uri
if `test x${GH_PUSH_URI} != x`; then
update_documentation
push_note
fi
else
echo "skipping doc/build result upload on forks and for pull requests"
echo "skipping doc/build result upload on forks and for pull requests"
fi
fi

Expand Down
42 changes: 42 additions & 0 deletions .travis/appveyor.yml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
version: 1.0.{build}
os: Visual Studio 2015
clone_folder: C:/devel-src/@PROJECT_NAME@
# The following lines output the connection parameters for the RDE in AppVeyor
# at the start of the build. Be advised that this may allow people to tinker
# with your build
# init:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
environment:
CI_OS_NAME: win32
CI_TOOL: appveyor
# Dependencies should be a list of dependencies separated by ';'
CHOCO_DEPENDENCIES: @CHOCO_DEPENDENCIES@
GIT_DEPENDENCIES: @GIT_DEPENDENCIES@
# Should be the same as clone_folder
PROJECT_SOURCE_DIR: C:/devel-src/@PROJECT_NAME@
# Do not tinker with the variables below unless you know what you are doing
SOURCE_FOLDER: C:/devel-src
CMAKE_INSTALL_PREFIX: C:/devel
PATH: C:/devel/bin;C:\Libraries\boost_1_59_0\lib64-msvc-14.0;%PATH%
PKG_CONFIG_PATH: C:/devel/lib/pkgconfig
BOOST_ROOT: C:\Libraries\boost_1_59_0
BOOST_LIBRARYDIR: C:\Libraries\boost_1_59_0\lib64-msvc-14.0
# N.B: empty lines here and in test_script are VERY important
build_script:
- ps: >-
Set-PSDebug -Trace 1

. ./.jrl-ci/functions.ps1

setup_build

./.jrl-ci/dependencies/eigen-3.2.ps1

install_dependencies

build_project
test_script:
- cmd: >-
cd %PROJECT_SOURCE_DIR%

ctest
Loading

0 comments on commit 99dd84d

Please sign in to comment.