Protocol Buffers - Google's data interchange format (grpc依赖)
https://developers.google.com/protocol-buffers/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
110 lines
3.6 KiB
110 lines
3.6 KiB
name: Objective-C Tests |
|
|
|
on: |
|
workflow_call: |
|
inputs: |
|
safe-checkout: |
|
required: true |
|
description: "The SHA key for the commit we want to run over" |
|
type: string |
|
|
|
jobs: |
|
xcode: |
|
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: |
|
- 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.platform}} ${{ matrix.xc_config }} |
|
runs-on: macos-12 |
|
env: |
|
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer |
|
steps: |
|
- name: Checkout pending changes |
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 |
|
with: |
|
ref: ${{ inputs.safe-checkout }} |
|
|
|
- name: Setup ccache |
|
uses: ./.github/actions/ccache |
|
with: |
|
cache-prefix: objectivec_${{ matrix.platform }}_${{ matrix.xc_config }} |
|
support-modules: true |
|
|
|
- name: Run tests |
|
uses: ./.github/actions/bash |
|
env: |
|
CC: ${{ github.workspace }}/ci/clang_wrapper |
|
CXX: ${{ github.workspace }}/ci/clang_wrapper++ |
|
with: |
|
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} |
|
command: | |
|
xcodebuild \ |
|
-project "objectivec/${{ matrix.xc_project }}" \ |
|
-scheme ProtocolBuffers \ |
|
-configuration ${{ matrix.xc_config }} \ |
|
-destination "${{ matrix.destination }}" \ |
|
test \ |
|
| xcpretty |
|
|
|
- name: Report ccache stats |
|
shell: bash |
|
run: ccache -s -v |
|
|
|
pod-lib-lint: |
|
strategy: |
|
fail-fast: false # Don't cancel all jobs if one fails. |
|
matrix: |
|
# Add back 'watchos'. See CocoaPods/CocoaPods#11558 |
|
PLATFORM: ["ios", "macos", "tvos"] |
|
CONFIGURATION: ["Debug", "Release"] |
|
name: CocoaPods ${{ matrix.PLATFORM}} ${{ matrix.CONFIGURATION}} |
|
runs-on: macos-12 |
|
env: |
|
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer |
|
steps: |
|
- name: Checkout pending changes |
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 |
|
with: |
|
ref: ${{ inputs.safe-checkout }} |
|
- name: Pod lib lint |
|
uses: ./.github/actions/bash |
|
with: |
|
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} |
|
command: | |
|
pod lib lint --verbose \ |
|
--configuration=${{ matrix.CONFIGURATION }} \ |
|
--platforms=${{ matrix.PLATFORM }} \ |
|
Protobuf.podspec |
|
|
|
bazel: |
|
strategy: |
|
fail-fast: false # Don't cancel all jobs if one fails. |
|
matrix: |
|
include: |
|
# TODO: Could add iOS to atleast build the objc_library targets for that. |
|
- name: macOS |
|
bazel: //objectivec/... |
|
name: Bazel ${{ matrix.name }} |
|
runs-on: macos-12 |
|
steps: |
|
- name: Checkout pending changes |
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 |
|
with: |
|
ref: ${{ inputs.safe-checkout }} |
|
- name: Run tests |
|
uses: ./.github/actions/bazel |
|
with: |
|
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} |
|
bazel: test ${{ matrix.bazel }} |
|
bazel-cache: objc_${{ matrix.name }}
|
|
|