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

Commit

Permalink
Fix Windows builds with appveyor and CMake. (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
meastp authored and g-easy committed Mar 8, 2019
1 parent c305ec0 commit 2c2e4c7
Showing 1 changed file with 33 additions and 13 deletions.
46 changes: 33 additions & 13 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,40 @@
# Without this "Update next build number or change version format."
version: "{build}"

environment:
global:
BAZEL_ROOT: c:\bazel_root\
INSTALL_CACHE: c:\install_cache\
APPVEYOR_SAVE_CACHE_ON_ERROR: true
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
image: Visual Studio 2017

install:
- set PATH=%PATH%;%INSTALL_CACHE%
- cmd: tools\appveyor\install.bat
platform:
- x64

build_script:
- cmd: tools\appveyor\build.bat
configuration:
- Release
- Debug

before_build:
- cmake -G "Visual Studio 15 2017 Win64" .

build:
project: $(APPVEYOR_BUILD_FOLDER)\$(APPVEYOR_PROJECT_NAME).sln

test_script:
- cmd: tools\appveyor\test.bat
- ps: |
Get-ChildItem -Recurse -Path $env:APPVEYOR_BUILD_FOLDER -Filter "*_test.exe" | ForEach-Object {
Write-Output $_.FullName
$report_name = "--gtest_output=xml:" + $_.BaseName + "_report.xml"
#Write-Output $report_name
#Start-Process -FilePath $_.FullName -ArgumentList $report_name -Verbose
$cmdArgList = @(
('"{0}"' -f $report_name)
)
& $_.FullName $cmdArgList
}
on_finish:
- ps: |
Get-ChildItem -Recurse -Path $env:APPVEYOR_BUILD_FOLDER -Filter "*_test_report.xml" | ForEach-Object {
Write-Output $_.FullName
(new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", $_.FullName)
}

0 comments on commit 2c2e4c7

Please sign in to comment.