Move macOS to Travis (#7)
This commit is contained in:
parent
dcbc330bec
commit
03c0eb80de
8 changed files with 148 additions and 140 deletions
18
.github/workflows/ci.yml
vendored
18
.github/workflows/ci.yml
vendored
|
|
@ -27,7 +27,7 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
# name: [linux-acr-gcc-tests, linux-acr-clang-build, linux-acr-clang-tests, linux-meson-gcc-build, linux-meson-gcc-tests, linux-meson-gcc-newshell-tests, macos-meson-clang-tests, linux-gcc-tests-asan, capstone-v3, capstone-v5]
|
||||
name: [linux-acr-gcc-tests, linux-meson-gcc-newshell-tests, macos-meson-clang-tests]
|
||||
name: [linux-acr-gcc-tests, linux-meson-gcc-newshell-tests]
|
||||
# ignore_error: [false]
|
||||
include:
|
||||
- name: linux-acr-gcc-tests
|
||||
|
|
@ -74,14 +74,14 @@ jobs:
|
|||
coverage: true
|
||||
enabled: true
|
||||
timeout: 50
|
||||
- name: macos-meson-clang-tests
|
||||
os: macos-latest
|
||||
build_system: meson
|
||||
compiler: clang
|
||||
run_tests: true
|
||||
meson_options: -Duse_webui=true
|
||||
enabled: true
|
||||
timeout: 60
|
||||
# - name: macos-meson-clang-tests
|
||||
# os: macos-latest
|
||||
# build_system: meson
|
||||
# compiler: clang
|
||||
# run_tests: true
|
||||
# meson_options: -Duse_webui=true
|
||||
# enabled: true
|
||||
# timeout: 60
|
||||
# - name: linux-gcc-tests-asan
|
||||
# os: ubuntu-20.04
|
||||
# build_system: meson
|
||||
|
|
|
|||
|
|
@ -1,125 +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:
|
||||
# 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="-DRZ_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="-DRZ_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="-DRZ_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 RZ_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 RZ_SYS_MAGIC=true RZ_SYS_ZIP=true RZ_SYS_LZ4=true RZ_SYS_ZLIB=true RZ_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 RZ_PLUGINS_FILE=nogpl RZ_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 RZ_PLUGINS_FILE=static RZ_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 RZ_PLUGINS_FILE=tiny RZ_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 RZ_SYS_CAPSTONE=true RZ_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="-DRZ_ASSERT_STDOUT=1"
|
||||
# Linux with GCC on System Z
|
||||
- os: linux
|
||||
arch: s390x
|
||||
env: NODOCKER=1 COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DRZ_ASSERT_STDOUT=1"
|
||||
# Linux with GCC on ARMv8 (64bit)
|
||||
- os: linux
|
||||
arch: arm64
|
||||
env: NODOCKER=1 COMPILER_NAME=gcc CXX=g++ CC=gcc CFLAGS="-DRZ_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="-DRZ_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 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
|
||||
123
.travis.yml
Normal file
123
.travis.yml
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
# 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
|
||||
|
|
@ -720,6 +720,7 @@ static void print_log(RzTestState *state, ut64 prev_completed, ut64 prev_paths_c
|
|||
printf ("[**] %50s ", (const char *)rz_pvector_at (&state->completed_paths, prev_paths_completed));
|
||||
print_state_counts (state);
|
||||
printf ("\n");
|
||||
fflush (stdout);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,9 @@ endif
|
|||
rz_io_deps = [
|
||||
rz_util_dep,
|
||||
rz_socket_dep,
|
||||
rz_hash_dep,
|
||||
rz_crypto_dep,
|
||||
rz_cons_dep, # transitive from gdb_dep, but must be explicitly listed here or meson will break the rpath
|
||||
bochs_dep,
|
||||
gdb_dep,
|
||||
winkd_dep,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ bins:
|
|||
fuzz/targets:
|
||||
git clone --depth 1 https://github.com/rizinorg/rizin-fuzztargets fuzz/targets
|
||||
|
||||
RUNTEST=rz-test -L
|
||||
RUNTEST=rz-test ${RZ_TEST_ARGS} -L
|
||||
|
||||
rz-test-tests: bins
|
||||
${RUNTEST}
|
||||
|
|
|
|||
|
|
@ -30,9 +30,6 @@ EXPECT=<<EOF
|
|||
<title>rizin webui</title>
|
||||
<script type="text/javascript" src="m/vendors/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="m/r2.js"></script>
|
||||
EOF
|
||||
EXPECT_ERR=<<EOF
|
||||
|
||||
EOF
|
||||
RUN
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,12 @@ fi
|
|||
if [ "${INSTALL_SYSTEM}" == "meson" ] ; then
|
||||
echo "Installing with meson + ninja"
|
||||
|
||||
OPTS=""
|
||||
if [ "`uname`" = Darwin ]; then
|
||||
HOMEBREW_NO_AUTO_UPDATE=1 brew install meson libuv
|
||||
pip3 install --upgrade meson
|
||||
fi
|
||||
|
||||
OPTS="-Duse_webui=true"
|
||||
if [ "${RZ_SYS_CAPSTONE}" != "" ] ; then
|
||||
OPTS="${OPTS} -D use_sys_capstone=${RZ_SYS_CAPSTONE}"
|
||||
fi
|
||||
|
|
@ -108,7 +113,11 @@ fi
|
|||
if [ "${RZ_TESTS_DISABLE}" != "1" ] ; then
|
||||
export NOREPORT=1
|
||||
cd test
|
||||
VERBOSE=1 make -k all || exit 1
|
||||
|
||||
git clone http://github.com/rizinorg/rz-pipe
|
||||
pip3 install --user "file://$(pwd)/rz-pipe#egg=rzpipe&subdirectory=python"
|
||||
|
||||
VERBOSE=1 RZ_TEST_ARGS=-t1920 make -k all || exit 1
|
||||
|
||||
if [ "${COVERAGE}" == "1" ] ; then
|
||||
cd ../build
|
||||
|
|
|
|||
Loading…
Reference in a new issue