AMD64
no language set
Git
Restream/reindexer:.travis.yml@7cd49d9
sudo: required
dist: trusty
language: cpp
env:
global:
- BUILD_DIR=${TRAVIS_BUILD_DIR}/build
- GOPATH=$HOME/.gopath/
cache:
directories:
- $HOME/.cache
git:
depth: 100000
.stage_build_linux_template: &stage_build_linux_template
async: true
fail_fast: true
os: linux
dist: bionic
env:
- WITH_DOXYGEN=0 # set to 1 when doxy doc deploy is ready
- CMAKE_OPTS="-DCMAKE_BUILD_TYPE=Release -DENABLE_LIBUNWIND=Off"
before_install:
- mkdir -p ${BUILD_DIR}
- mkdir -p ${GOPATH}/src/github.com/restream && ln -s `pwd` ${GOPATH}/src/github.com/restream/reindexer
install:
- sudo apt-get -qq update > /dev/null && sudo apt-get -qq install -y -f build-essential binutils cmake curl git google-perftools libgoogle-perftools-dev libsnappy-dev libleveldb-dev flex python3-pip
- curl https://raw.githubusercontent.com/travis-ci/gimme/master/gimme > ~/gimme && chmod +x ~/gimme && eval "$(~/gimme 1.13.1)"
before_script:
- git clone https://github.com/google/googletest.git /tmp/dep_googletest && cd /tmp/dep_googletest && cmake -DBUILD_GMOCK=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-std=c++11" . && make -j4 && sudo make install
- git clone https://github.com/google/benchmark.git /tmp/dep_googlebench && cd /tmp/dep_googlebench && cmake -DBENCHMARK_ENABLE_TESTING=Off -DCMAKE_BUILD_TYPE=Release . && make -j4 && sudo make install
- if [[ ${WITH_DOXYGEN} -eq 1 ]]; then git clone https://github.com/doxygen/doxygen.git /tmp/dep_doxygen && cd /tmp/dep_doxygen && cmake -DCMAKE_BUILD_TYPE=Release . && make -j4 && sudo make install; fi
- if [[ ${WITH_DOXYGEN} -eq 1 ]]; then git clone https://github.com/mosra/m.css.git /tmp/dep_mcss && sudo ln -s /tmp/dep_mcss/doxygen/dox2html5.py /usr/local/bin; fi
- go get github.com/cheggaaa/deepcopy
- go get gopkg.in/yaml.v2
- go get github.com/golang/snappy
- go get github.com/stretchr/testify/assert
- go get github.com/iancoleman/orderedmap
- go get github.com/hashicorp/golang-lru
script:
- cd ${BUILD_DIR} && cmake ${CMAKE_OPTS} ${TRAVIS_BUILD_DIR} && make -j4
- ctest --verbose
- cd ${TRAVIS_BUILD_DIR} && go test ./test -bench . -cpu 1 -benchmem -benchtime 100ms
after_script:
- find . -name CMakeFiles | xargs -n1 rm -rf
.stage_build_linux_asan_template: &stage_build_linux_asan_template
<<: *stage_build_linux_template
env:
- WITH_DOXYGEN=0
- CMAKE_OPTS="-DWITH_ASAN=On -DENABLE_LIBUNWIND=Off"
script:
- cd ${BUILD_DIR} && cmake ${CMAKE_OPTS} ${TRAVIS_BUILD_DIR} && make -j4
- ctest --verbose
- cd ${TRAVIS_BUILD_DIR} && CGO_LDFLAGS=-fsanitize=address go test ./test -bench . -cpu 1 -benchmem -benchtime 100ms -seedcount 50000 -timeout 12m
.stage_build_linux_tsan_template: &stage_build_linux_tsan_template
<<: *stage_build_linux_template
env:
- WITH_DOXYGEN=0
- CMAKE_OPTS="-DWITH_TSAN=On -DENABLE_LIBUNWIND=Off"
.stage_build_linux_cov_template: &stage_build_linux_cov_template
<<: *stage_build_linux_template
env:
- WITH_DOXYGEN=0
- CMAKE_OPTS="-DWITH_GCOV=On -DENABLE_LIBUNWIND=Off"
script:
- cd ${BUILD_DIR} && cmake ${CMAKE_OPTS} ${TRAVIS_BUILD_DIR} && make -j4
- ctest --verbose
.stage_build_osx_template: &stage_build_osx_template
<<: *stage_build_linux_template
env:
- CMAKE_OPTS="-DCMAKE_BUILD_TYPE=Release -DENABLE_LIBUNWIND=Off -DWITH_PYTHON=Off"
os: osx
osx_image: xcode11.3
install:
- brew update > /dev/null && brew install gperftools leveldb snappy flex
- sudo sysctl -w kern.maxfiles=20480 && sudo sysctl -w kern.maxfilesperproc=20480 && sudo launchctl limit maxfiles 20480
- ulimit -S -n 20480 && ulimit -n
jobs:
include:
- stage: build
<<: *stage_build_osx_template
- stage: build
<<: *stage_build_linux_template
- stage: build
<<: *stage_build_linux_asan_template
# - stage: build
# <<: *stage_build_linux_tsan_template
- stage: build
<<: *stage_build_linux_cov_template
Build Config
{
"os": [
"linux"
],
"dist": "trusty",
"sudo": true,
"script": [
"bin/travis-add-source -h",
"bin/travis-add-all-sources-locally",
"diff -u ubuntu.json <(jq 'sort_by(.alias)' < ubuntu.json)"
],
"install": [
"skip"
],
"language": "ruby"
}