forked from microsoft/mfcmapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
121 lines (88 loc) · 4.44 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
version: 1.0.{build}
clone_depth: 1
branches:
only:
- master
skip_tags: true
image: Visual Studio 2017
configuration:
- Release
- Debug
platform:
- win32
- x64
skip_commits:
files:
- docs/*
- '**/*.md'
- '**/*.zip'
init:
- ps: >-
$date = Get-Date
$year = $date.ToString("yy")
$build = $year + "{0:D3}" -f $date.DayOfYear
$version = "$year.2.$build.$Env:APPVEYOR_BUILD_NUMBER"
Add-AppveyorMessage "Setting build version: $version"
Update-AppveyorBuild -Version $version
before_build:
- ps: >-
$Env:APPVEYOR_BUILD_VERSION -match "(\d+)\.(\d+)\.(\d+)\.(\d+)"
$m = $matches
$file = gci "$Env:APPVEYOR_BUILD_FOLDER\core\res\bldver.rc"
if($file)
{
attrib $file -r
$fc = Get-Content($file)
$fc = $fc -replace "#define rmj (\d+)", ("#define rmj "+$m[1])
$fc = $fc -replace "#define rmm (\d+)", ("#define rmm "+$m[2])
$fc = $fc -replace "#define rup (\d+)", ("#define rup "+$m[3])
$fc = $fc -replace "#define rmn (\d+)", ("#define rmn "+$m[4])
$fc | Out-File $file
}
build:
project: MFCMAPI.sln
parallel: true
verbosity: minimal
after_build:
- ps: >-
. ($Env:APPVEYOR_BUILD_FOLDER + '\Deploy\Compress-File.ps1')
$indir = "$Env:APPVEYOR_BUILD_FOLDER\bin"
$outdir = "$Env:APPVEYOR_BUILD_FOLDER\archives"
$version = $Env:APPVEYOR_BUILD_VERSION
if (!(Test-Path $outdir)) {New-Item -Path $outdir -Type Directory}
Compress-File -Source "$indir\Win32\MrMAPI\Release\MrMAPI.exe" -Target "$outdir\MrMAPI.exe.$version.zip"
Compress-File -Source "$indir\Win32\MrMAPI\Release\MrMAPI.pdb" -Target "$outdir\MrMAPI.pdb.$version.zip"
Compress-File -Source "$indir\x64\MrMAPI\Release\MrMAPI.exe" -Target "$outdir\MrMAPI.exe.x64.$version.zip"
Compress-File -Source "$indir\x64\MrMAPI\Release\MrMAPI.pdb" -Target "$outdir\MrMAPI.pdb.x64.$version.zip"
Compress-File -Source "$indir\Win32\Release\MFCMAPI.exe" -Target "$outdir\MFCMAPI.exe.$version.zip"
Compress-File -Source "$indir\Win32\Release\MFCMAPI.pdb" -Target "$outdir\MFCMAPI.pdb.$version.zip"
Compress-File -Source "$indir\x64\Release\MFCMAPI.exe" -Target "$outdir\MFCMAPI.exe.x64.$version.zip"
Compress-File -Source "$indir\x64\Release\MFCMAPI.pdb" -Target "$outdir\MFCMAPI.pdb.x64.$version.zip"
test_script:
- cmd: vstest.console /logger:Appveyor %APPVEYOR_BUILD_FOLDER%\bin\%PLATFORM%\UnitTest\%CONFIGURATION%\UnitTest.dll
artifacts:
- path: Archives\MFCMAPI.exe.$(APPVEYOR_BUILD_VERSION).zip
name: MFCMAPI 32 bit executable - Continuous Integration ($(APPVEYOR_BUILD_VERSION))
- path: Archives\MFCMAPI.pdb.$(APPVEYOR_BUILD_VERSION).zip
name: MFCMAPI 32 bit symbol - Continuous Integration ($(APPVEYOR_BUILD_VERSION))
- path: Archives\MFCMAPI.exe.x64.$(APPVEYOR_BUILD_VERSION).zip
name: MFCMAPI 64 bit executable - Continuous Integration ($(APPVEYOR_BUILD_VERSION))
- path: Archives\MFCMAPI.pdb.x64.$(APPVEYOR_BUILD_VERSION).zip
name: MFCMAPI 64 bit symbol - Continuous Integration ($(APPVEYOR_BUILD_VERSION))
- path: Archives\MrMAPI.exe.$(APPVEYOR_BUILD_VERSION).zip
name: MrMAPI 32 bit executable - Continuous Integration ($(APPVEYOR_BUILD_VERSION))
- path: Archives\MrMAPI.pdb.$(APPVEYOR_BUILD_VERSION).zip
name: MrMAPI 32 bit symbol - Continuous Integration ($(APPVEYOR_BUILD_VERSION))
- path: Archives\MrMAPI.exe.x64.$(APPVEYOR_BUILD_VERSION).zip
name: MrMAPI 64 bit executable - Continuous Integration ($(APPVEYOR_BUILD_VERSION))
- path: Archives\MrMAPI.pdb.x64.$(APPVEYOR_BUILD_VERSION).zip
name: MrMAPI 64 bit symbol - Continuous Integration ($(APPVEYOR_BUILD_VERSION))
deploy:
- provider: GitHub
tag: $(APPVEYOR_BUILD_VERSION)
release: Continuous Integration ($(APPVEYOR_BUILD_VERSION))
description: "Build: *$(APPVEYOR_BUILD_VERSION)*\n\nThis is the continuous integration build of MFCMAPI.\n\nIf you just want to run the MFCMAPI or MrMAPI, get the executables (exe). If you want to debug them, get the symbol files (pdb).\n\n*The 64 bit builds will only work on a machine with Outlook 2010/2013/2016 64 bit installed. All other machines should use the 32 bit builds, regardless of the operating system.*\n\n[![Facebook Badge](http://badge.facebook.com/badge/26764016480.2776.1538253884.png)](http://www.facebook.com/MFCMAPI)\n\n[Download stats](https://www.somsubhra.com/github-release-stats/?username=stephenegriffin&repository=mfcmapi&search=0)"
auth_token:
secure: vJsUDJyfK/dEUbimHuxnA5id48OJR5UeHpB2WK8rcN7SslRJ08BHy9ecKctDJzx/
artifact: /.*\.zip/
draft: true