@@ -40,12 +40,24 @@ x_defaults:
40
40
- " -//test:output_file_map_default"
41
41
windows_common : &windows_common
42
42
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"
43
47
build_flags :
44
48
# Override 'sandboxed' strategy set in .bazelrc because it's not
45
49
# available on Windows
46
50
- " --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%"
47
53
build_targets :
48
54
- " //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
49
61
50
62
tasks :
51
63
# TODO: Uncomment once Bazel 8 is released
@@ -118,11 +130,14 @@ tasks:
118
130
- .bazelci/update_workspace_to_deps_heads.sh
119
131
<< : *linux_common
120
132
121
- # TODO: re-enable when Windows in Bazel CI is properly configured for Swift.
122
- # windows_last_green:
123
- # name: "Last Green Bazel"
124
- # bazel: last_green
125
- # <<: *windows_common
133
+ windows_last_green :
134
+ name : " Last Green Bazel"
135
+ bazel : last_green
136
+ batch_commands :
137
+ - echo --- Downloading and installing Swift %SWIFT_VERSION%
138
+ - 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
139
+ - PowerShell Start-Process -FilePath ${env:TEMP}\installer.exe -ArgumentList(\"/install\", \"/passive\", \"/norestart\", \"/log log.txt\") -Wait -PassThru -Verb RunAs
140
+ << : *windows_common
126
141
127
142
doc_tests :
128
143
name : " Doc tests"
0 commit comments