1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

Update Travis.

This commit is contained in:
Markus F.X.J. Oberhumer 2016-09-26 00:01:41 +02:00
parent e6da9e8d1a
commit bd54499537
5 changed files with 64 additions and 28 deletions

View File

@ -5,7 +5,7 @@ set -e; set -o pipefail
# Support for Travis CI -- https://travis-ci.org/upx/upx/builds
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
source "$TRAVIS_BUILD_DIR/.ci/travis_init.sh" || exit 1
source "$TRAVIS_BUILD_DIR/.github/travis_init.sh" || exit 1
echo "BUILD_METHOD='$BUILD_METHOD'"
echo "BUILD_DIR='$BUILD_DIR'"
@ -70,21 +70,29 @@ cd /; cd "$BUILD_DIR" || exit 1
make="make -f $TRAVIS_BUILD_DIR/src/Makefile"
export EXTRA_CPPFLAGS="-DUCL_NO_ASM"
case $BUILD_METHOD in
debug | debug+*) make="$make USE_DEBUG=1" ;;
debug | debug+* | *+debug | *+debug+*)
make="$make USE_DEBUG=1" ;;
esac
case $BUILD_METHOD in
*sanitize)
make="$make USE_SANITIZE=1"
sanitize | sanitize+* | *+sanitize | *+sanitize+*)
case $TRAVIS_OS_NAME-$CC in linux-gcc*) export EXTRA_LDFLAGS="-fuse-ld=gold" ;; esac
;;
*scan-build) make="$SCAN_BUILD $make" ;;
*valgrind) export EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS -DWITH_VALGRIND" ;;
make="$make USE_SANITIZE=1" ;;
esac
case $BUILD_METHOD in
scan-build | scan-build+* | *+scan-build | *+scan-build+*)
make="$SCAN_BUILD $make" ;;
esac
case $BUILD_METHOD in
valgrind | valgrind+* | *+valgrind | *+valgrind+*)
export EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS -DWITH_VALGRIND" ;;
esac
if test "$ALLOW_FAIL" = "1"; then
echo "ALLOW_FAIL=$ALLOW_FAIL"
set +e
fi
$make
ls -l upx.out
size upx.out
file upx.out

View File

@ -6,7 +6,8 @@
umask 022
cd /; cd "$TRAVIS_BUILD_DIR" || exit 1
BUILD_DIR="$TRAVIS_BUILD_DIR/build"
if test "X$C" = "X"; then C=gcc; fi
BUILD_DIR="$TRAVIS_BUILD_DIR/build/$C"
mkdir -p "$BUILD_DIR"
if test "X$B" = "X"; then B=release; fi
@ -14,23 +15,26 @@ BUILD_METHOD="$B"
CC=false CXX=false SCAN_BUILD=false
case $C in
clang | clang-m?? | clang-3.4-m?? | clang-[78][0-9][0-9]-m??)
clang | clang-m?? | clang-3.4-m?? | clang-[678][0-9][0-9]-m??)
# standard system compiler
CC="clang -std=gnu90"; CXX="clang++" ;;
clang-3.[0-9]-m??)
v=${C:6:3}; CC="clang-$v -std=gnu90"; CXX="clang++-$v"; SCAN_BUILD="scan-build-$v" ;;
CC="clang"; CXX="clang++" ;;
clang-[34].[0-9]-m??)
v=${C:6:3}; CC="clang-$v"; CXX="clang++-$v"; SCAN_BUILD="scan-build-$v" ;;
gcc | gcc-m?? | gcc-4.6-m??)
# standard system compiler
CC="gcc -std=gnu90"; CXX="g++" ;;
gcc-4.[0-9]-m??)
CC="gcc"; CXX="g++" ;;
gcc-[34].[0-9]-m??)
v=${C:4:3}; CC="gcc-$v"; CXX="g++-$v" ;;
gcc-[56]-m?? | gcc-[56].[0-9]-m??)
v=${C:4:1}; CC="gcc-$v -std=gnu90"; CXX="g++-$v" ;;
v=${C:4:1}; CC="gcc-$v"; CXX="g++-$v" ;;
esac
case $C in
*-m32) CC="$CC -m32"; CXX="$CXX -m32" ;;
*-m64) CC="$CC -m64"; CXX="$CXX -m64" ;;
esac
case $C in
clang* | gcc*) CC="$CC -std=gnu89" ;;
esac
export CC CXX
export UPX_UCLDIR="$TRAVIS_BUILD_DIR/deps/ucl-1.03"

View File

