From c076f9d87432bfa49932864d8ee1aaaa76ac8244 Mon Sep 17 00:00:00 2001 From: YoloMao Date: Tue, 19 Mar 2024 20:45:46 -0700 Subject: [PATCH] ci: add visionOS pod lib lint check (#15903) as title Closes #15903 COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/15903 from YoloMao:feat/visionos_support 62474c592c80f4f8afc328e0cc17d589dafe6f50 PiperOrigin-RevId: 617382097 --- .github/BUILD.bazel | 24 ++++++++++++++++++++++-- .github/workflows/test_objectivec.yml | 22 +++++++++++++++------- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/.github/BUILD.bazel b/.github/BUILD.bazel index 6d619f02ef..45297fc116 100644 --- a/.github/BUILD.bazel +++ b/.github/BUILD.bazel @@ -4,9 +4,25 @@ # When updating, also ensure the "xcode_destination" entries in # `.github/workflows/test_objectivec.yml` are supported for the given versions # of Xcode. +xcode_version( + name = "version15_2_15C500b", + aliases = [ + "15C500b", + "15.2", + ], + default_ios_sdk_version = "17.2", + default_macos_sdk_version = "14.2", + default_tvos_sdk_version = "17.2", + default_watchos_sdk_version = "10.2", + version = "15.2.0.15C500b", +) + xcode_version( name = "version14_2_14C18", - aliases = ["14C18"], + aliases = [ + "14C18", + "14.2", + ], default_ios_sdk_version = "16.2", default_macos_sdk_version = "13.1", default_tvos_sdk_version = "16.1", @@ -16,7 +32,10 @@ xcode_version( xcode_version( name = "version14_1_0_14B47b", - aliases = ["14B47b"], + aliases = [ + "14B47b", + "14.1", + ], default_ios_sdk_version = "16.1", default_macos_sdk_version = "13.0", default_tvos_sdk_version = "16.1", @@ -28,6 +47,7 @@ xcode_config( name = "host_xcodes", default = ":version14_2_14C18", versions = [ + ":version15_2_15C500b", ":version14_2_14C18", ":version14_1_0_14B47b", ], diff --git a/.github/workflows/test_objectivec.yml b/.github/workflows/test_objectivec.yml index 8e96a02308..185f596fd4 100644 --- a/.github/workflows/test_objectivec.yml +++ b/.github/workflows/test_objectivec.yml @@ -68,22 +68,30 @@ jobs: strategy: fail-fast: false # Don't cancel all jobs if one fails. matrix: - PLATFORM: ["ios", "macos", "tvos", "watchos"] + PLATFORM: ["ios", "macos", "tvos", "watchos", "visionos"] CONFIGURATION: ["Debug", "Release"] - name: CocoaPods ${{ matrix.PLATFORM}} ${{ matrix.CONFIGURATION}} - runs-on: macos-12 - env: - DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer + include: + - OS: macos-12 + XCODE: "14.1" + - OS: macos-14 + PLATFORM: "visionos" + XCODE: "15.2" + name: CocoaPods ${{ matrix.PLATFORM }} ${{ matrix.CONFIGURATION }} + runs-on: ${{ matrix.OS }} steps: - name: Checkout pending changes uses: protocolbuffers/protobuf-ci/checkout@v2 with: ref: ${{ inputs.safe-checkout }} + - name: Xcode version + run: sudo xcode-select -switch /Applications/Xcode_${{ matrix.XCODE }}.app - name: Pod lib lint - uses: protocolbuffers/protobuf-ci/bash@v2 + uses: protocolbuffers/protobuf-ci/bazel@v2 with: credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} - command: | + bazel-cache: cocoapods/${{ matrix.XCODE }} + bash: | + ./regenerate_stale_files.sh $BAZEL_FLAGS --xcode_version="${{ matrix.XCODE }}" pod lib lint --verbose \ --configuration=${{ matrix.CONFIGURATION }} \ --platforms=${{ matrix.PLATFORM }} \