Skip to content

Commit 9190286

Browse files
compnerdkeith
authored andcommitted
CI: complete the Windows CI coverage
Extend the Windows CI to include the tests as well. This will mostly complete the Windows support (the remaining pieces remain in supporting the Windows ARM64 build host).
1 parent ccfe585 commit 9190286

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

.bazelci/presubmit.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,24 @@ x_defaults:
4040
- "-//test:output_file_map_default"
4141
windows_common: &windows_common
4242
platform: windows
43+
environment:
44+
SWIFT_VERSION: 6.1.0
45+
PATH: "%LOCALAPPDATA%\\Programs\\Swift\\Toolchains\\%SWIFT_VERSION%+Asserts\\usr\\bin;%LOCALAPPDATA%\\Programs\\Swift\\Runtimes\\%SWIFT_VERSION%\\usr\\bin;%Path%"
46+
SDKROOT: "%LOCALAPPDATA%\\Programs\\Swift\\Platforms\\%SWIFT_VERSION%\\Windows.platform\\Developer\\SDKs\\Windows.sdk"
4347
build_flags:
4448
# Override 'sandboxed' strategy set in .bazelrc because it's not
4549
# available on Windows
4650
- "--strategy=SwiftCompile="
51+
- "--repo_env=SDKROOT=%LOCALAPPDATA%\\Programs\\Swift\\Platforms\\%SWIFT_VERSION%\\Windows.platform\\Developer\\SDKs\\Windows.sdk"
52+
- "--repo_env=Path=%LOCALAPPDATA%\\Programs\\Swift\\Toolchains\\%SWIFT_VERSION%+Asserts\\usr\\bin;%LOCALAPPDATA%\\Programs\\Swift\\Runtimes\\%SWIFT_VERSION%\\usr\\bin;%Path%"
4753
build_targets:
4854
- "//tools/..."
55+
test_flags:
56+
- "--compiler=clang-cl"
57+
test_targets:
58+
- "//examples/..."
59+
- "-//examples/apple/..."
60+
- "-//examples/xplatform/grpc/..." # TODO: Fix gRPC on Windows
4961

5062
tasks:
5163
macos_7:
@@ -117,11 +129,14 @@ tasks:
117129
- .bazelci/update_workspace_to_deps_heads.sh
118130
<<: *linux_common
119131

120-
# TODO: re-enable when Windows in Bazel CI is properly configured for Swift.
121-
# windows_last_green:
122-
# name: "Last Green Bazel"
123-
# bazel: last_green
124-
# <<: *windows_common
132+
windows_last_green:
133+
name: "Last Green Bazel"
134+
bazel: last_green
135+
batch_commands:
136+
- echo --- Downloading and installing Swift %SWIFT_VERSION%
137+
- curl.exe -L https://download.swift.org/swift-6.1-release/windows10/swift-6.1-RELEASE/swift-6.1-RELEASE-windows10.exe -o %TEMP%\installer.exe
138+
- PowerShell Start-Process -FilePath ${env:TEMP}\installer.exe -ArgumentList(\"/install\", \"/passive\", \"/norestart\", \"/log log.txt\") -Wait -PassThru -Verb RunAs
139+
<<: *windows_common
125140

126141
doc_tests:
127142
name: "Doc tests"

0 commit comments

Comments
 (0)