-
Notifications
You must be signed in to change notification settings - Fork 10
/
ci_execution.ps1
22 lines (22 loc) · 1 KB
/
ci_execution.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Set-StrictMode -Version latest
$ErrorActionPreference = "Stop"
$PSNativeCommandUseErrorActionPreference = $true
Set-Location $PSScriptRoot
# In case Appveyor decides to update the Visual Studio installation this will help to figure out the new version
# Get-ChildItem env:
bazel version
if($IsWindows) {
Write-Host "Skipping 'bazel run //:buildifier' on Windows"
Write-Host "Running buildifier from the Bazel rule does not work on Windows"
Write-Host "See https://github.com/bazelbuild/buildtools/issues/346 and https://github.com/bazelbuild/buildtools/issues/770"
if($Env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019"){
bazel build //...
bazel build //... --platforms=//platform:windows_x64
bazel run //:hello_world
} else {
Write-Host "Skipping 'windows_toolchain' if the image is not having Visual Studio 2019"
}
} else {
Write-Host "Skipping 'windows_toolchain' example on Linux"
Write-Host "Like the name of the example says, this in Windows only"
}