Use reclient for Alpine Linux CMake builds and unify Linux CMake CI config.

Updates the Alpine Linux container image to include reclient and rbe_test_launcher, allowing all Linux CMake jobs to run compilation and tests remotely on RBE instead of conditionalizing on oss-linux images.

PiperOrigin-RevId: 1003664906
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9957543..d7df937 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -87,7 +87,7 @@
           - name: GCC/libstdc++ (floor)
             toolchain: gcc
             remote_config: remote-floor
-            container_image: gcr.io/google.com/absl-177019/oss-linux-toolchain-floor@sha256:5a5d17e588e14d5f0d993ea828b7ba844c72b02980bcf731ccf5a4cddf8db599
+            container_image: gcr.io/google.com/absl-177019/oss-linux-toolchain-floor@sha256:9027d0b4cae51d764cebafecbf9e390a14f97cf977ca24d02cc533998614acd2
             stds: '["c++17"]'
           # linux_arm_clang-latest_libcxx_bazel.cfg (c++17 and c++20 only)
           - name: ARM64 Clang/libc++
@@ -101,7 +101,7 @@
       os: ${{ matrix.config.os || 'ubuntu-24.04' }}
       toolchain: ${{ matrix.config.toolchain }}
       remote_config: ${{ matrix.config.remote_config || 'remote' }}
-      container_image: ${{ matrix.config.container_image || 'gcr.io/google.com/absl-177019/oss-linux-toolchain-latest@sha256:5a19067585ce5e5ee45640fd0287f05038d6b3f9574d6a5cdf08241e022d0f4a' }}
+      container_image: ${{ matrix.config.container_image || 'gcr.io/google.com/absl-177019/oss-linux-toolchain-latest@sha256:81009eeb5523ae59cfbea8dc0847d41572ed100f79e3c976c64378a0c30d353c' }}
       alternate_options: ${{ matrix.config.alternate_options || false }}
       stds: ${{ matrix.config.stds || '["c++17", "c++20", "c++23"]' }}
       compilation_modes: ${{ matrix.config.compilation_modes || '["opt", "fastbuild"]' }}
@@ -115,17 +115,17 @@
           # linux_gcc-latest_libstdcxx_cxx17_cmake.cfg
           - name: Linux GCC/libstdc++
             os: ubuntu-24.04
-            container_image: gcr.io/google.com/absl-177019/oss-linux-latest@sha256:9f7f104e4857e3528e8bf5f14968183f5a0e786ca9ef63601eae4e4136f011d6
+            container_image: gcr.io/google.com/absl-177019/oss-linux-latest@sha256:84505366948db3ea97c71d0aa384a920e73f6994bb4194d7f80ee77979fd9d58
           # linux_gcc_alpine_cmake.cfg
           - name: Alpine Linux GCC (musl)
             os: ubuntu-24.04
-            container_image: gcr.io/google.com/absl-177019/alpine@sha256:ae26b80601cebb14595056a94e070f0f865d24baaf3ce19bcd52f53be9f99c80
+            container_image: gcr.io/google.com/absl-177019/alpine@sha256:52945833fc7b7b93f73ec865eb82390aa46d4e3acd1af87d253cd4a05f95d241
             build_types: '["Debug"]'
             link_modes: '["static"]'
           # cmake-install.cfg
           - name: Linux Install
             os: ubuntu-24.04
-            container_image: gcr.io/google.com/absl-177019/oss-linux-latest@sha256:9f7f104e4857e3528e8bf5f14968183f5a0e786ca9ef63601eae4e4136f011d6
+            container_image: gcr.io/google.com/absl-177019/oss-linux-latest@sha256:84505366948db3ea97c71d0aa384a920e73f6994bb4194d7f80ee77979fd9d58
             build_types: '["Release"]'
             link_modes: '["static", "shared"]'
             install_test: true
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml
index 2080af3..09d0b7e 100644
--- a/.github/workflows/cmake.yml
+++ b/.github/workflows/cmake.yml
@@ -70,12 +70,20 @@
       CFLAGS: ${{ !inputs.install_test && startsWith(inputs.os, 'ubuntu') && '-Werror' || '' }}
       CXX: ${{ startsWith(inputs.os, 'ubuntu') && 'g++' || '' }}
       CXXFLAGS: ${{ !inputs.install_test && (startsWith(inputs.os, 'ubuntu') && '-Werror' || startsWith(inputs.os, 'windows') && '-WX') || '' }}
