[ObjC] Move the Xcode CI off full_mac_build.sh

Use the bash GHA to ensure WKTs are current, and then just directly invoke
Xcode. This means the script full_mac_build.sh can go back to just being
a simpler helper for folks doing local builds and we can remove all the extra
support that was needed for CI.

PiperOrigin-RevId: 508762464
pull/11876/head
Protobuf Team Bot 2 years ago committed by Copybara-Service
parent f239739a71
commit 79a4f9476f
  1. 6
      .github/BUILD.bazel
  2. 37
      .github/workflows/test_objectivec.yml

@ -1,5 +1,9 @@
# This information is extracted from the MacOS runner specs located at:
# https://github.com/actions/runner-images/blob/win19/20230129.2/images/macos/macos-12-Readme.md
# https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md
#
# 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 = "version14_2_14C18",
version = "14.2.14C18",

@ -13,20 +13,19 @@ jobs:
strategy:
fail-fast: false # Don't cancel all jobs if one fails.
matrix:
platform: ["macOS", "iOS"]
xc_config: ["Debug", "Release"]
# The "destination" entries need to match what is available for the selected Xcode.
# See `.github/BUILD.bazel` for the Xcode info.
include:
- name: macOS
config: osx
flags: --skip-xcode-ios --skip-xcode-tvos --skip-objc-conformance
# The iOS simulator takes a while to start up, so Debug & Release are run in
# parallel to get the testing done faster.
- name: iOS Debug
config: ios_debug
flags: --skip-xcode-osx --skip-xcode-tvos --skip-objc-conformance --skip-xcode-release
- name: iOS Release
config: ios_release
flags: --skip-xcode-osx --skip-xcode-tvos --skip-objc-conformance --skip-xcode-debug
- platform: "macOS"
destination: "platform=macOS"
xc_project: "ProtocolBuffers_OSX.xcodeproj"
- platform: "iOS"
destination: "platform=iOS Simulator,name=iPhone 13,OS=latest"
xc_project: "ProtocolBuffers_iOS.xcodeproj"
name: Xcode ${{ matrix.name}}
name: Xcode ${{ matrix.platform}} ${{ matrix.xc_config }}
runs-on: macos-12
env:
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
@ -39,18 +38,24 @@ jobs:
- name: Setup ccache
uses: ./.github/actions/ccache
with:
cache-prefix: objectivec_macos_${{ matrix.config }}
cache-prefix: objectivec_${{ matrix.platform }}_${{ matrix.xc_config }}
support-modules: true
- name: Run tests
uses: ./.github/actions/bazel
uses: ./.github/actions/bash
env:
CC: ${{ github.workspace }}/ci/clang_wrapper
CXX: ${{ github.workspace }}/ci/clang_wrapper++
with:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: objectivec_macos/${{ matrix.config }}
bash: objectivec/DevTools/full_mac_build.sh ${{ matrix.flags }}
command: |
xcodebuild \
-project "objectivec/${{ matrix.xc_project }}" \
-scheme ProtocolBuffers \
-configuration ${{ matrix.xc_config }} \
-destination "${{ matrix.destination }}" \
test \
| xcpretty
- name: Report ccache stats
shell: bash

Loading…
Cancel
Save