Enable Travis CI for ARM, PPC, SYSZ (#121)
This commit is contained in:
parent
f4181a8c87
commit
324ad1cf25
5 changed files with 94 additions and 163 deletions
|
|
@ -1,123 +0,0 @@
|
|||
# travis.yml for testing rizin.
|
||||
# Initially written in 2014-2016
|
||||
# by jn__. Updated 2018 by damo22
|
||||
# xvilka, pancake, ret2libc in 2020
|
||||
|
||||
language: generic
|
||||
dist: trusty
|
||||
conditions: v1
|
||||
|
||||
branches:
|
||||
only:
|
||||
- dev
|
||||
- /^release-.*$/
|
||||
- /^prerelease-.*$/
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
os: osx
|
||||
jobs:
|
||||
fast_finish: true
|
||||
include:
|
||||
- os: osx
|
||||
name: macOS
|
||||
env: INSTALL_SYSTEM=meson COMPILER_NAME=clang CXX=clang++ CC=clang
|
||||
# # emscripten
|
||||
# - if: (branch = dev AND type = push) OR head_branch =~ ^wasm-*
|
||||
# os: linux
|
||||
# name: WASM
|
||||
# env: EMSCRIPTEN=1
|
||||
# # Linux with GCC on PowerPC
|
||||
# - if: (branch = dev 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"
|
||||
# # Linux with GCC on System Z
|
||||
# - if: (branch = dev 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"
|
||||
# # Linux with GCC on ARMv8 (64bit)
|
||||
# - if: (branch = dev 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"
|
||||
# # 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"
|
||||
# # 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"
|
||||
# # Linux with GCC on ARMv8 (64bit)
|
||||
# - os: linux
|
||||
# arch: arm64
|
||||
# env: NODOCKER=1 COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DR2_ASSERT_STDOUT=1"
|
||||
# - 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
|
||||
|
||||
before_install:
|
||||
- echo -e "machine github.com\n login $CI_USER_TOKEN" > ~/.netrc
|
||||
- |
|
||||
if [ "${FUZZIT}" == "1" ]; then
|
||||
docker pull gcr.io/fuzzit-public/builders:llvm9.v1
|
||||
elif [ "$TRAVIS_OS_NAME" != "osx" ] && [ "$NODOCKER" != "1" ]; then
|
||||
docker pull rizinorg/r2-travis:latest || docker build -t rizinorg/r2-travis:latest -f 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" rizinorg/r2-travis:latest -c "cd ${TRAVIS_BUILD_DIR}; . docker-env.sh; bash travis-script"
|
||||
else
|
||||
$SHELL travis-script
|
||||
fi
|
||||
89
.travis.yml
Normal file
89
.travis.yml
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
language: generic
|
||||
conditions: v1
|
||||
|
||||
branches:
|
||||
only:
|
||||
- stable
|
||||
- dev
|
||||
- /^release-.*$/
|
||||
- /^prerelease-.*$/
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
jobs:
|
||||
fast_finish: true
|
||||
include:
|
||||
# emscripten
|
||||
# os: linux
|
||||
# - name: WASM
|
||||
# env: EMSCRIPTEN=1
|
||||
# Linux with GCC on PowerPC
|
||||
- os: linux
|
||||
name: PPC64
|
||||
arch: ppc64le
|
||||
dist: focal
|
||||
env: COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DRZ_ASSERT_STDOUT=1" RZ_ARM64_AS=aarch64-linux-gnu-as RZ_ARM32_AS=arm-linux-gnueabi-as RZ_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
|
||||
name: S390X
|
||||
arch: s390x
|
||||
dist: focal
|
||||
env: COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DRZ_ASSERT_STDOUT=1" RZ_X86_AS=x86_64-w64-mingw32-as
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- binutils-mingw-w64-x86-64
|
||||
# Linux with GCC on ARMv8 (64bit)
|
||||
- os: linux
|
||||
name: ARM64
|
||||
arch: arm64
|
||||
dist: focal
|
||||
env: COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DRZ_ASSERT_STDOUT=1" RZ_ARM32_AS=arm-linux-gnueabi-as RZ_X86_AS=x86_64-linux-gnu-as RZ_PPC_AS=powerpc64le-linux-gnu-as
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- binutils-arm-linux-gnueabi
|
||||
- binutils-x86-64-linux-gnu
|
||||
- binutils-powerpc64le-linux-gnu
|
||||
|
||||
allow_failures:
|
||||
# Emscripten
|
||||
#- os: linux
|
||||
# name: WASM
|
||||
# env: EMSCRIPTEN=1
|
||||
# Linux with GCC on PowerPC
|
||||
- os: linux
|
||||
arch: ppc64le
|
||||
env: COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DRZ_ASSERT_STDOUT=1" RZ_ARM64_AS=aarch64-linux-gnu-as RZ_ARM32_AS=arm-linux-gnueabi-as RZ_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: COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DRZ_ASSERT_STDOUT=1" RZ_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="-DRZ_ASSERT_STDOUT=1"
|
||||
|
||||
cache:
|
||||
- ccache
|
||||
|
||||
script:
|
||||
- export PR_NAME=$(echo $TRAVIS_PULL_REQUEST_SLUG | cut -d'/' -f1)
|
||||
- |
|
||||
pip3 install 'git+https://github.com/rizinorg/rz-pipe#egg=rzpipe&subdirectory=python'
|
||||
$SHELL travis-script
|
||||
|
|
@ -24,7 +24,7 @@ RZ_API char *rz_bin_demangle_rust (RzBinFile *binfile, const char *sym, ut64 vad
|
|||
char *str, *out, *in;
|
||||
|
||||
str = rz_bin_demangle_cxx (binfile, sym, vaddr);
|
||||
|
||||
|
||||
if (!str) {
|
||||
return str;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ EXPECT=<<EOF
|
|||
EOF
|
||||
RUN
|
||||
|
||||
NAME=anal
|
||||
NAME=analysis
|
||||
FILE=-
|
||||
CMDS=<<EOF
|
||||
e cfg.newshell=1
|
||||
|
|
|
|||
|
|
@ -60,29 +60,6 @@ if [ "${INSTALL_SYSTEM}" == "meson" ] ; then
|
|||
ninja install || exit 1
|
||||
popd
|
||||
export PKG_CONFIG_PATH=$(pwd)/build/meson-private:${PKG_CONFIG_PATH}
|
||||
elif [ "${INSTALL_SYSTEM}" == "static" ]; then
|
||||
echo "Compiling static with sys/static.sh"
|
||||
./sys/static.sh || exit 1
|
||||
echo "Compiling Fuzzing Target"
|
||||
export RIZIN_STATIC_BUILD=$(pwd)/r2-static
|
||||
cd test
|
||||
make fuzz/targets
|
||||
cd fuzz/targets
|
||||
git remote -v
|
||||
git branch
|
||||
git rev-parse HEAD
|
||||
# workaround for now
|
||||
export LIB_FUZZING_ENGINE=" "
|
||||
VERBOSE=1 make -j2 || exit 1
|
||||
# This is a test key (change to production environment key later)
|
||||
export FUZZIT_KEY=055d9d3ba41a36fe7e33fee3bf411b2102703c60e16b1756a7222ab529f16dbf8c687a35313f0b1666d8687e891e5c83
|
||||
export ORG_ID=2zv5qI33roZkRm0oO2Mi
|
||||
export TARGET_ID=YVkkS6RPVpKhSixyFWcT
|
||||
wget -O fuzzit https://bin.fuzzit.dev/fuzzit-1.0
|
||||
chmod a+x fuzzit
|
||||
./fuzzit auth $FUZZIT_KEY $ORG_ID
|
||||
echo "Creating fuzzing sanity job on fuzzit.dev:"
|
||||
./fuzzit create job --type sanity --args "-fork=1 -close_fd_mask=3" --revision $TRAVIS_COMMIT --branch $TRAVIS_BRANCH $TARGET_ID ia_fuzz || exit 1
|
||||
else
|
||||
echo "Installing with acr + make"
|
||||
if [ "${RZ_PLUGINS_FILE}" != "" ] ; then
|
||||
|
|
@ -93,21 +70,9 @@ else
|
|||
export LDFLAGS="${LDFLAGS} -O0 -ggdb -fsanitize=address -fno-omit-frame-pointer"
|
||||
fi
|
||||
export PKG_CONFIG_PATH=${TRAVIS_BUILD_DIR}/pkgcfg:${PKG_CONFIG_PATH}
|
||||
if [ "${DEBPKG}" == "1" ] ; then
|
||||
git clean -xdf
|
||||
sys/debian.sh
|
||||
# TODO: upload debian package somewhere
|
||||
exit 0
|
||||
else
|
||||
if [ "`uname`" = Darwin ]; then
|
||||
cp sys/osx-pkg/*.pkg /tmp
|
||||
sys/osx-pkg.sh
|
||||
git clean -xdf
|
||||
fi
|
||||
./configure --prefix=${TRAVIS_BUILD_DIR}/install > /dev/null || exit 1
|
||||
make -s -j2 > /dev/null || exit 1
|
||||
make install > /dev/null || exit 1
|
||||
fi
|
||||
./configure --prefix=${TRAVIS_BUILD_DIR}/install > /dev/null || exit 1
|
||||
make -s -j2 > /dev/null || exit 1
|
||||
make install > /dev/null || exit 1
|
||||
fi
|
||||
|
||||
if [ "${RZ_TESTS_DISABLE}" != "1" ] ; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue