From 2fdec2a0dfefd3b42ed3516f6ad5b86b57f264ce Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Tue, 18 Apr 2023 06:54:41 -0700 Subject: [PATCH] Set up C++ macOS bazel coverage for Apple Silicon This is inspired by https://github.com/protocolbuffers/protobuf/issues/12306, but does not show those failures, so clearly it doesn't catch everything, but figured some coverage is better than none. PiperOrigin-RevId: 525134469 --- .github/workflows/test_cpp.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_cpp.yml b/.github/workflows/test_cpp.yml index d43d20af87..4811876508 100644 --- a/.github/workflows/test_cpp.yml +++ b/.github/workflows/test_cpp.yml @@ -207,10 +207,18 @@ jobs: include: - name: MacOS os: macos-12 - bazel: //src/... + cache_key: macos-12 + bazel: test //src/... + - name: MacOS Apple Silicon (build only) + os: macos-12 + cache_key: macos-12-arm + # Current github runners are all Intel based, so just build/compile + # for Apple Silicon to detect issues there. + bazel: build --cpu=darwin_arm64 //src/... - name: Windows os: windows-2019 - bazel: //src/... @com_google_protobuf_examples//... --test_tag_filters=-conformance --build_tag_filters=-conformance + cache_key: windows-2019 + bazel: test //src/... @com_google_protobuf_examples//... --test_tag_filters=-conformance --build_tag_filters=-conformance name: ${{ matrix.name }} Bazel runs-on: ${{ matrix.os }} steps: @@ -222,8 +230,8 @@ jobs: uses: protocolbuffers/protobuf-ci/bazel@v1 with: credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} - bazel: test ${{ matrix.bazel }} - bazel-cache: cpp_${{ matrix.os }} + bazel: ${{ matrix.bazel }} + bazel-cache: cpp_${{ matrix.cache_key }} non-linux-cmake: strategy: