[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/11943/head
Protobuf Team Bot 2 years ago committed by Mike Kruskal
parent 746594a746
commit c120cdc527
  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: # 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( xcode_version(
name = "version14_2_14C18", name = "version14_2_14C18",
version = "14.2.14C18", version = "14.2.14C18",

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

Loading…
Cancel
Save