Files
sysbench/.travis.yml
Alexey Kopytov 98ff2a66c1 build/CI/packaging: re-enable Ubuntu Groovy
Re-enable Ubuntu Groovy as packagecloud support has been added.

This reverts commit a4a5374ed1481df7826c130a3cd9ae3680088ca5.
2021-03-25 21:20:15 +03:00

270 lines
6.3 KiB
YAML

# vim ft=yaml
#
# Travis CI configuration
arch:
- amd64
- arm64
dist: trusty
sudo: required
services:
- docker
- mysql
- postgresql
git:
depth: 100500
language: c
os:
- linux
- osx
osx_image: xcode12.2
compiler:
- gcc
- clang
env:
matrix:
- TARGET=distcheck
- TARGET=test
- TARGET=coverage
- OS=el DIST=7
- OS=el DIST=8
- OS=fedora DIST=32
# Currently unsupported by packagecloud
# - OS=fedora DIST=33
- OS=ubuntu DIST=xenial
- OS=ubuntu DIST=bionic
- OS=ubuntu DIST=focal
- OS=ubuntu DIST=groovy
- OS=debian DIST=stretch
- OS=debian DIST=buster
- OS=debian DIST=sid
- OS=ubuntu DIST=xenial ARCH=i386
- OS=ubuntu DIST=bionic ARCH=i386
- OS=debian DIST=stretch ARCH=i386
- OS=debian DIST=buster ARCH=i386
- OS=debian DIST=sid ARCH=i386
matrix:
exclude:
- env: OS=el DIST=7
compiler: clang
- env: OS=el DIST=8
compiler: clang
- env: OS=fedora DIST=32
compiler: clang
- env: OS=fedora DIST=33
compiler: clang
- env: OS=ubuntu DIST=xenial
compiler: clang
- env: OS=ubuntu DIST=bionic
compiler: clang
- env: OS=ubuntu DIST=disco
compiler: clang
- env: OS=ubuntu DIST=focal
compiler: clang
- env: OS=ubuntu DIST=groovy
compiler: clang
- env: OS=debian DIST=stretch
compiler: clang
- env: OS=debian DIST=buster
compiler: clang
- env: OS=debian DIST=sid
compiler: clang
- env: OS=ubuntu DIST=xenial ARCH=i386
compiler: clang
- env: OS=ubuntu DIST=bionic ARCH=i386
compiler: clang
- env: OS=ubuntu DIST=disco ARCH=i386
compiler: clang
- env: OS=debian DIST=stretch ARCH=i386
compiler: clang
- env: OS=debian DIST=buster ARCH=i386
compiler: clang
- env: OS=debian DIST=sid ARCH=i386
compiler: clang
- env: OS=ubuntu DIST=xenial ARCH=i386
arch: arm64
- env: OS=ubuntu DIST=bionic ARCH=i386
arch: arm64
- env: OS=ubuntu DIST=disco ARCH=i386
arch: arm64
- env: OS=debian DIST=stretch ARCH=i386
arch: arm64
- env: OS=debian DIST=buster ARCH=i386
arch: arm64
- env: OS=debian DIST=sid ARCH=i386
arch: arm64
- env: OS=el DIST=7
os: osx
- env: OS=el DIST=8
os: osx
- env: OS=fedora DIST=32
os: osx
- env: OS=fedora DIST=33
os: osx
- env: OS=ubuntu DIST=xenial
os: osx
- env: OS=ubuntu DIST=bionic
os: osx
- env: OS=ubuntu DIST=disco
os: osx
- env: OS=ubuntu DIST=focal
os: osx
- env: OS=ubuntu DIST=groovy
os: osx
- env: OS=debian DIST=stretch
os: osx
- env: OS=debian DIST=buster
os: osx
- env: OS=debian DIST=sid
os: osx
- env: TARGET=distcheck
compiler: clang
- env: TARGET=distcheck
os: osx
- env: TARGET=distcheck
arch: arm64
- env: TARGET=coverage
os: osx
- env: TARGET=coverage
compiler: clang
- env: TARGET=coverage
arch: arm64
- os: osx
compiler: gcc
- os: osx
arch: arm64
- arch: arm64
compiler: clang
addons:
apt:
packages:
- libmysqlclient-dev
- libpq-dev
- libaio-dev
- clang-3.6
before_install:
# Upload builds corresponding to release tags to the 'sysbench'
# repository, push other ones to 'sysbench-prereleases'
- git describe --long --always
- commits=$(git describe --long --always | sed -n 's/^\([0-9\.]*\)-\([0-9]*\)-\([a-z0-9]*\)/\2/p')
- >
if [ ${commits:-0} = 0 ]; then
export VERSION=$(git describe)
PACKAGECLOUD_REPO=sysbench
else
PACKAGECLOUD_REPO=sysbench-prereleases
fi
- >
if [ "x$TARGET" = "xtest" ]; then
case "${TRAVIS_OS_NAME:-linux}" in
osx)
brew update
brew install mysql postgresql
# OS X requires servers to be started explicitly
brew services start mysql
cat /usr/local/var/mysql/*.err
lsof -c mysql
brew postgresql-upgrade-database
brew services start postgresql
echo "Starting PostgreSQL"
pg_ctl -wD /usr/local/var/postgres start
echo "Creating user postgres"
createuser -s postgres
;;
linux)
export ASAN_OPTIONS="detect_leaks=0"
if [ "${CC}" = "clang" ]; then
CC=clang-3.6
fi
;;
esac
fi
install:
- >
case "${TRAVIS_OS_NAME:-linux}" in
osx)
# OS X requires this for user-local pip packages
export PATH=~/Library/Python/2.7/bin:$PATH
;;
linux)
pip install --user cpp-coveralls
;;
esac
before_script:
- mysql -u root -e 'CREATE DATABASE sbtest'
- psql -U postgres -c 'CREATE DATABASE sbtest'
script:
- >
if [ -n "$TARGET" ]; then
case "$TARGET" in
test)
./autogen.sh && ./configure --with-mysql --with-pgsql
make
SBTEST_MYSQL_ARGS="--mysql-user=root" SBTEST_PGSQL_ARGS="--pgsql-user=postgres" make test
;;
distcheck)
./autogen.sh && ./configure --without-mysql
make
make distcheck
;;
coverage)
./autogen.sh && ./configure --enable-coverage --enable-asan --enable-msan --with-mysql --with-pgsql
make -j2
SBTEST_MYSQL_ARGS="--mysql-user=root" SBTEST_PGSQL_ARGS="--pgsql-user=postgres" make test
;;
esac
else
# To avoid name conflicts, deploy source packages only for
# "default", i.e. x86_64 architecture
if [[ -z "$ARCH" && "$TRAVIS_CPU_ARCH" == amd64 ]]; then
PACKAGECLOUD_GLOB='build/*.{rpm,deb,dsc}'
else
# Exclude *.src.rpm and *.dsc
PACKAGECLOUD_GLOB='build/*{[^c].rpm,.deb}'
fi
git clone https://github.com/akopytov/packpack.git packpack
packpack/packpack
fi
deploy:
# Deploy packages to PackageCloud
- provider: packagecloud
username: "${PACKAGECLOUD_USER}"
repository: "${PACKAGECLOUD_REPO}"
token: "${PACKAGECLOUD_TOKEN}"
dist: "${OS}/${DIST}"
package_glob: "${PACKAGECLOUD_GLOB}"
skip_cleanup: true
on:
all_branches: true
condition: -n "$OS" && -n "$DIST" && -n "$PACKAGECLOUD_TOKEN" && "$DIST" != "rawhide" && "$DIST" != "sid"
after_success:
- >
if [ "x$TARGET" = "xcoverage" ]; then
coveralls --exclude third_party/ --gcov-options '\-lp'
fi
# Local variables:
# mode: yaml
# End: