forked from upx/upx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
100 lines (93 loc) · 4.8 KB
/
.appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Support for AppVeyor CI -- https://www.appveyor.com/
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
os: Visual Studio 2015
environment:
global: { TRAVIS_OS_NAME: windows, CROSS: "", C: "", B: release, T: "", X: "" }
matrix:
- { C: msvc-10.0-x86, CL_VERSION: 16.00, VS_VERSION: 2010 }
### - { C: msvc-10.0-x64, CL_VERSION: 16.00, VS_VERSION: 2010 } # AppVeyor: x64 compiler is not installed
- { C: msvc-11.0-x86, CL_VERSION: 17.00, VS_VERSION: 2012 }
### - { C: msvc-11.0-x64, CL_VERSION: 17.00, VS_VERSION: 2012 } # AppVeyor: x64 compiler is not installed
- { 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 }
# - { C: gcc-4.9-m32, T: SKIP }
# - { C: gcc-4.9-m64, T: SKIP }
init:
- git config --global core.autocrlf input
- where bash & where cat & where curl & where file & where git & where gzip & where readlink & where sed & where sha256sum & where tar
# - bash --version & git --version & sed --version & tar --version
- git --version & bash --version
# - 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"
install:
- cd c:\projects
- md build build\%C% deps
- cd c:\projects\upx
- git submodule update --init --recursive
- cd c:\projects\deps
- 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
- tar -xzf ucl-1.03.tar.gz
- tar -xzf zlib-1.2.8.tar.gz
# patch UCL for msvc-14.0 (vsnprintf issue)
- sed -i '/# *define.*snprintf *_v*snprintf$/d' ucl-1.03/acc/acc_auto.h
##- 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
- 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 )
build_script:
- cd c:\projects\upx
- if "%C%"=="gcc-4.9-m32" set PATH=c:\cygwin\bin;%PATH%
- if "%C%"=="gcc-4.9-m32" bash -x ./.github/travis_build.sh
- if "%C%"=="gcc-4.9-m32" exit
- if "%C%"=="gcc-4.9-m64" set PATH=c:\cygwin\bin;%PATH%
- if "%C%"=="gcc-4.9-m64" bash -x ./.github/travis_build.sh
- if "%C%"=="gcc-4.9-m64" exit
# setup directories following the VPATH build in travis_build.sh
- where cl & where link
- set BDIR=c:\projects\build\%C%\%B%
- 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
- 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
- link -lib -out:ucl.lib *.obj
# build zlib
- cd %BDIR%\zlib-1.2.8
- cl -MT -O2 -W2 %DEFS% -c c:\projects\deps\zlib-1.2.8\*.c
- link -lib -out:zlib.lib *.obj
# build UPX
- cd %BDIR%\upx
- set s=c:\projects\upx\src
- cat .GITREV.txt
- set /p GITREV=<.GITREV.txt
- cl -MT -EHsc -J -O2 -W4 -DUPX_VERSION_GITREV="""%GITREV%""" %DEFS% -DWITH_LZMA=0x443 -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
test_script:
- set UPX=--no-color --no-progress
- cd %BDIR%\upx
# basic tests
- .\upx.exe --version
- .\upx.exe upx.exe -o upx_packed.exe
- dir *.exe
- .\upx.exe -l upx_packed.exe
- .\upx.exe -t upx_packed.exe
- .\upx_packed.exe --version
# now run the UPX testsuite using bash
- cd c:\projects\upx
- bash ./.github/travis_testsuite_1.sh
# vim:set ts=2 sw=2 et: