libzmq/.travis.yml
Luca Boccassi f126da8b22 Problem: no way to deploy releases to OBS
Solution: add new tokens to .travis.yml and change ci_deploy.sh
script to use Github APIs to create a temporary branch at the tag,
and the OBS APIs to trigger a source service run in the stable and
draft release projects:
network:messaging:zeromq:release-stable
network:messaging:zeromq:release-draft

The branch hack is unfortunately necessary as it is not possible to
modify OBS sources with the token APIs, and it is also not possible
to automatically fetch the latest tag in the service files.
The temporary branch is immediately deleted.
2017-04-30 16:15:15 +01:00

91 lines
3.4 KiB
YAML

# Travis CI script
language: c
os:
- linux
- osx
dist: trusty
env:
matrix:
- BUILD_TYPE=default CURVE=tweetnacl DRAFT=enabled
- BUILD_TYPE=android CURVE=tweetnacl
- BUILD_TYPE=cmake CURVE=tweetnacl
- BUILD_TYPE=default
# tokens to deploy releases on OBS and create/delete temporary branch on Github.
# 1) Create a token on https://github.com/settings/tokens/new with "public_repo"
# capability and encrypt it with travis encrypt --org -r zeromq/libzmq GH_TOKEN="<token>"
# 2) Create 2 OBS tokens with osc token --create network:messaging:zeromq:release-<stable|draft> libzmq
# encrypt them with travis encrypt --org -r zeromq/libzmq OBS_<STABLE|DRAFT>_TOKEN="<token>"
global:
- secure: aaIs9Y44FYp9VFCqa6LLD4illBH4aUfbS0zzzbAQ5xJvD6NfBsMiKEIhf/kRNCHAtP+1VfQVOejTD6/i08ALsVr3cZD9oB/t7874tz2/jeZUIhRNo+1KwyaVqNg0yUSV6ASIoq4aOfuGnjBlezNQ8LQ2bjQB2m4Enl5wxoYcYdA=
- secure: YFrcedBIKe0NR1WC6qQi9phZgtnzOiBIXm40TirvCtstV4eVnSouKgtQfLLArZ4o2tjflq4grQQNo1rJatvyi5YPOXsMcndsni18S+4Ffu8qbECdtPrK52vBweuf7q9oV9Ydax0Fm4bEqEMOZ2/mRBy3nK+mgsE3upeMwyWR0Zw=
- secure: lbZSzmqN39QdJwewKOZgq/1ijPKuyx9MFrGzMqXj2+eOSlaZS/tNavHMdKJOev+qJGK9wxmwzxOxS10AiH+AvN7WBacXX4ZtudjScz2HKJRDWTKyzMbzyScq51afniItzrsm+Vo8NHkenNFkux0sSbh0aHlpkLwrGQu+WZWcDN4=
matrix:
include:
- env: BUILD_TYPE=default CURVE=tweetnacl IPv6=ON
os: linux
dist: precise
sudo: false
- env: BUILD_TYPE=coverage CURVE=tweetnacl DRAFT=enabled
os: linux
addons:
apt:
packages:
- lcov
- env: BUILD_TYPE=valgrind CURVE=tweetnacl DRAFT=enabled
os: linux
addons:
apt:
packages:
- valgrind
- env: BUILD_TYPE=default CURVE=libsodium
os: linux
addons:
apt:
sources:
- sourceline: 'deb http://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-stable/xUbuntu_14.04/ ./'
key_url: 'http://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-stable/xUbuntu_14.04/Release.key'
packages:
- libsodium-dev
- asciidoc
- xmlto
- env: BUILD_TYPE=default CURVE=libsodium
os: osx
- env: BUILD_TYPE=default CURVE=tweetnacl DRAFT=enabled ADDRESS_SANITIZER=enabled
os: linux
sudo: required
before_install:
- if [ $TRAVIS_OS_NAME == "osx" ] ; then brew update; brew install binutils ; fi
- if [ $TRAVIS_OS_NAME == "osx" -a $CURVE == "libsodium" ] ; then brew install libsodium ; fi
before_script:
# ZMQ stress tests need more open socket (files) than the usual default
# On OSX, it seems the way to set the max files limit is constantly changing, so
# try to use all known knobs to ensure compatibility across various versions
- if [ $TRAVIS_OS_NAME == "osx" ] ; then sudo sysctl -w kern.maxfiles=64000 ; sudo sysctl -w kern.maxfilesperproc=64000 ; sudo launchctl limit maxfiles 64000 64000 ; ulimit -n 64000; fi
# Build and check this project according to the BUILD_TYPE
script: ./ci_build.sh
# Deploy tags
before_deploy:
- . ./ci_deploy.sh
deploy:
provider: releases
api_key:
secure: vGB5E+A8wxm2J1GJZzmIgT9PrjEzvd9gE8iui8FyxSbxAsW9vFZFGZC/21sTtpVcmRarwQCHH1UEbtg+nJwN2iD9YzMRnSVks8xqP+b709YW+VXaMuhZgTzWa74IorQku7NuvLibvQk72/OSgdwPGaNJ6f5AX9pnWVWbEoW1svE=
file_glob: true
file: ${LIBZMQ_DEPLOYMENT}
skip_cleanup: true
on:
repo: zeromq/libzmq
branch: master
tags: true
condition: "$TRAVIS_OS_NAME =~ (linux) && $BUILD_TYPE =~ (default) && $CURVE =~ (libsodium) && -z $DRAFT"