-      CMAKE_BUILD_PARALLEL_LEVEL: 16
-      CMAKE_C_COMPILER_LAUNCHER: sccache
-      CMAKE_CXX_COMPILER_LAUNCHER: sccache
+      CMAKE_BUILD_PARALLEL_LEVEL: ${{ startsWith(inputs.os, 'ubuntu') && 50 || 16 }}
+      CMAKE_C_COMPILER_LAUNCHER: ${{ startsWith(inputs.os, 'ubuntu') && 'rewrapper' || 'sccache' }}
+      CMAKE_CXX_COMPILER_LAUNCHER: ${{ startsWith(inputs.os, 'ubuntu') && 'rewrapper' || 'sccache' }}
+      CMAKE_TEST_LAUNCHER: ${{ startsWith(inputs.os, 'ubuntu') && 'rbe_test_launcher' || '' }}
       CMAKE_GENERATOR: Ninja
       CTEST_OUTPUT_ON_FAILURE: 1
-      CTEST_PARALLEL_LEVEL: 16
+      CTEST_PARALLEL_LEVEL: ${{ startsWith(inputs.os, 'ubuntu') && 50 || 16 }}
+      TZDIR: ${{ github.workspace }}/absl/time/internal/cctz/testdata/zoneinfo
+      RBE_service: us-east1-remotebuildexecution.googleapis.com:443
+      RBE_instance: projects/google.com:absl-177019/instances/absl-ci-east
+      RBE_use_application_default_credentials: true
+      RBE_exec_strategy: remote
+      RBE_exec_root: ${{ github.workspace }}
+      RBE_platform: OSArch=amd64,cache-silo-key=n2-highcpu-2-2026-10-14,container-image=docker://${{ inputs.container_image }},dockerRunAsRoot=true
       SCCACHE_GCS_BUCKET: absl-cmake-sccache
       SCCACHE_GCS_RW_MODE: READ_WRITE
       SCCACHE_IDLE_TIMEOUT: 0
@@ -98,13 +106,23 @@
           credentials_json: ${{ secrets.GAR_SERVICE_ACCOUNT }}
 
       - name: Set up sccache
+        if: ${{ runner.os != 'Linux' }}
         uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10
 
       - name: Start sccache
+        if: ${{ runner.os != 'Linux' }}
         env:
           SCCACHE_GCS_KEY_PATH: ${{ steps.auth.outputs.credentials_file_path }}
         run: sccache --start-server
 
+      - name: Start reclient (RBE)
+        if: ${{ runner.os == 'Linux' }}
+        run: |
+          # CMake passes absolute source/include paths (${GITHUB_WORKSPACE}/...) to
+          # the compiler, so mount the remote input root at that same container path.
+          echo "RBE_platform=${RBE_platform},InputRootAbsolutePath=${GITHUB_WORKSPACE}" >> "$GITHUB_ENV"
+          bootstrap
+
       - name: Run installation test
         if: ${{ inputs.install_test }}
         env:
@@ -140,9 +158,11 @@
 
       - name: Run tests
         if: ${{ !inputs.install_test }}
-        env:
-          TZDIR: ${{ github.workspace }}/absl/time/internal/cctz/testdata/zoneinfo
         run: >
           ctest --test-dir build
           --repeat until-pass:3
           ${{ runner.os == 'Windows' && '-E "absl_lifetime_test|absl_symbolize_test"' || '' }}
+
+      - name: Stop reclient (RBE)
+        if: ${{ always() && runner.os == 'Linux' }}
+        run: bootstrap --shutdown
diff --git a/CMake/install_test_project/test.sh b/CMake/install_test_project/test.sh
index 2d25696..8f02158 100755
--- a/CMake/install_test_project/test.sh
+++ b/CMake/install_test_project/test.sh
@@ -19,13 +19,18 @@
 # Fail on any error. Treat unset variables an error. Print commands as executed.
 set -euox pipefail
 
+# TODO(b/573304451): Remove once Kokoro is turned down (set in cmake.yml).
+export CMAKE_BUILD_PARALLEL_LEVEL="${CMAKE_BUILD_PARALLEL_LEVEL:-$(nproc)}"
+export CTEST_PARALLEL_LEVEL="${CTEST_PARALLEL_LEVEL:-$(nproc)}"
+
 absl_dir="${PWD}"
-absl_build_dir=/buildfs
+absl_build_dir="${absl_dir}/buildfs/absl-build"
 mkdir -p "${absl_build_dir}"
