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

Commit 2c2e4c7

Browse files
meastpg-easy
authored andcommitted
Fix Windows builds with appveyor and CMake. (#292)
1 parent c305ec0 commit 2c2e4c7

File tree

1 file changed

+33
-13
lines changed

1 file changed

+33
-13
lines changed

.appveyor.yml

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,40 @@
11
# Without this "Update next build number or change version format."
22
version: "{build}"
33

4-
environment:
5-
global:
6-
BAZEL_ROOT: c:\bazel_root\
7-
INSTALL_CACHE: c:\install_cache\
8-
APPVEYOR_SAVE_CACHE_ON_ERROR: true
9-
matrix:
10-
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
4+
image: Visual Studio 2017
115

12-
install:
13-
- set PATH=%PATH%;%INSTALL_CACHE%
14-
- cmd: tools\appveyor\install.bat
6+
platform:
7+
- x64
158

16-
build_script:
17-
- cmd: tools\appveyor\build.bat
9+
configuration:
10+
- Release
11+
- Debug
12+
13+
before_build:
14+
- cmake -G "Visual Studio 15 2017 Win64" .
15+
16+
build:
17+
project: $(APPVEYOR_BUILD_FOLDER)\$(APPVEYOR_PROJECT_NAME).sln
1818

1919
test_script:
20-
- cmd: tools\appveyor\test.bat
20+
- ps: |
21+
Get-ChildItem -Recurse -Path $env:APPVEYOR_BUILD_FOLDER -Filter "*_test.exe" | ForEach-Object {
22+
Write-Output $_.FullName
23+
$report_name = "--gtest_output=xml:" + $_.BaseName + "_report.xml"
24+
25+
#Write-Output $report_name
26+
#Start-Process -FilePath $_.FullName -ArgumentList $report_name -Verbose
27+
28+
$cmdArgList = @(
29+
('"{0}"' -f $report_name)
30+
)
31+
32+
& $_.FullName $cmdArgList
33+
}
34+
35+
on_finish:
36+
- ps: |
37+
Get-ChildItem -Recurse -Path $env:APPVEYOR_BUILD_FOLDER -Filter "*_test_report.xml" | ForEach-Object {
38+
Write-Output $_.FullName
39+
(new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", $_.FullName)
40+
}

0 commit comments

Comments
 (0)