-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
89 lines (67 loc) · 2.69 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
version: 1.3.43.{build}
shallow_clone: true
environment:
matrix:
- tbs_arch: "x86"
tbs_tools: "msvc12"
tbs_static_runtime: 0
- tbs_arch: "x64"
tbs_tools: "msvc12"
tbs_static_runtime: 0
- tbs_arch: "x86"
tbs_tools: "mingw"
tbs_static_runtime: 1
- tbs_arch: "x64"
tbs_tools: "mingw"
tbs_static_runtime: 1
install:
- ps: if($env:build_platform -eq 'x64') {
$env:vcvar_arg = 'x86_amd64';
}
else {
$env:vcvar_arg = 'x86';
}
# get common functions
- git clone https://github.com/imazen/gd-appveyor-helpers
- ps: . .\gd-appveyor-helpers\appveyor_funcs.ps1
# get nasm
#- cinst nasm
#nasm's main site down...
- curl -L -o nasminst.exe http://libgd.blob.core.windows.net/nasm/nasm-2.07-installer.exe
- start /wait nasminst.exe /S
- ps: $env:path="C:\Program Files (x86)\nasm;$($env:path)"
# get mingw-w64 (C:\mingw64)
# copy of http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.1/threads-posix/seh/x86_64-4.9.1-release-posix-seh-rt_v3-rev1.7z
- ps: if($env:tbs_tools -eq 'mingw' -and $env:tbs_arch -eq 'x64')
{
curl -outfile mw64.7z "http://libgd.blob.core.windows.net/mingw/x86_64-4.9.1-release-posix-seh-rt_v3-rev1.7z";
if((Get-FileHash mw64.7z -Algorithm SHA1).Hash -ne "91A35AE296C1A71802AB0C7228EE57F9AAC5D7C7")
{
echo "Invalid file hash";
exit 1;
};
7z x -oC:\ mw64.7z | out-null;
}
build_script:
- '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall" %vcvar_arg%'
- if [%tbs_tools%]==[mingw] if [%tbs_arch%]==[x86] SET PATH=C:\MinGW\bin;%PATH%
- if [%tbs_tools%]==[mingw] if [%tbs_arch%]==[x64] SET PATH=C:\mingw64\bin;%PATH%
- SET zip=libjpeg-turbo-%tbs_tools%-%tbs_arch%.zip
- ps: $nupkg_b = "libjpeg-$($env:tbs_tools)-$($env:tbs_arch)-$($env:APPVEYOR_REPO_BRANCH)";
- ps: $nupkg_c = "libjpeg-$($env:tbs_tools)-$($env:tbs_arch)-$($env:APPVEYOR_REPO_COMMIT)";
- thumbs make
- for /f "tokens=*" %%i in ('thumbs list') do set files=%%i
- 7z a %zip% %files%
- appveyor PushArtifact %zip%
- ps: if(Test-Path $env:zip) {
zip2nuget $env:zip $nupkg_b;
zip2nuget $env:zip $nupkg_c; }
test_script:
- SET fail=0
- thumbs check || SET fail=1 & ver > nul
- ps: Push-Ctest-Results 'build'
- ps: Push-AppveyorArtifact build\Testing\Temporary\LastTest.log
- exit %fail%
on_success:
- ps: Push-AppveyorArtifact "$nupkg_b*.nupkg"
- ps: Push-AppveyorArtifact "$nupkg_c*.nupkg"