File: test_objectivec.yml

package info (click to toggle)
protobuf 3.25.7-1
  • links: PTS
  • area: main
  • in suites: experimental
  • size: 46,004 kB
  • sloc: cpp: 204,412; java: 88,198; ansic: 81,264; objc: 58,434; cs: 27,303; python: 22,841; php: 11,408; ruby: 8,637; pascal: 3,333; xml: 2,333; sh: 1,331; makefile: 538; lisp: 86; awk: 17
file content (129 lines) | stat: -rw-r--r-- 4,461 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
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

permissions:
  contents: read

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 14,OS=latest"
          xc_project: "ProtocolBuffers_iOS.xcodeproj"

    name: Xcode ${{ matrix.platform}} ${{ matrix.xc_config }}
    runs-on: macos-13
    env:
      DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
    steps:
      - name: Checkout pending changes
        uses: protocolbuffers/protobuf-ci/checkout@v2
        with:
          ref: ${{ inputs.safe-checkout }}

      - name: Setup ccache
        uses: protocolbuffers/protobuf-ci/ccache@v2
        with:
          cache-prefix: objectivec_${{ matrix.platform }}_${{ matrix.xc_config }}
          support-modules: true

      - name: Run tests
        uses: protocolbuffers/protobuf-ci/bash@v2
        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-13
    env:
      DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
    steps:
      - name: Checkout pending changes
        uses: protocolbuffers/protobuf-ci/checkout@v2
        with:
          ref: ${{ inputs.safe-checkout }}
      - name: Pod lib lint
        uses: protocolbuffers/protobuf-ci/bash@v2
        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:
        config:
          - name: Optimized
            flags: --config=opt
            bazel_action: test
          - name: Debug
            flags: --config=dbg
            bazel_action: test
          # Current github runners are all Intel based, so just build/compile
          # for Apple Silicon to detect issues there.
          - name: Apple_Silicon_Optimized
            flags: --config=opt --cpu=darwin_arm64
            bazel_action: build
          - name: Apple_Silicon_Debug
            flags: --config=dbg --cpu=darwin_arm64
            bazel_action: build
        # TODO: Could add iOS to atleast build the objc_library targets for that.
        platform: ["macOS"]
        include:
        - platform: "macOS"
          bazel_targets: //objectivec/...
    name: Bazel ${{ matrix.platform }} ${{ matrix.config.name }}
    runs-on: macos-13
    steps:
      - name: Checkout pending changes
        uses: protocolbuffers/protobuf-ci/checkout@v2
        with:
          ref: ${{ inputs.safe-checkout }}
      - name: bazel ${{ matrix.config.bazel_action }}
        uses: protocolbuffers/protobuf-ci/bazel@v2
        with:
          credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
          bazel: ${{ matrix.config.bazel_action }} ${{ matrix.config.flags }} ${{ matrix.bazel_targets }}
          bazel-cache: objc_${{ matrix.platform }}_${{ matrix.config.name }}