mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-02 02:06:46 +00:00
149 lines
5.9 KiB
YAML
149 lines
5.9 KiB
YAML
# travis.yml for testing radare2.
|
|
# Initially written in 2014-2016
|
|
# by jn__. Updated 2018 by damo22
|
|
# xvilka, pancake, ret2libc in 2020
|
|
|
|
language: generic
|
|
dist: trusty
|
|
conditions: v1
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
- /^release-.*$/
|
|
- /^prerelease-.*$/
|
|
|
|
services:
|
|
- docker
|
|
|
|
os: osx
|
|
jobs:
|
|
fast_finish: true
|
|
include:
|
|
# emscripten
|
|
#- if: (branch = master AND type = push) OR head_branch =~ ^wasm-*
|
|
# os: linux
|
|
# name: WASM
|
|
# env: EMSCRIPTEN=1
|
|
# Linux with GCC on PowerPC
|
|
- if: (branch = master AND type = push) OR head_branch =~ ^ppc64-*
|
|
os: linux
|
|
name: PPC64
|
|
arch: ppc64le
|
|
dist: bionic
|
|
env: NODOCKER=1 COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DR2_ASSERT_STDOUT=1" R2_ARM64_AS=aarch64-linux-gnu-as R2_ARM32_AS=arm-linux-gnueabi-as R2_X86_AS=x86_64-linux-gnu-as
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- binutils-aarch64-linux-gnu
|
|
- binutils-arm-linux-gnueabi
|
|
- binutils-x86-64-linux-gnu
|
|
# Linux with GCC on System Z
|
|
- if: (branch = master AND type = push) OR head_branch =~ ^s390x-*
|
|
os: linux
|
|
name: S390X
|
|
arch: s390x
|
|
dist: bionic
|
|
env: NODOCKER=1 COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DR2_ASSERT_STDOUT=1" R2_X86_AS=x86_64-w64-mingw32-as
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- binutils-mingw-w64-x86-64
|
|
# Linux with GCC on ARMv8 (64bit)
|
|
- if: (branch = master AND type = push) OR head_branch =~ ^arm64-*
|
|
os: linux
|
|
name: ARM64
|
|
arch: arm64
|
|
dist: bionic
|
|
env: NODOCKER=1 COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DR2_ASSERT_STDOUT=1" R2_ARM32_AS=arm-linux-gnueabi-as R2_X86_AS=x86_64-linux-gnu-as R2_PPC_AS=powerpc64le-linux-gnu-as
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- binutils-arm-linux-gnueabi
|
|
- binutils-x86-64-linux-gnu
|
|
- binutils-powerpc64le-linux-gnu
|
|
# Run Fuzzing Sanity Test on every push
|
|
# XXX its broken it complains about invalid key
|
|
#- os: linux
|
|
# env: COMPILER_NAME=clang CXX=clang++ CC=clang R2_TESTS_DISABLE=1 FUZZIT=0 INSTALL_SYSTEM=static CXXFLAGS="-fsanitize=fuzzer"
|
|
# TODO: move this as new GitHub workflows
|
|
# release-only: meson build with system libraries
|
|
- if: head_branch =~ ^release-* OR head_branch =~ ^prerelease-* OR branch =~ ^release-* OR 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: nogpl plugins file, just test if it builds
|
|
- if: head_branch =~ ^release-* OR head_branch =~ ^prerelease-* OR branch =~ ^release-* OR 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-* OR branch =~ ^release-* OR 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-* OR branch =~ ^release-* OR 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-* OR branch =~ ^release-* OR 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:
|
|
# Emscripten
|
|
#- os: linux
|
|
# name: WASM
|
|
# env: EMSCRIPTEN=1
|
|
# Linux with GCC on PowerPC
|
|
- os: linux
|
|
arch: ppc64le
|
|
env: NODOCKER=1 COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DR2_ASSERT_STDOUT=1" R2_ARM64_AS=aarch64-linux-gnu-as R2_ARM32_AS=arm-linux-gnueabi-as R2_X86_AS=x86_64-linux-gnu-as
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- binutils-aarch64-linux-gnu
|
|
- binutils-arm-linux-gnueabi
|
|
- binutils-x86-64-linux-gnu
|
|
# Linux with GCC on System Z
|
|
- os: linux
|
|
arch: s390x
|
|
env: NODOCKER=1 COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DR2_ASSERT_STDOUT=1" R2_X86_AS=x86_64-w64-mingw32-as
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- binutils-mingw-w64-x86-64
|
|
- os: linux
|
|
env: COMPILER_NAME=clang CXX=clang++ CC=clang ASAN=1 ASAN_OPTIONS=detect_odr_violation=0 LSAN_OPTIONS=detect_leaks=0 CFLAGS="-DR2_ASSERT_STDOUT=1"
|
|
|
|
cache:
|
|
- ccache
|
|
|
|
addons:
|
|
homebrew:
|
|
packages:
|
|
- libuv
|
|
- cabextract
|
|
|
|
before_install:
|
|
- |
|
|
if [ "${FUZZIT}" == "1" ]; then
|
|
docker pull gcr.io/fuzzit-public/builders:llvm9.v1
|
|
elif [ "$TRAVIS_OS_NAME" != "osx" ] && [ "$NODOCKER" != "1" ]; then
|
|
docker pull radareorg/r2-travis:latest || docker build -t radareorg/r2-travis:latest -f dist/docker/Dockerfile.travis .
|
|
fi
|
|
|
|
script:
|
|
- export PR_NAME=$(echo $TRAVIS_PULL_REQUEST_SLUG | cut -d'/' -f1)
|
|
- |
|
|
if [ "$TRAVIS_OS_NAME" != "osx" ] && [ "$NODOCKER" != "1" ]; then
|
|
$SHELL ./travis-extract-var.sh | tee ${TRAVIS_BUILD_DIR}/docker-env.sh
|
|
fi
|
|
- |
|
|
if [ "${FUZZIT}" == "1" ] ; then
|
|
docker run -v /home/travis/.ccache:/root/.ccache -v "${TRAVIS_BUILD_DIR}":"${TRAVIS_BUILD_DIR}" --entrypoint "/bin/bash" gcr.io/fuzzit-public/builders:llvm9.v1 -c "cd ${TRAVIS_BUILD_DIR}; . docker-env.sh; bash travis-script"
|
|
elif [ "$TRAVIS_OS_NAME" != "osx" ] && [ "$NODOCKER" != "1" ] ; then
|
|
docker run -v /home/travis/.ccache:/root/.ccache -v "${TRAVIS_BUILD_DIR}":"${TRAVIS_BUILD_DIR}" --entrypoint "/bin/bash" radareorg/r2-travis:latest -c "cd ${TRAVIS_BUILD_DIR}; . docker-env.sh; bash travis-script"
|
|
else
|
|
pip3 install 'git+https://github.com/radareorg/radare2-r2pipe#egg=r2pipe&subdirectory=python'
|
|
$SHELL travis-script
|
|
fi
|