SwiftUI-Introspect/.github/workflows/ci.yml

106 lines
2.9 KiB
YAML

name: ci
on:
push:
branches:
- master
pull_request:
branches:
- "**"
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-podspec:
name: lint podspec
runs-on: macos-latest
steps:
- name: Git Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # required to be able to find Git tags
- name: Lint Podspec
run: |
set -eo pipefail
export LIB_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
pod lib lint --allow-warnings
ci:
name: ${{ matrix.platform[0] }} ${{ matrix.platform[1] }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
platform:
- [ios, 14]
- [ios, 15]
- [ios, 16]
- [tvos, 14]
- [tvos, 15]
- [tvos, 16]
- [macos, 11]
- [macos, 12]
include:
- platform: [ios, 14]
os: macos-11
xcode_version: 13.2.1
sdk: [12.5.1, iPhoneOS, iOS, 14.5]
- platform: [tvos, 14]
os: macos-11
xcode_version: 13.2.1
sdk: [12.5.1, AppleTVOS, tvOS, 14.5]
- platform: [ios, 15]
os: macos-12
xcode_version: 14.2
sdk: [13.4.1, iPhoneOS, iOS, 15.5]
- platform: [tvos, 15]
os: macos-12
xcode_version: 14.2
sdk: [13.4.1, AppleTVOS, tvOS, 15.5]
- platform: [ios, 16]
os: macos-12
xcode_version: 14.2
- platform: [tvos, 16]
os: macos-12
xcode_version: 14.2
- platform: [macos, 11]
os: macos-11
xcode_version: 13.2.1
- platform: [macos, 12]
os: macos-12
xcode_version: 14.2
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Select Xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode_version }}
- if: ${{ matrix.sdk }}
name: Symlink SDK
run: |
echo "Creating Runtimes folder if needed..."
sudo mkdir -p /Library/Developer/CoreSimulator/Profiles/Runtimes
echo "Creating symlink of the ${{ matrix.sdk[2] }} ${{ matrix.sdk[3] }} runtime..."
sudo ln -s /Applications/Xcode_${{ matrix.sdk[0] }}.app/Contents/Developer/Platforms/${{ matrix.sdk[1] }}.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/${{ matrix.sdk[2] }}.simruntime /Library/Developer/CoreSimulator/Profiles/Runtimes/${{ matrix.sdk[2] }}\ ${{ matrix.sdk[3] }}.simruntime
- name: Install Homebrew dependencies
run: brew install xcbeautify
- name: Run Tests
run: fastlane test platform:${{ matrix.platform[0] }} version:${{ matrix.platform[1] }}
env:
SKIP_SLOW_FASTLANE_WARNINGS: 1
FASTLANE_SKIP_UPDATE_CHECK: 1