Coverage codecov (#11494)
* travis: just merge linux/meson build with coverage one * update travis.yml and extract-var * change a bit call to codecov.sh * switch to ubuntu:bionic * fix docker.travis * fix LD_LIBRARY_PATH * Dockerfile.travis: add pkg-config * Dockerfile.travis: install npm * dockerfile.travis: somehow pkg-config was removed * travis: switch back to latest * travis: do not hardcode machine * move COVERAGE=1 after INSTALL_SYSTEM
This commit is contained in:
parent
1ee0b58709
commit
08f8e48ca1
12
.travis.yml
12
.travis.yml
|
@ -17,15 +17,13 @@ matrix:
|
|||
- os: linux
|
||||
env: COMPILER_NAME=clang CXX=clang++ CC=clang
|
||||
- os: linux
|
||||
env: COMPILER_NAME=gcc CXX=g++ CC=gcc INSTALL_SYSTEM=meson
|
||||
env: COMPILER_NAME=gcc CXX=g++ CC=gcc INSTALL_SYSTEM=meson COVERAGE=1
|
||||
- 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
|
||||
- if: head_branch =~ ^asan-* OR tag =~ ^release-* OR type = push
|
||||
os: linux
|
||||
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
|
||||
- os: linux
|
||||
env: COMPILER_NAME=gcc CXX=g++ CC=gcc COVERAGE=1 INSTALL_SYSTEM=meson
|
||||
- os: osx
|
||||
env: COMPILER_NAME=clang CXX=clang++ CC=clang
|
||||
allow_failures:
|
||||
|
@ -33,13 +31,11 @@ matrix:
|
|||
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
|
||||
- os: linux
|
||||
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
|
||||
- os: linux
|
||||
env: COMPILER_NAME=gcc CXX=g++ CC=gcc COVERAGE=1 INSTALL_SYSTEM=meson
|
||||
cache:
|
||||
- ccache
|
||||
|
||||
before_install:
|
||||
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then docker pull radareorg/r2-travis || 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
|
||||
- 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
|
||||
|
||||
script:
|
||||
- export PR_NAME=$(echo $TRAVIS_PULL_REQUEST_SLUG | cut -d'/' -f1)
|
||||
|
@ -50,8 +46,8 @@ script:
|
|||
- 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 ; ci_env=`bash <(curl -s https://codecov.io/env)` ; echo "${ci_env}" ; fi
|
||||
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then docker run ${ci_env} -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
|
||||
- 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"
|
||||
|
|
|
@ -1,45 +1,33 @@
|
|||
FROM fedora:28
|
||||
FROM ubuntu:bionic
|
||||
|
||||
MAINTAINER tbd
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
RUN dnf install -y \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
glibc.i686 \
|
||||
clang \
|
||||
llvm \
|
||||
make \
|
||||
patch \
|
||||
findutils \
|
||||
which \
|
||||
bison \
|
||||
curl \
|
||||
git \
|
||||
binutils \
|
||||
cabextract \
|
||||
libasan \
|
||||
libcurl-devel \
|
||||
elfutils-libelf-devel \
|
||||
elfutils-libelf-devel-static \
|
||||
libdwarf-devel \
|
||||
libdwarf-static \
|
||||
jq \
|
||||
pkgconf-pkg-config \
|
||||
glib2 \
|
||||
glib2-devel \
|
||||
ncurses-devel \
|
||||
capstone-devel \
|
||||
libzip-devel \
|
||||
file-devel \
|
||||
lz4-devel \
|
||||
gnupg2 \
|
||||
python2-pip \
|
||||
meson \
|
||||
ninja-build \
|
||||
xz
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y \
|
||||
build-essential \
|
||||
gcc-multilib \
|
||||
llvm \
|
||||
clang \
|
||||
bison \
|
||||
git \
|
||||
curl \
|
||||
cabextract \
|
||||
libasan5 \
|
||||
jq \
|
||||
libncurses5 \
|
||||
libcapstone3 \
|
||||
libzip4 \
|
||||
liblz4-1 \
|
||||
gnupg2 \
|
||||
python-pip \
|
||||
python3-pip \
|
||||
pkg-config \
|
||||
liblzma5 \
|
||||
npm
|
||||
|
||||
RUN rm -rf /src/.nvm && git clone https://github.com/creationix/nvm.git /src/.nvm && (cd /src/.nvm && git checkout `git describe --abbrev=0 --tags`) && . /src/.nvm/nvm.sh && nvm install 8.11.3
|
||||
RUN pip3 install meson
|
||||
RUN pip3 install ninja
|
||||
|
||||
CMD []
|
||||
|
|
|
@ -10,7 +10,7 @@ print_var()
|
|||
}
|
||||
|
||||
env -0 | while IFS='=' read -r -d '' n v; do
|
||||
if [[ "${n}" =~ ^TRAVIS_* || "${n}" =~ ^R2* || "${n}" =~ SAN_* ]]; then
|
||||
if [[ "${n}" =~ ^TRAVIS* || "${n}" =~ ^R2* || "${n}" =~ SAN_* || "%{n}" =~ CODECOV_* || "%{n}" =~ VCS_* || "%{n}" =~ CI_* ]]; then
|
||||
print_var "${n}" "${v}"
|
||||
fi
|
||||
done
|
||||
|
@ -21,6 +21,9 @@ print_var CXX "${CXX}"
|
|||
print_var CFLAGS "${CFLAGS}"
|
||||
print_var LDFLAGS "${LDFLAGS}"
|
||||
print_var CXXFLAGS "${CXXFLAGS}"
|
||||
print_var TRAVIS "${TRAVIS}"
|
||||
print_var INSTALL_SYSTEM "${INSTALL_SYSTEM}"
|
||||
print_var MESON_OPTIONS "${MESON_OPTIONS}"
|
||||
print_var COVERAGE "${COVERAGE}"
|
||||
print_var SHIPPABLE "${SHIPPABLE}"
|
||||
print_var CI "${CI}"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
set -x
|
||||
|
||||
export PATH=${TRAVIS_BUILD_DIR}/install/bin:${PATH}
|
||||
export LD_LIBRARY_PATH=${TRAVIS_BUILD_DIR}/install/lib:${TRAVIS_BUILD_DIR}/install/lib64:${LD_LIBRARY_PATH}
|
||||
export LD_LIBRARY_PATH=${TRAVIS_BUILD_DIR}/install/lib/$(uname -m)-linux-gnu:${TRAVIS_BUILD_DIR}/install/lib:${TRAVIS_BUILD_DIR}/install/lib64:${LD_LIBRARY_PATH}
|
||||
git clone --depth 1 --branch "${R2R_BRANCH}" "${R2R_REPO}" || true # If cloning fails that's not an error: we simply fallback to master.
|
||||
ls radare2-regressions >/dev/null 2>&1 || git clone --depth 1 --branch "${R2R_DEFAULT_BRANCH}" "${R2R_DEFAULT_REPO}"
|
||||
|
||||
|
@ -54,5 +54,5 @@ if [ "${COVERAGE}" == "1" ] ; then
|
|||
cd ../build
|
||||
curl -s https://codecov.io/bash > ./codecov.sh
|
||||
chmod +x ./codecov.sh
|
||||
./codecov.sh -v 2>/dev/null
|
||||
./codecov.sh -K -v 2>/dev/null
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue