2018-06-22 11:18:30 +00:00
|
|
|
# travis.yml for testing radare2. Initially written in 2014-2016, by jn__. Updated 2018 by damo22
|
2015-10-10 22:08:47 +00:00
|
|
|
|
2018-06-23 12:48:33 +00:00
|
|
|
language: generic
|
2017-06-18 01:32:38 +00:00
|
|
|
dist: trusty
|
2018-07-12 07:01:50 +00:00
|
|
|
conditions: v1
|
2018-06-22 11:18:30 +00:00
|
|
|
sudo: required
|
2015-10-10 22:08:47 +00:00
|
|
|
|
2018-06-22 11:18:30 +00:00
|
|
|
services:
|
|
|
|
- docker
|
2015-04-03 13:41:48 +00:00
|
|
|
|
2018-06-23 12:48:33 +00:00
|
|
|
os: osx
|
|
|
|
matrix:
|
2018-07-12 07:01:50 +00:00
|
|
|
fast_finish: true
|
2018-06-23 12:48:33 +00:00
|
|
|
include:
|
|
|
|
- os: linux
|
|
|
|
env: COMPILER_NAME=gcc CXX=g++ CC=gcc
|
|
|
|
- os: linux
|
|
|
|
env: COMPILER_NAME=clang CXX=clang++ CC=clang
|
2018-07-09 14:58:38 +00:00
|
|
|
- os: linux
|
2018-09-12 10:24:19 +00:00
|
|
|
env: COMPILER_NAME=gcc CXX=g++ CC=gcc INSTALL_SYSTEM=meson COVERAGE=1
|
2018-07-17 21:01:40 +00:00
|
|
|
- if: head_branch =~ ^fedora-* OR tag =~ ^release-* OR tag =~ ^fedora-*
|
|
|
|
os: linux
|
|
|
|
env: COMPILER_NAME=gcc CXX=g++ CC=gcc INSTALL_SYSTEM=meson R2_SYS_CAPSTONE=true R2_SYS_MAGIC=true R2_SYS_ZIP=true R2_SYS_LZ4=true R2_SYS_ZLIB=true
|
2018-07-12 07:01:50 +00:00
|
|
|
- if: head_branch =~ ^asan-* OR tag =~ ^release-* OR type = push
|
|
|
|
os: linux
|
2018-07-07 22:15:51 +00:00
|
|
|
env: COMPILER_NAME=clang CXX=clang++ CC=clang CFLAGS="-O0 -ggdb -fsanitize=address -fno-omit-frame-pointer" LDFLAGS="-O0 -ggdb -fsanitize=address -fno-omit-frame-pointer" ASAN_OPTIONS=detect_odr_violation=0 LSAN_OPTIONS=detect_leaks=0
|
2018-06-23 12:48:33 +00:00
|
|
|
- os: osx
|
|
|
|
env: COMPILER_NAME=clang CXX=clang++ CC=clang
|
2018-07-06 21:35:55 +00:00
|
|
|
allow_failures:
|
2018-07-09 14:58:38 +00:00
|
|
|
- os: linux
|
2018-07-17 21:01:40 +00:00
|
|
|
env: COMPILER_NAME=gcc CXX=g++ CC=gcc INSTALL_SYSTEM=meson R2_SYS_CAPSTONE=true R2_SYS_MAGIC=true R2_SYS_ZIP=true R2_SYS_LZ4=true R2_SYS_ZLIB=true
|
2018-07-06 21:35:55 +00:00
|
|
|
- os: linux
|
2018-07-07 22:15:51 +00:00
|
|
|
env: COMPILER_NAME=clang CXX=clang++ CC=clang CFLAGS="-O0 -ggdb -fsanitize=address -fno-omit-frame-pointer" LDFLAGS="-O0 -ggdb -fsanitize=address -fno-omit-frame-pointer" ASAN_OPTIONS=detect_odr_violation=0 LSAN_OPTIONS=detect_leaks=0
|
2015-11-27 22:48:47 +00:00
|
|
|
cache:
|
|
|
|
- ccache
|
2015-08-28 14:03:13 +00:00
|
|
|
|
2018-06-22 11:18:30 +00:00
|
|
|
before_install:
|
2018-09-12 10:24:19 +00:00
|
|
|
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then docker pull radareorg/r2-travis:latest || docker build -t radareorg/r2-travis:latest -f Dockerfile.travis . ; else rm -rf .nvm && git clone https://github.com/creationix/nvm.git .nvm && (cd .nvm && git checkout `git describe --abbrev=0 --tags`) && . .nvm/nvm.sh && nvm install 8.11.3; fi
|
2017-03-21 18:17:58 +00:00
|
|
|
|
2014-06-13 00:45:31 +00:00
|
|
|
script:
|
2018-02-27 21:26:54 +00:00
|
|
|
- export PR_NAME=$(echo $TRAVIS_PULL_REQUEST_SLUG | cut -d'/' -f1)
|
|
|
|
- export DEFAULT_NAME=$(echo $TRAVIS_REPO_SLUG | cut -d'/' -f1)
|
|
|
|
- export R2R_DEFAULT_REPO=$(doc/repo PR_REGRESSIONS | sed "s/__USER__/${DEFAULT_NAME}/g")
|
|
|
|
- export R2R_DEFAULT_BRANCH=master
|
|
|
|
- export USER_NAME=$([ -n "${PR_NAME}" ] && echo "${PR_NAME}" || echo "${DEFAULT_NAME}")
|
|
|
|
- export R2R_BRANCH=$([ -n "${TRAVIS_PULL_REQUEST_BRANCH}" ] && echo "${TRAVIS_PULL_REQUEST_BRANCH}" || echo "${R2R_DEFAULT_BRANCH}")
|
2018-05-16 09:12:18 +00:00
|
|
|
- if [ "${R2R_BRANCH}" = master ]; then USER_NAME=radare; fi
|
2018-05-16 08:17:21 +00:00
|
|
|
- export R2R_REPO=$(doc/repo PR_REGRESSIONS | sed "s/__USER__/${USER_NAME}/g")
|
2018-09-12 10:24:19 +00:00
|
|
|
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then bash ./travis-extract-var.sh > ${TRAVIS_BUILD_DIR}/docker-env.sh ; cat ${TRAVIS_BUILD_DIR}/docker-env.sh ; fi
|
|
|
|
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then docker run -v /home/travis/.ccache:/root/.ccache -v ${TRAVIS_BUILD_DIR}:${TRAVIS_BUILD_DIR} --entrypoint "/bin/bash" radareorg/r2-travis:latest -c ". /src/.nvm/nvm.sh; cd ${TRAVIS_BUILD_DIR}; . docker-env.sh; bash travis-script"; else bash travis-script; fi
|
2015-08-28 14:01:33 +00:00
|
|
|
|
2015-04-07 10:57:10 +00:00
|
|
|
notifications:
|
|
|
|
irc: "chat.freenode.net#radare"
|
2015-10-12 17:10:25 +00:00
|
|
|
on_success: never
|
2015-10-10 19:10:37 +00:00
|
|
|
on_failure: always
|