Skip to content

test

test #1

Workflow file for this run

name: CocoaPods
on:
push:
branches: [ main ]
paths:
- '.github/workflows/cocoapods2.yml'
pull_request:
branches: [ main ]
paths:
- '.github/workflows/cocoapods2.yml'
jobs:
pod-lib-lint-subspecs:
name: CocoaPods lib lint SubSpecs
runs-on: macos-15
strategy:
fail-fast: false
matrix:
pod_configuration: ["Debug", "Release"]
num_chunks: ["3"]
chunk: ["1", "2", "3"]
steps:
- uses: actions/checkout@v4
- name: "macOS"
run: |
set -eu
SUBSPECS=$(sed -n -e 's/[^'']*subspec ''\([^'']*\).*/\1/p' GoogleAPIClientForREST.podspec)
NUM_SUBSPECS=$(echo "${SUBSPECS} | wc -l)
LINES_PER_CHUNK=$((NUM_SUBSPECS / ${{ matrix.num_chunks }}))
START_LINE=$(( (${{ matrix.chunk }} - 1) * LINES_PER_CHUNK + 1 ))
END_LINE=$(( ${{ matrix.chunk }} * LINES_PER_CHUNK ))
if [ "${{ matrix.chunk }}" -eq "${{ matrix.num_chunks }}" ]; then
SED_PATTERN="${START_LINE},$p"
else
SED_PATTERN="${START_LINE},${END_LINE}p""
fi
echo "${SUBSPECS} | sed -n ${SED_PATTERN}