-googletest_builddir=/googletest_builddir
+googletest_builddir="${absl_dir}/buildfs/googletest"
+googletest_install_dir="${absl_build_dir}/googletest-install"
 googletest_archive="googletest-${ABSL_GOOGLETEST_VERSION}.tar.gz"
 project_dir="${absl_dir}/CMake/install_test_project"
-project_build_dir=/buildfs/project-build
+project_build_dir="${absl_dir}/buildfs/project-build"
 
 build_shared_libs="OFF"
 if [ "${LINK_TYPE:-}" = "DYNAMIC" ]; then
@@ -33,7 +38,7 @@
 fi
 
 # Build and install GoogleTest
-mkdir "${googletest_builddir}"
+mkdir -p "${googletest_builddir}"
 pushd "${googletest_builddir}"
 curl -L "${ABSL_GOOGLETEST_DOWNLOAD_URL}" --output "${googletest_archive}"
 tar -xz -f "${googletest_archive}"
@@ -42,8 +47,7 @@
 pushd build
 cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS="${build_shared_libs}" ..
 cmake --build .
-cmake --install .
-ldconfig
+cmake --install . --prefix "${googletest_install_dir}"
 popd
 popd
 popd
@@ -56,6 +60,7 @@
 cmake "${absl_dir}" \
   -DABSL_USE_EXTERNAL_GOOGLETEST=ON \
   -DABSL_FIND_GOOGLETEST=ON  \
+  -DCMAKE_PREFIX_PATH="${googletest_install_dir}" \
   -DCMAKE_BUILD_TYPE=Release \
   -DABSL_BUILD_TESTING=ON \
   -DBUILD_SHARED_LIBS="${build_shared_libs}" \
@@ -70,8 +75,8 @@
 # Test the project against the installed Abseil
 mkdir -p "${project_build_dir}"
 pushd "${project_build_dir}"
-cmake "${project_dir}"
-cmake --build . --target simple
+env -u CMAKE_C_COMPILER_LAUNCHER -u CMAKE_CXX_COMPILER_LAUNCHER cmake "${project_dir}"
+env -u CMAKE_C_COMPILER_LAUNCHER -u CMAKE_CXX_COMPILER_LAUNCHER cmake --build . --target simple
 
 output="$(${project_build_dir}/simple "printme" 2>&1)"
 if [[ "${output}" != *"Arg 1: printme"* ]]; then
diff --git a/ci/BUILD.bazel b/ci/BUILD.bazel
index c83d079..d000992 100644
--- a/ci/BUILD.bazel
+++ b/ci/BUILD.bazel
@@ -23,7 +23,7 @@
     exec_properties = {
         "OSArch": "amd64",
         "cache-silo-key": "n2-highcpu-2-2026-10-14",
-        "container-image": "docker://gcr.io/google.com/absl-177019/oss-linux-latest@sha256:9f7f104e4857e3528e8bf5f14968183f5a0e786ca9ef63601eae4e4136f011d6",
+        "container-image": "docker://gcr.io/google.com/absl-177019/oss-linux-latest@sha256:84505366948db3ea97c71d0aa384a920e73f6994bb4194d7f80ee77979fd9d58",
         "dockerRunAsRoot": "true",
     },
 )
@@ -37,7 +37,7 @@
     exec_properties = {
         "OSArch": "amd64",
         "cache-silo-key": "n2-highcpu-2-2026-10-14",
-        "container-image": "docker://gcr.io/google.com/absl-177019/oss-linux-floor@sha256:60898eb3b0dbcf85cd60e346f103fbf3169d966d391dcb2362b243d528b1183b",
+        "container-image": "docker://gcr.io/google.com/absl-177019/oss-linux-floor@sha256:a25e596d10b907c8896768196a6e5c8007bac93abb1677ed1fcc186d28afc032",
         "dockerRunAsRoot": "true",
     },
 )
@@ -51,7 +51,7 @@
     exec_properties = {
         "OSArch": "arm64",
         "cache-silo-key": "t2a-standard-4-2026-10-14",
-        "container-image": "docker://gcr.io/google.com/absl-177019/oss-linux-latest@sha256:9f7f104e4857e3528e8bf5f14968183f5a0e786ca9ef63601eae4e4136f011d6",
+        "container-image": "docker://gcr.io/google.com/absl-177019/oss-linux-latest@sha256:84505366948db3ea97c71d0aa384a920e73f6994bb4194d7f80ee77979fd9d58",
         "dockerRunAsRoot": "true",
     },
 )