radare2/.travis.yml
Riccardo Schirone afae8b6e34
Prerelease travis release (#13189)
* Add additional tests for release/prereleases
* Test different plugins configurations
* Add some libraries to docker image
* Disable SYS_CAPSTONE for now because there is only 3.0.5
* Fix html magic file to respect libmagic's format too

< can be used with string so it should be escaped if we want to match
the exact string "<html>"

* Use plugin License when printing rasm2 plugins in JSON format
* Build with system capstone, but do not run tests because they would fail
* Fix tiny plugins file to use xtr_fatmach0 instead of just fatmach0
* Use clang to compile with ASAN
* Use b_lundef=false
* Just test if different plugins configuration build, no r2r
* Use sys openssl as well
2019-02-28 16:58:09 +01:00

90 lines
4.3 KiB
YAML

# travis.yml for testing radare2. Initially written in 2014-2016, by jn__. Updated 2018 by damo22
language: generic
dist: trusty
conditions: v1
sudo: required
branches:
only:
- master
services:
- docker
os: osx
matrix:
fast_finish: true
include:
# Linux with GCC
- os: linux
env: COMPILER_NAME=gcc CXX=g++ CC=gcc
# Linux with clang
- os: linux
env: COMPILER_NAME=clang CXX=clang++ CC=clang
# Linux with meson and coverage
- os: linux
env: COMPILER_NAME=gcc CXX=g++ CC=gcc INSTALL_SYSTEM=meson COVERAGE=1
# OS X with clang
- os: osx
env: COMPILER_NAME=clang CXX=clang++ CC=clang
# ASAN as a best effort on every push
- if: not head_branch =~ ^release-* AND not head_branch =~ ^prerelease-* AND (head_branch =~ ^asan-* OR type = push)
os: linux
env: COMPILER_NAME=clang CXX=clang++ CC=clang CFLAGS="-DR2_ASSERT_STDOUT=1" ASAN=1 ASAN_OPTIONS=detect_odr_violation=0 LSAN_OPTIONS=detect_leaks=0
# release-only: meson build with system libraries
- if: head_branch =~ ^release-* OR head_branch =~ ^prerelease-*
os: linux
env: COMPILER_NAME=gcc CXX=g++ CC=gcc INSTALL_SYSTEM=meson R2_SYS_MAGIC=true R2_SYS_ZIP=true R2_SYS_LZ4=true R2_SYS_ZLIB=true R2_SYS_OPENSSL=true
# release-only: meson build with ASAN and R2_ASSERT_STDOUT
- if: head_branch =~ ^release-* OR head_branch =~ ^prerelease-*
os: linux
env: COMPILER_NAME=clang CXX=clang++ CC=clang CFLAGS="-DR2_ASSERT_STDOUT=1" ASAN=1 ASAN_OPTIONS=detect_odr_violation=0 LSAN_OPTIONS=detect_leaks=0 RELEASE=1
# release-only: nogpl plugins file, just test if it builds
- if: head_branch =~ ^release-* OR head_branch =~ ^prerelease-*
os: linux
env: COMPILER_NAME=gcc CXX=g++ CC=gcc R2_PLUGINS_FILE=nogpl R2_TESTS_DISABLE=1
# release-only: static plugins file, just test if it builds
- if: head_branch =~ ^release-* OR head_branch =~ ^prerelease-*
os: linux
env: COMPILER_NAME=gcc CXX=g++ CC=gcc R2_PLUGINS_FILE=static R2_TESTS_DISABLE=1
# release-only: tiny plugins file, just test if it builds
- if: head_branch =~ ^release-* OR head_branch =~ ^prerelease-*
os: linux
env: COMPILER_NAME=gcc CXX=g++ CC=gcc R2_PLUGINS_FILE=tiny R2_TESTS_DISABLE=1
# release-only: system capstone (capstone3), just test if it builds
- if: head_branch =~ ^release-* OR head_branch =~ ^prerelease-*
os: linux
env: COMPILER_NAME=gcc CXX=g++ CC=gcc INSTALL_SYSTEM=meson R2_SYS_CAPSTONE=true R2_TESTS_DISABLE=1
allow_failures:
- os: linux
env: COMPILER_NAME=clang CXX=clang++ CC=clang CFLAGS="-DR2_ASSERT_STDOUT=1" ASAN=1 ASAN_OPTIONS=detect_odr_violation=0 LSAN_OPTIONS=detect_leaks=0
cache:
- ccache
addons:
homebrew:
packages:
- libuv
- cabextract
before_install:
- 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 -q 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
script:
- 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}")
- if [ "${R2R_BRANCH}" = master ]; then USER_NAME=radare; fi
- export R2R_REPO=$(doc/repo PR_REGRESSIONS | sed "s/__USER__/${USER_NAME}/g")
- 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
notifications:
irc: "chat.freenode.net#radare"
on_success: never
on_failure: always