2016-09-27 18:30:54 +00:00
# Support for AppVeyor CI -- https://www.appveyor.com/
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
os : Visual Studio 2015
2018-08-29 11:36:26 +00:00
branches :
except :
- /^gitlab.*/
- /^travis.*/
2016-09-27 18:30:54 +00:00
environment :
2016-10-11 14:34:18 +00:00
global : { TRAVIS_OS_NAME: windows, CROSS : "" , C : "" , B: release, T : "" , X : "" }
2016-09-27 18:30:54 +00:00
matrix :
2016-09-28 11:34:39 +00:00
- { C: msvc-10.0-x86, CL_VERSION: 16.00, VS_VERSION : 2010 }
2016-09-28 11:07:39 +00:00
### - { C: msvc-10.0-x64, CL_VERSION: 16.00, VS_VERSION: 2010 } # AppVeyor: x64 compiler is not installed
2016-09-28 11:34:39 +00:00
- { C: msvc-11.0-x86, CL_VERSION: 17.00, VS_VERSION : 2012 }
2016-09-28 11:07:39 +00:00
### - { C: msvc-11.0-x64, CL_VERSION: 17.00, VS_VERSION: 2012 } # AppVeyor: x64 compiler is not installed
2016-09-28 07:54:48 +00:00
- { C: msvc-12.0-x86, CL_VERSION: 18.00, VS_VERSION : 2013 }
- { C: msvc-12.0-x64, CL_VERSION: 18.00, VS_VERSION : 2013 }
- { C: msvc-14.0-x86, CL_VERSION: 19.00, VS_VERSION : 2015 }
- { C: msvc-14.0-x64, CL_VERSION: 19.00, VS_VERSION : 2015 }
2020-01-08 14:46:57 +00:00
- { C: msvc-14.1-x86, CL_VERSION: 19.16, VS_VERSION: 2017, APPVEYOR_BUILD_WORKER_IMAGE : Visual Studio 2017 }
- { C: msvc-14.1-x64, CL_VERSION: 19.16, VS_VERSION: 2017, APPVEYOR_BUILD_WORKER_IMAGE : Visual Studio 2017 }
- { C: msvc-14.2-x86, CL_VERSION: 19.24, VS_VERSION: 2019, APPVEYOR_BUILD_WORKER_IMAGE : Visual Studio 2019 }
- { C: msvc-14.2-x64, CL_VERSION: 19.24, VS_VERSION: 2019, APPVEYOR_BUILD_WORKER_IMAGE : Visual Studio 2019 }
2017-01-15 05:19:04 +00:00
UPX_AUTOMATIC_BUILDS_SSL_KEY :
secure : PZMpVeqnEYe39kK+Zu2/fnmZ6/HG6Lvls0hh9GMVU9vCWsr8xaU7kIbHBS01puUkb4bEWPILKYvSEDuhOhguDjd/P4QdXWipvV/F2GaVax0=
UPX_AUTOMATIC_BUILDS_SSL_IV :
secure : ZshjJ/78dbY60mVJjZJv9Si7rHY9VQb1tfQvFd4lqvY=
2016-09-27 18:30:54 +00:00
init :
- git config --global core.autocrlf input
2017-05-27 10:30:02 +00:00
- where bash & where cat & where chmod & where cmp & where cp & where curl & where date & where file & where git & where gzip & where mkdir & where mv & where openssl & where readlink & where rm & where rmdir & where sed & where sha256sum & where sort & where ssh & where ssh-add & where ssh-agent & where ssh-keyscan & where tar & where touch
2016-10-02 13:46:57 +00:00
# - bash --version & git --version & sed --version & tar --version
- git --version & bash --version
2016-09-30 22:58:03 +00:00
# - dir "c:\Program Files\Git\usr\bin"
# - dir "c:\cygwin\bin"
# - dir "c:\mingw\bin"
# - dir "c:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin"
2016-09-27 18:30:54 +00:00
install :
- cd c:\projects
2016-09-28 23:55:52 +00:00
- md build build\%C% deps
2016-09-27 18:30:54 +00:00
- cd c:\projects\upx
- git submodule update --init --recursive
- cd c:\projects\deps
2016-09-30 22:58:03 +00:00
- curl -q -L --retry 5 -o ucl-1.03.tar.gz "https://github.com/upx/upx/releases/download/v3.00/ucl-1.03.tar.gz"
- curl -q -L --retry 5 -o zlib-1.2.8.tar.gz "https://github.com/upx/upx/releases/download/v3.00/zlib-1.2.8.tar.gz"
- git clone https://github.com/upx/upx-testsuite
2016-09-27 18:30:54 +00:00
- tar -xzf ucl-1.03.tar.gz
2016-09-30 22:58:03 +00:00
- tar -xzf zlib-1.2.8.tar.gz
2016-09-28 23:55:52 +00:00
# patch UCL for msvc-14.0 (vsnprintf issue)
- sed -i '/# *define.*snprintf *_v*snprintf$/d' ucl-1.03/acc/acc_auto.h
2016-09-30 22:58:03 +00:00
##- curl -q -L --retry 5 -o config.guess "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD"
##- curl -q -L --retry 5 -o config.sub "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD"
##- cp config.guess config.sub ucl-1.03/acconfig/
# setup compiler
2016-09-28 07:54:48 +00:00
- if "%C%"=="msvc-10.0-x86" ( call "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 )
- if "%C%"=="msvc-10.0-x64" ( call "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64 )
- if "%C%"=="msvc-11.0-x86" ( call "c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86 )
- if "%C%"=="msvc-11.0-x64" ( call "c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" amd64 )
- if "%C%"=="msvc-12.0-x86" ( call "c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86 )
- if "%C%"=="msvc-12.0-x64" ( call "c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64 )
- if "%C%"=="msvc-14.0-x86" ( call "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 )
- if "%C%"=="msvc-14.0-x64" ( call "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 )
2018-01-19 09:57:17 +00:00
- if "%C%"=="msvc-14.1-x86" ( call "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86 )
- if "%C%"=="msvc-14.1-x64" ( call "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 )
2020-01-08 14:46:57 +00:00
- if "%C%"=="msvc-14.2-x86" ( call "c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86 )
- if "%C%"=="msvc-14.2-x64" ( call "c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 )
2016-09-27 18:30:54 +00:00
build_script :
2016-09-28 19:45:58 +00:00
- cd c:\projects\upx
2016-09-30 22:58:03 +00:00
# setup directories following the VPATH build in travis_build.sh
- where cl & where link
2016-09-28 07:54:48 +00:00
- set BDIR=c:\projects\build\%C%\%B%
2016-09-28 23:55:52 +00:00
- md %BDIR% %BDIR%\ucl-1.03 %BDIR%\upx %BDIR%\upx-testsuite %BDIR%\zlib-1.2.8
- set DEFS=-D_CRT_SECURE_NO_WARNINGS
- git rev-parse --short=12 HEAD > %BDIR%\upx\.GITREV.txt
# build UCL
2016-09-28 07:54:48 +00:00
- cd %BDIR%\ucl-1.03
- set s=c:\projects\deps\ucl-1.03
- cl -MT -O2 -W4 %DEFS% -I%s%\include -I%s% -c %s%\src\*.c
2016-09-27 18:30:54 +00:00
- link -lib -out:ucl.lib *.obj
2016-09-28 23:55:52 +00:00
# build zlib
2016-09-28 07:54:48 +00:00
- cd %BDIR%\zlib-1.2.8
- cl -MT -O2 -W2 %DEFS% -c c:\projects\deps\zlib-1.2.8\*.c
2016-09-27 18:30:54 +00:00
- link -lib -out:zlib.lib *.obj
2016-09-28 23:55:52 +00:00
# build UPX
2016-09-28 07:54:48 +00:00
- cd %BDIR%\upx
- set s=c:\projects\upx\src
2016-09-28 23:55:52 +00:00
- cat .GITREV.txt
- set /p GITREV=<.GITREV.txt
2018-01-19 09:57:17 +00:00
- cl -MT -EHsc -J -O2 -W4 -WX -DUPX_VERSION_GITREV="""%GITREV%""" %DEFS% -DUCL_NO_ASM -I%s%\lzma-sdk -Ic:\projects\deps\ucl-1.03\include -Ic:\projects\deps\zlib-1.2.8 -Feupx.exe %s%\*.cpp %BDIR%\ucl-1.03\ucl.lib %BDIR%\zlib-1.2.8\zlib.lib
2016-09-28 19:45:58 +00:00
2016-09-27 18:30:54 +00:00
test_script :
2016-09-28 23:55:52 +00:00
- set UPX=--no-color --no-progress
2016-09-28 07:54:48 +00:00
- cd %BDIR%\upx
2016-09-28 23:55:52 +00:00
# basic tests
2016-09-27 18:30:54 +00:00
- .\upx.exe --version
- .\upx.exe upx.exe -o upx_packed.exe
- dir *.exe
2016-09-28 23:55:52 +00:00
- .\upx.exe -l upx_packed.exe
- .\upx.exe -t upx_packed.exe
2016-09-27 18:30:54 +00:00
- .\upx_packed.exe --version
2016-09-30 22:58:03 +00:00
# now run the UPX testsuite using bash
2016-09-28 19:45:58 +00:00
- cd c:\projects\upx
- bash ./.github/travis_testsuite_1.sh
2020-01-16 12:10:52 +00:00
# info: it seems that ssh is not properly installed/started on the 2019 worker image
- if NOT "%VS_VERSION%"=="2019" ( bash ./.github/travis_deploy.sh )
2016-09-27 18:30:54 +00:00
# vim:set ts=2 sw=2 et: