Port Windows MSVC and ClangCL Bazel tests to GitHub Actions. This adds the `windows` job matrix to `.github/workflows/ci.yml` and `build:windows-msvc` / `build:windows-clangcl` configurations to `.bazelrc` to mirror the 7 Windows Bazel Kokoro jobs. PiperOrigin-RevId: 1002818299
diff --git a/.bazelrc b/.bazelrc index c39ac4e..91d4da9 100644 --- a/.bazelrc +++ b/.bazelrc
@@ -37,6 +37,19 @@ build:linux --per_file_copt=external/.*@-w build:linux --host_per_file_copt=external/.*@-w +# Configure our Windows MSVC and ClangCL setup. +common:windows-msvc --enable_runfiles +build:windows-msvc --cxxopt=/std:c++17 --host_cxxopt=/std:c++17 +build:windows-msvc --copt=/WX +build:windows-msvc --per_file_copt=external/.*@/w +build:windows-msvc --host_per_file_copt=external/.*@/w + +build:windows-clangcl --config=windows-msvc +build:windows-clangcl --compiler=clang-cl +build:windows-clangcl --copt=-Wno-microsoft-cast +build:windows-clangcl --extra_execution_platforms=//:x64_windows-clang-cl +build:windows-clangcl --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl + build:gcc --config=linux --platforms=//ci:linux_gcc build:gcc-exceptions --config=gcc --copt=-fexceptions build:clang --config=linux --platforms=//ci:linux_clang --conlyopt=-Wno-unused-command-line-argument @@ -62,6 +75,13 @@ test:tsan --test_tag_filters=-benchmark,-notsan # Remote build configuration for CI. +build:remote-cache --remote_cache=grpcs://us-east1-remotebuildexecution.googleapis.com +build:remote-cache --remote_instance_name=projects/google.com:absl-177019/instances/absl-ci-east +build:remote-cache --remote_timeout=1200 --bes_timeout=600s +build:remote-cache --remote_download_minimal +# Retry up for up to 15 minutes under heavy load (exponential backoff). +build:remote-cache --remote_retries=20 --remote_retry_max_delay=60s + build:remote-base --define=EXECUTOR=remote build:remote-base --remote_timeout=1200 --bes_timeout=600s build:remote-base --jobs=50
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e9e9b9..4de4e8f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml
@@ -46,7 +46,7 @@ jobs: # Mirrors the 11 Linux Bazel Kokoro jobs (parallelized to 1 job per Bazel # invocation). Not yet covered here: - # - macOS Bazel and Windows Bazel Kokoro jobs + # - macOS Kokoro jobs linux: name: Linux ${{ matrix.config.name }} Bazel strategy: @@ -151,10 +151,39 @@ link_modes: ${{ matrix.config.link_modes || '["static", "shared", "monolithic-shared"]' }} install_test: ${{ matrix.config.install_test || false }} + windows: + name: Windows ${{ matrix.config.name }} Bazel + strategy: + fail-fast: false # Don't cancel all jobs if one fails. + matrix: + config: + # windows-msvc-2022-cxx{17,20}-{dbg,opt}-bazel.cfg + - name: MSVC 2022 + toolchain: windows-msvc + # windows-msvc-2022-alternate-options-cxx{17,20}-dbg-bazel.cfg (dbg only) + - name: MSVC 2022 Alternate Options + toolchain: windows-msvc + alternate_options: true + compilation_modes: '["dbg"]' + # windows-clangcl-cxx17-fastbuild-bazel.cfg + - name: ClangCL + toolchain: windows-clangcl + stds: '["c++17"]' + compilation_modes: '["fastbuild"]' + uses: ./.github/workflows/bazel.yml + secrets: inherit + with: + os: windows-2022 + toolchain: ${{ matrix.config.toolchain }} + remote_config: remote-cache + alternate_options: ${{ matrix.config.alternate_options || false }} + stds: ${{ matrix.config.stds || '["c++17", "c++20"]' }} + compilation_modes: ${{ matrix.config.compilation_modes || '["dbg", "opt"]' }} + # Provide a single predictably-named job for copybara to look for all-blocking-tests: name: All Blocking Tests - needs: [linux, cmake] + needs: [linux, cmake, windows] runs-on: ubuntu-latest steps: - name: Check for cancellations