Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 9d2f428

Browse files
Building with Visual Studio 2019 Preview
1 parent 0750b2e commit 9d2f428

File tree

4 files changed

+84
-88
lines changed

4 files changed

+84
-88
lines changed

appveyor.yml

Lines changed: 75 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,75 @@
1-
os: Visual Studio 2017
2-
version: '2.10.0.{build}'
3-
skip_tags: true
4-
5-
install:
6-
- choco install --no-progress BCC-MSBuildLog
7-
- choco install --no-progress BCC-Submission
8-
- ps: |
9-
$full_build = Test-Path env:GHFVS_KEY
10-
$forVSInstaller = $env:BUILD_TYPE -eq "vsinstaller"
11-
$forPackage = $env:BUILD_TYPE -eq "package"
12-
$package = $full_build -and ($env:APPVEYOR_PULL_REQUEST_NUMBER -or $forVSInstaller -or $forPackage)
13-
14-
$message = "Building "
15-
if ($package) { $message += "and packaging "}
16-
$message += "version " + $env:APPVEYOR_BUILD_NUMBER + " "
17-
18-
if ($full_build) { $message += "(full build)" } else { $message += "(partial build)" }
19-
if ($forVSInstaller) { $message += " for the VS installer" }
20-
Write-Host $message
21-
22-
git submodule init
23-
git submodule sync
24-
25-
if ($full_build) {
26-
$fileContent = "-----BEGIN RSA PRIVATE KEY-----`n"
27-
$fileContent += $env:GHFVS_KEY.Replace(' ', "`n")
28-
$fileContent += "`n-----END RSA PRIVATE KEY-----`n"
29-
Set-Content c:\users\appveyor\.ssh\id_rsa $fileContent
30-
} else {
31-
git submodule deinit script
32-
}
33-
34-
git submodule update --recursive --force
35-
nuget restore GitHubVS.sln
36-
37-
build_script:
38-
- ps: scripts\build.ps1 -AppVeyor -Package:$package -BuildNumber:$env:APPVEYOR_BUILD_NUMBER -ForVSInstaller:$forVSInstaller
39-
40-
test:
41-
categories:
42-
except:
43-
- Timings
44-
45-
on_success:
46-
- ps: |
47-
if ($package) {
48-
Write-Host "Signing and packaging"
49-
script\Sign-Package -AppVeyor -ForVSInstaller:$forVSInstaller
50-
}
51-
52-
for:
53-
-
54-
branches:
55-
except:
56-
- /releases/.*-vsinstaller/
57-
environment:
58-
matrix:
59-
- BUILD_TYPE: normal
60-
-
61-
branches:
62-
only:
63-
- /releases/.*-vsinstaller/
64-
environment:
65-
matrix:
66-
- BUILD_TYPE: package
67-
- BUILD_TYPE: vsinstaller
68-
-
69-
branches:
70-
only:
71-
- master
72-
- /releases/(?:(?!-vsinstaller).)*?/
73-
environment:
74-
matrix:
75-
- BUILD_TYPE: package
1+
os: Visual Studio 2019 Preview
2+
version: '2.10.0.{build}'
3+
skip_tags: true
4+
5+
install:
6+
- choco install --no-progress BCC-MSBuildLog
7+
- choco install --no-progress BCC-Submission
8+
- ps: |
9+
$full_build = Test-Path env:GHFVS_KEY
10+
$forVSInstaller = $env:BUILD_TYPE -eq "vsinstaller"
11+
$forPackage = $env:BUILD_TYPE -eq "package"
12+
$package = $full_build -and ($env:APPVEYOR_PULL_REQUEST_NUMBER -or $forVSInstaller -or $forPackage)
13+
14+
$message = "Building "
15+
if ($package) { $message += "and packaging "}
16+
$message += "version " + $env:APPVEYOR_BUILD_NUMBER + " "
17+
18+
if ($full_build) { $message += "(full build)" } else { $message += "(partial build)" }
19+
if ($forVSInstaller) { $message += " for the VS installer" }
20+
Write-Host $message
21+
22+
git submodule init
23+
git submodule sync
24+
25+
if ($full_build) {
26+
$fileContent = "-----BEGIN RSA PRIVATE KEY-----`n"
27+
$fileContent += $env:GHFVS_KEY.Replace(' ', "`n")
28+
$fileContent += "`n-----END RSA PRIVATE KEY-----`n"
29+
Set-Content c:\users\appveyor\.ssh\id_rsa $fileContent
30+
} else {
31+
git submodule deinit script
32+
}
33+
34+
git submodule update --recursive --force
35+
Write-Host "Completed AppVeyor Install"
36+
37+
build_script:
38+
- ps: scripts\build.ps1 -AppVeyor -Package:$package -BuildNumber:$env:APPVEYOR_BUILD_NUMBER -ForVSInstaller:$forVSInstaller
39+
40+
test:
41+
categories:
42+
except:
43+
- Timings
44+
45+
on_success:
46+
- ps: |
47+
if ($package) {
48+
Write-Host "Signing and packaging"
49+
script\Sign-Package -AppVeyor -ForVSInstaller:$forVSInstaller
50+
}
51+
52+
for:
53+
-
54+
branches:
55+
except:
56+
- /releases/.*-vsinstaller/
57+
environment:
58+
matrix:
59+
- BUILD_TYPE: normal
60+
-
61+
branches:
62+
only:
63+
- /releases/.*-vsinstaller/
64+
environment:
65+
matrix:
66+
- BUILD_TYPE: package
67+
- BUILD_TYPE: vsinstaller
68+
-
69+
branches:
70+
only:
71+
- master
72+
- /releases/(?:(?!-vsinstaller).)*?/
73+
environment:
74+
matrix:
75+
- BUILD_TYPE: package

