@@ -40,7 +40,7 @@ arch=$(uname -m)
4040
4141# Adjust the values when running on Windows x86 to match the config in
4242# .bazelrc
43- if [[ $os =~ " msys_nt" ]] && [[ $arch == " x86_64" ]]; then
43+ if [[ $os =~ " msys_nt" && $arch == " x86_64" ]]; then
4444 os=" windows"
4545 arch=" amd64"
4646fi
@@ -54,26 +54,17 @@ if [[ " ${allowed_artifacts[@]} " =~ " ${artifact} " ]]; then
5454
5555 # For bazel builds, use the "rbe_" config for Linux x86/Windows and "ci_" for other platforms
5656 bazelrc_config=" ${os} _${arch} "
57- if ( [[ " $os " == " linux " ]] && [[ " $arch " == " x86_64 " ]] ) || [[ " $os " == " windows " ]]; then
58- bazelrc_config=" rbe_$bazelrc_config "
57+ if [[ " $JAXCI_BUILD_ARTIFACT_WITH_RBE " == 1 ]]; then
58+ bazelrc_config=" rbe_${ bazelrc_config} "
5959 else
60- bazelrc_config=" ci_$bazelrc_config "
60+ bazelrc_config=" ci_${ bazelrc_config} "
6161 fi
6262
63- # Build the jaxlib CPU artifact
64- if [[ " $artifact " == " jaxlib" ]]; then
65- python build/build.py build --wheels=" jaxlib" --bazel_options=--config=" $bazelrc_config " --python_version=$JAXCI_HERMETIC_PYTHON_VERSION --verbose
63+ if [[ (" $artifact " == " jax-cuda-plugin" ) || (" $artifact " == " jax-cuda-pjrt" ) ]]; then
64+ bazelrc_config=" ${bazelrc_config} _cuda"
6665 fi
6766
68- # Build the jax-cuda-plugin artifact
69- if [[ " $artifact " == " jax-cuda-plugin" ]]; then
70- python build/build.py build --wheels=" jax-cuda-plugin" --bazel_options=--config=" ${bazelrc_config} _cuda" --python_version=$JAXCI_HERMETIC_PYTHON_VERSION --verbose
71- fi
72-
73- # Build the jax-cuda-pjrt artifact
74- if [[ " $artifact " == " jax-cuda-pjrt" ]]; then
75- python build/build.py build --wheels=" jax-cuda-pjrt" --bazel_options=--config=" ${bazelrc_config} _cuda" --verbose
76- fi
67+ python build/build.py build --wheels=" $artifact " --bazel_options=--config=" $bazelrc_config " --python_version=$JAXCI_HERMETIC_PYTHON_VERSION --verbose
7768
7869 # If building `jaxlib` or `jax-cuda-plugin` or `jax-cuda-pjrt` for Linux, we
7970 # run `auditwheel show` to verify manylinux compliance.
0 commit comments