-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathappveyor.yml
101 lines (60 loc) · 3.08 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
101
version: 2.0.0-beta{build}
# Build on each push, not on each tag creation. This stops a double build
# when deployment creates a new tag.
skip_tags: true
install:
- ps: >-
# Download nuget.exe >= 3.4.4 as earlier versions produce corrupted native .nupkg files
$nugetPath = "$($env:USERPROFILE)\nuget.exe"
(New-Object Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', $nugetPath)
# Make the nuget.exe folder come first in the path, so it gets picked up before anything else
$env:Path = $env:USERPROFILE + ";" + $env:Path
# Download the CoApp tools.
$msiPath = "$($env:USERPROFILE)\CoApp.Tools.Powershell.msi"
(New-Object Net.WebClient).DownloadFile('http://coapp.org/files/CoApp.Tools.Powershell.msi', $msiPath)
# Install the CoApp tools from the downloaded .msi.
Start-Process -FilePath msiexec -ArgumentList /i, $msiPath, /quiet -Wait
# Make the tools available for later PS scripts to use.
$env:PSModulePath = $env:PSModulePath + ';C:\Program Files (x86)\Outercurve Foundation\Modules'
Import-Module CoApp
nuget:
disable_publish_on_pr: true
build_script:
- cmd: >-
"%VS140COMNTOOLS%\VsMSBuildCmd.bat"
appveyor-retry nuget restore win32\libgamearchive.sln
appveyor-retry nuget update win32\libgamearchive.sln
FOR %%T IN (v140,v140_xp) DO ( FOR %%P IN (x86,x64) DO ( FOR %%C IN (Debug,Release) DO ( FOR %%F IN (libgamearchive,libgamearchive-tests,gamearch,gamecomp) DO ( echo *** Building %%F as %%T/%%P/%%C *** && msbuild win32\%%F\%%F.vcxproj /p:Configuration=%%C /p:Platform=%%P /p:PlatformToolset=%%T /p:SolutionDir=..\ /v:minimal /nologo || EXIT 1 ) ) ) )
before_deploy:
- ps: >-
# This is the CoApp .autopkg file to create.
$autopkgFile = "win32\libgamearchive.autopkg"
# Get the ".autopkg.template" file, replace "@version" with the Appveyor version number, then save to the ".autopkg" file.
cat ($autopkgFile + ".template") | % { $_ -replace "@version", $env:appveyor_build_version } > $autopkgFile
# Use the CoApp tools to create NuGet native packages from the .autopkg.
Write-NuGetPackage $autopkgFile
# Push all newly created .nupkg files as Appveyor artifacts for later deployment.
Get-ChildItem .\*.nupkg | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
# Zip up the binaries so they can be deployed
7z a win32\libgamearchive-beta-win32.zip .\win32\v140_xp\Win32\Release\libgame*.dll .\win32\v140_xp\Win32\Release\*.exe
7z a win32\libgamearchive-beta-win64.zip .\win32\v140_xp\x64\Release\libgame*.dll .\win32\v140_xp\x64\Release\*.exe
artifacts:
- path: win32\*.zip
name: Zipped binaries
deploy:
- provider: NuGet
api_key:
secure: 9Rk3FyZ1qSjw0eyhiyhsfyOpir/jfoV6t1IkPA4L3VA/fLPMpmNdjOxDaniqoDxL
artifact: /.*\.nupkg/
on:
branch: master
- provider: GitHub
release: ci
description: 'Latest git build ($(APPVEYOR_BUILD_VERSION))'
auth_token:
secure: 8VrS2qHq9TRfRmNXyqVFOyVE0xj0m8xTKbQ+unYAwX3uQfgE/gV9EeMO0oIZmCyx
artifact: win32\*.zip
prerelease: true
force_update: true
on:
branch: master