From c68058ac05b80d298933fe2a94bde64842bd5e0c Mon Sep 17 00:00:00 2001 From: Mike Kruskal Date: Thu, 22 Oct 2026 15:40:22 -0700 Subject: [PATCH] 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: 1005106568 --- .github/workflows/ci.yml | 2 +- .github/workflows/cmake.yml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca85b8a38fb..d7df937ac0a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -119,7 +119,7 @@ jobs: # 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 diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 82ea88406ea..09d0b7edbe9 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -70,13 +70,13 @@ jobs: 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: ${{ contains(inputs.container_image, 'oss-linux') && 50 || 16 }} - CMAKE_C_COMPILER_LAUNCHER: ${{ contains(inputs.container_image, 'oss-linux') && 'rewrapper' || 'sccache' }} - CMAKE_CXX_COMPILER_LAUNCHER: ${{ contains(inputs.container_image, 'oss-linux') && 'rewrapper' || 'sccache' }} - CMAKE_TEST_LAUNCHER: ${{ contains(inputs.container_image, 'oss-linux') && 'rbe_test_launcher' || '' }} + 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: ${{ contains(inputs.container_image, 'oss-linux') && 50 || 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 @@ -106,17 +106,17 @@ jobs: credentials_json: ${{ secrets.GAR_SERVICE_ACCOUNT }} - name: Set up sccache - if: ${{ !contains(inputs.container_image, 'oss-linux') }} + if: ${{ runner.os != 'Linux' }} uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10 - name: Start sccache - if: ${{ !contains(inputs.container_image, 'oss-linux') }} + if: ${{ runner.os != 'Linux' }} env: SCCACHE_GCS_KEY_PATH: ${{ steps.auth.outputs.credentials_file_path }} run: sccache --start-server - name: Start reclient (RBE) - if: ${{ contains(inputs.container_image, 'oss-linux') }} + 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. @@ -164,5 +164,5 @@ jobs: ${{ runner.os == 'Windows' && '-E "absl_lifetime_test|absl_symbolize_test"' || '' }} - name: Stop reclient (RBE) - if: ${{ always() && contains(inputs.container_image, 'oss-linux') }} + if: ${{ always() && runner.os == 'Linux' }} run: bootstrap --shutdown