@@ -11,7 +11,6 @@ skip_components_bzlmod=false
1111skip_redist_json=false
1212skip_redist_json_multi=false
1313skip_redist_json_collision=false
14- redist_windows_limited=false
1514
1615while [[ $# -gt 0 ]]; do
1716 case $1 in
4039
4140set -ex
4241
43- # The CUDA redist archives used here are linux-only; skip on Windows CI.
42+ redist_platform_args=()
4443if [[ " $RUNNER_OS " == " Windows" ]] || [[ " $( uname -s 2> /dev/null) " =~ MINGW| MSYS| CYGWIN ]]; then
45- # Multi-version redist tests currently generate linux repos only.
46- # On Windows, run a reduced analysis-only subset for coverage.
47- redist_windows_limited=true
44+ redist_platform_args=(
45+ --@rules_cuda//cuda:exec_platform=windows-x86_64
46+ --@rules_cuda//cuda:target_platform=windows-x86_64
47+ )
4848fi
4949
5050# toolchain configured by the root module of the user
@@ -178,14 +178,12 @@ cat <<- EOF
178178============================================================
179179EOF
180180pushd " $this_dir /toolchain_redist_json"
181- bazel build --enable_workspace //... --@rules_cuda//cuda:enable=False
182- bazel build --enable_workspace //:optionally_use_rule --@rules_cuda//cuda:enable=False
183- if [ " $redist_windows_limited " = false ]; then
184- bazel build --enable_workspace //... --@rules_cuda//cuda:enable=True
185- bazel build --enable_workspace //:optionally_use_rule --@rules_cuda//cuda:enable=True
186- bazel build --enable_workspace //:use_library
187- bazel build --enable_workspace //:use_rule
188- fi
181+ bazel build --enable_workspace //... --@rules_cuda//cuda:enable=False " ${redist_platform_args[@]} "
182+ bazel build --enable_workspace //... --@rules_cuda//cuda:enable=True " ${redist_platform_args[@]} "
183+ bazel build --enable_workspace //:optionally_use_rule --@rules_cuda//cuda:enable=False " ${redist_platform_args[@]} "
184+ bazel build --enable_workspace //:optionally_use_rule --@rules_cuda//cuda:enable=True " ${redist_platform_args[@]} "
185+ bazel build --enable_workspace //:use_library " ${redist_platform_args[@]} "
186+ bazel build --enable_workspace //:use_rule " ${redist_platform_args[@]} "
189187 bazel clean && bazel shutdown
190188popd
191189fi
@@ -199,20 +197,18 @@ cat <<- EOF
199197============================================================
200198EOF
201199pushd " $this_dir /toolchain_redist_json_multi"
202- bazel build --enable_bzlmod //... --@rules_cuda//cuda:enable=False
203- bazel build --enable_bzlmod //:optionally_use_rule --@rules_cuda//cuda:enable=False
204- if [ " $redist_windows_limited " = false ]; then
205- bazel build --enable_bzlmod //... --@rules_cuda//cuda:enable=True
206- bazel build --enable_bzlmod //:optionally_use_rule --@rules_cuda//cuda:enable=True --@rules_cuda//cuda:version=12.6.3
207- bazel build --enable_bzlmod //:optionally_use_rule --@rules_cuda//cuda:enable=True --@rules_cuda//cuda:version=11.7.0
208- bazel build --enable_bzlmod //:use_library
209- bazel build --enable_bzlmod //:use_rule --@rules_cuda//cuda:version=12.6.3
210- bazel build --enable_bzlmod //:use_rule --@rules_cuda//cuda:version=11.7.0
211- fi
200+ bazel build --enable_bzlmod //... --@rules_cuda//cuda:enable=False " ${redist_platform_args[@]} "
201+ bazel build --enable_bzlmod //... --@rules_cuda//cuda:enable=True " ${redist_platform_args[@]} "
202+ bazel build --enable_bzlmod //:optionally_use_rule --@rules_cuda//cuda:enable=False " ${redist_platform_args[@]} "
203+ bazel build --enable_bzlmod //:optionally_use_rule --@rules_cuda//cuda:enable=True --@rules_cuda//cuda:version=12.6.3 " ${redist_platform_args[@]} "
204+ bazel build --enable_bzlmod //:optionally_use_rule --@rules_cuda//cuda:enable=True --@rules_cuda//cuda:version=11.7.0 " ${redist_platform_args[@]} "
205+ bazel build --enable_bzlmod //:use_library " ${redist_platform_args[@]} "
206+ bazel build --enable_bzlmod //:use_rule --@rules_cuda//cuda:version=12.6.3 " ${redist_platform_args[@]} "
207+ bazel build --enable_bzlmod //:use_rule --@rules_cuda//cuda:version=11.7.0 " ${redist_platform_args[@]} "
212208
213209 # Keep the override-only dedupe probe isolated so it cannot pollute later versioned builds.
214210 bazel clean && bazel shutdown
215- CUDA_REDIST_VERSION_OVERRIDE=11.7.0 bazel build --enable_bzlmod //:optionally_use_rule --@rules_cuda//cuda:enable=False
211+ CUDA_REDIST_VERSION_OVERRIDE=11.7.0 bazel build --enable_bzlmod //:optionally_use_rule --@rules_cuda//cuda:enable=False " ${redist_platform_args[@]} "
216212 bazel clean && bazel shutdown
217213popd
218214fi
0 commit comments