scripts/build.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ if ($Package) {
7878
Write-Output "Building and packaging GitHub for Visual Studio"
7979
} else {
8080
Write-Output "Building GitHub for Visual Studio"
81-
}
81+
}
82+
83+
Get-ChildItem -Recurse -Path 'C:\Program Files (x86)\MSBuild\' msbuild.exe
8284

8385
Build-Solution GitHubVs.sln "Build" $config -Deploy:$Package -ForVSInstaller:$ForVSInstaller
8486

scripts/common.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ function Die([string]$message, [object[]]$output) {
77
$message += ". See output above."
88
}
99
Throw (New-Object -TypeName ScriptException -ArgumentList $message)
10-
}
10+
}
1111

1212
if (Test-Path "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe") {
1313
$msbuild = "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe"
1414
}
15-
elseif (Test-Path "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe") {
15+
elseif (Test-Path "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe") {
1616
$msbuild = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe"
1717
}
1818
else {

scripts/modules.ps1

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,8 @@ New-Module -ScriptBlock {
9999

100100
New-Module -ScriptBlock {
101101
function Find-MSBuild() {
102-
if (Test-Path "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin\MSBuild.exe") {
103-
$msbuild = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin\MSBuild.exe"
104-
}
105-
elseif (Test-Path "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe") {
106-
$msbuild = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe"
107-
}
108-
elseif (Test-Path "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe") {
109-
$msbuild = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe"
102+
if (Test-Path "C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\MSBuild.exe") {
103+
$msbuild = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\MSBuild.exe"
110104
}
111105
else {
112106
Die("No suitable msbuild.exe found.")
@@ -129,8 +123,8 @@ New-Module -ScriptBlock {
129123
$flag1 = "/p:Package=Skip"
130124
}
131125

132-
Write-Host "$msbuild $solution /target:$target /property:Configuration=$configuration /p:DeployExtension=false /verbosity:minimal /p:VisualStudioVersion=15.0 /bl:output.binlog $flag1 $flag2"
133-
Run-Command -Fatal { & $msbuild $solution /target:$target /property:Configuration=$configuration /p:DeployExtension=false /verbosity:minimal /p:VisualStudioVersion=15.0 /bl:output.binlog $flag1 $flag2 }
126+
Write-Host "$msbuild $solution /target:$target /property:Configuration=$configuration /p:DeployExtension=false /verbosity:minimal /p:VisualStudioVersion=16.0 /bl:output.binlog $flag1 $flag2"
127+
Run-Command -Fatal { & $msbuild $solution /target:$target /property:Configuration=$configuration /p:DeployExtension=false /verbosity:minimal /p:VisualStudioVersion=16.0 /bl:output.binlog $flag1 $flag2 }
134128
}
135129

136130
Export-ModuleMember -Function Find-MSBuild,Build-Solution

0 commit comments

Comments
 (0)