@ -5,7 +5,7 @@ set -e; set -o pipefail
# Support for Travis CI -- https://travis-ci.org/upx/upx/builds
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
source "$TRAVIS_BUILD_DIR/.ci/travis_init.sh" || exit 1
source "$TRAVIS_BUILD_DIR/.github/travis_init.sh" || exit 1
set -x
@ -29,7 +29,8 @@ if test "$TRAVIS_OS_NAME" = "osx"; then
fi
upx="$PWD/upx.out"
case $BUILD_METHOD in
*valgrind) upx="valgrind $upx" ;;
valgrind | valgrind+* | *+valgrind | *+valgrind+*)
upx="valgrind --leak-check=full --show-reachable=yes $upx" ;;
esac
upx_391=false
if test "$TRAVIS_OS_NAME" = "linux"; then
@ -38,9 +39,10 @@ if test "$TRAVIS_OS_NAME" = "linux"; then
fi
$upx --help
cd /; cd "$TRAVIS_BUILD_DIR/deps/upx-testsuite/files" || exit 1
ls -l packed/*/upx-3.91*
$upx -l packed/*/upx-3.91*
ls -l packed/*/upx-3.91*
$upx -l packed/*/upx-3.91*
$upx --file-info packed/*/upx-3.91*
$upx -t packed/*/upx-3.91*
for f in packed/*/upx-3.91*; do
echo "===== $f"
if test "$TRAVIS_OS_NAME" = "linux"; then

View File

@ -22,7 +22,7 @@ addons:
env:
global:
- C= B=
- C= B= ALLOW_FAIL=
matrix:
- TRAVIS_EMPTY_JOB_WORKAROUND=true
@ -73,6 +73,10 @@ matrix:
compiler: gcc
env: C=gcc-6-m64 B=debug+sanitize
addons: { apt: { sources: *S, packages: [ "g++-6" ] } }
- os: linux
compiler: gcc
env: C=gcc-6-m64 B=sanitize
addons: { apt: { sources: *S, packages: [ "g++-6" ] } }
- os: linux
compiler: gcc
env: C=gcc-6-m64 B=valgrind
@ -116,10 +120,30 @@ matrix:
compiler: clang
env: C=clang-3.8-m64
addons: { apt: { sources: *S, packages: [ "clang-3.8" ] } }
- os: linux
compiler: clang
env: C=clang-3.8-m64 B=debug+sanitize
addons: { apt: { sources: *S, packages: [ "clang-3.8" ] } }
- os: linux
compiler: clang
env: C=clang-3.8-m64 B=sanitize
addons: { apt: { sources: *S, packages: [ "clang-3.8" ] } }
- os: linux
compiler: clang
env: C=clang-3.8-m64 B=debug+scan-build
addons: { apt: { sources: *S, packages: [ "clang-3.8" ] } }
- os: linux
compiler: clang
env: C=clang-3.8-m64 B=scan-build
addons: { apt: { sources: *S, packages: [ "clang-3.8" ] } }
- os: osx
compiler: clang
# must use debug or else we get "ld: internal error: atom not found" when linking
env: C=clang-600-m32 B=debug
- os: osx
compiler: clang
# must use debug or else we get "ld: internal error: atom not found" when linking
env: C=clang-600-m64 B=debug
- os: osx
compiler: clang
env: C=clang-703-m32
@ -136,9 +160,6 @@ matrix:
compiler: clang
env: C=clang-800-m64
osx_image: xcode8
allow_failures:
- os: linux
env: C=gcc-6-m64 B=debug+sanitize
install:
- umask 022; DEPS_DIR="$TRAVIS_BUILD_DIR/deps"; mkdir -p "$DEPS_DIR" && cd "$DEPS_DIR"
@ -146,7 +167,7 @@ install:
- travis_retry git clone https://github.com/upx/upx-testsuite
script:
- bash $TRAVIS_BUILD_DIR/.ci/travis_build.sh
- bash $TRAVIS_BUILD_DIR/.ci/travis_testsuite.sh
- bash $TRAVIS_BUILD_DIR/.github/travis_build.sh
- bash $TRAVIS_BUILD_DIR/.github/travis_testsuite.sh
# vim:set ts=2 sw=2 et:

View File

@ -10,8 +10,9 @@ machine:
environment:
TRAVIS_BUILD_DIR: $HOME/upx
TRAVIS_OS_NAME: linux
C: gcc-m64
C: gcc-4.8-m64
B: release
ALLOW_FAIL:
checkout:
post:
@ -23,10 +24,10 @@ dependencies:
- cd $TRAVIS_BUILD_DIR/deps && wget --no-check-certificate -q -O - https://download.freenas.org/distfiles/ucl-1.03.tar.gz | tar -xz
- cd $TRAVIS_BUILD_DIR/deps && git clone https://github.com/upx/upx-testsuite
override:
- bash $TRAVIS_BUILD_DIR/.ci/travis_build.sh
- bash $TRAVIS_BUILD_DIR/.github/travis_build.sh
test:
override:
- bash $TRAVIS_BUILD_DIR/.ci/travis_testsuite.sh
- bash $TRAVIS_BUILD_DIR/.github/travis_testsuite.sh
# vim:set ts=2 sw=2 et: