Skip to content

Fix macOS Showcase (#480) #1110

Fix macOS Showcase (#480)

Fix macOS Showcase (#480) #1110

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- "**"
schedule:
- cron: "3 3 * * 2" # 3:03 AM, every Tuesday
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-podspec:
name: Lint Podspec
runs-on: macos-15
steps:
- name: Git Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # required to be able to find Git tags
- name: Select Xcode version
run: sudo xcodes select 16.4
- name: Install Runtimes
uses: nick-fields/retry@v3
with:
timeout_minutes: 15
max_attempts: 3
command: xcodebuild -downloadAllPlatforms
- name: Lint Podspec
run: |
set -eo pipefail
export LIB_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
pod lib lint SwiftUIIntrospect.podspec --allow-warnings
ci:
name: ${{ matrix.platform[0] }} ${{ matrix.platform[1] }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- platform: [iOS, 15]
runtime: iOS 15.5
os: macos-15
xcode: 26.0
- platform: [iOS, 16]
runtime: iOS 16.4
os: macos-15
xcode: 26.0
- platform: [iOS, 17]
runtime: iOS 17.5
os: macos-15
xcode: 26.0
- platform: [iOS, 18]
runtime: iOS 18.6
os: macos-15
xcode: 26.0
- platform: [iOS, 26]
runtime: iOS 26.0
os: macos-15
xcode: 26.0
- platform: [tvOS, 15]
runtime: tvOS 15.4
os: macos-15
xcode: 26.0
- platform: [tvOS, 16]
runtime: tvOS 16.4
os: macos-15
xcode: 26.0
- platform: [tvOS, 17]
runtime: tvOS 17.5
os: macos-15
xcode: 26.0
- platform: [tvOS, 18]
runtime: tvOS 18.5
os: macos-15
xcode: 26.0
- platform: [tvOS, 26]
runtime: tvOS 26.0
os: macos-15
xcode: 26.0
- platform: [watchOS, 8]
runtime: watchOS 8.5
os: macos-15
xcode: 26.0
- platform: [watchOS, 9]
runtime: watchOS 9.4
os: macos-15
xcode: 26.0
- platform: [watchOS, 10]
runtime: watchOS 10.5
os: macos-15
xcode: 26.0
- platform: [watchOS, 11]
runtime: watchOS 11.5
os: macos-15
xcode: 26.0
- platform: [watchOS, 26]
runtime: watchOS 26.0
os: macos-15
xcode: 26.0
- platform: [macOS, 15]
runtime: macOS 15
os: macos-15
xcode: 26.0
# - platform: [macOS, 26]
# runtime: macOS 26.0
# os: macos-26
# xcode: 26.0
- platform: [visionOS, 1]
runtime: visionOS 1.2
os: macos-15
xcode: 26.0
- platform: [visionOS, 2]
runtime: visionOS 2.5
os: macos-15
xcode: 26.0
- platform: [visionOS, 26]
runtime: visionOS 26.0
os: macos-15
xcode: 26.0
steps:
- name: Git Checkout
uses: actions/checkout@v4
- name: Set environment variables
run: echo "SKIP_SLOW_FASTLANE_WARNING=1" >> $GITHUB_ENV
- if: ${{ matrix.platform[0] != 'macOS' }}
name: Check for ${{ matrix.runtime }} runtime
run: |
if xcrun simctl list runtimes | grep -q "${{ matrix.runtime }}"; then
echo "has_runtime=true" >> "$GITHUB_ENV"
else
echo "has_runtime=false" >> "$GITHUB_ENV"
fi
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcodes select ${{ matrix.xcode }}
- if: ${{ matrix.xcode == '26.0' && matrix.platform[0] != 'macOS' }}
name: Install 2026 Runtime
uses: nick-fields/retry@v3
with:
timeout_minutes: 15
max_attempts: 3
command: xcodebuild -downloadPlatform ${{ matrix.platform[0] }}
- if: env.has_runtime == 'false'
name: "List Downloadable Runtimes"
run: xcodes runtimes --include-betas
- if: env.has_runtime == 'false'
name: Install Required Runtime (${{ matrix.runtime }})
uses: nick-fields/retry@v3
with:
timeout_minutes: 15
max_attempts: 3
command: sudo xcodes runtimes install '${{ matrix.runtime }}'
- name: "List Available Runtimes, Simulators, and Destinations"
run: |
xcrun simctl list
xcodebuild -scheme "SwiftUIIntrospect" -showdestinations
- if: ${{ matrix.platform[0] != 'watchOS' }}
name: Build Showcase
run: fastlane build platform:${{ matrix.platform[0] }} version:${{ matrix.platform[1] }} scheme:Showcase
- if: ${{ matrix.platform[0] == 'watchOS' }}
name: Build Library
run: fastlane build platform:${{ matrix.platform[0] }} version:${{ matrix.platform[1] }} scheme:SwiftUIIntrospect
- if: ${{ matrix.platform[0] != 'watchOS' }}
name: Run Tests
run: fastlane test platform:${{ matrix.platform[0] }} version:${{ matrix.platform[1] }} scheme:SwiftUIIntrospectTests configuration:Debug
framework-archiving:
name: Archive Framework (${{ matrix.platform }})
runs-on: macos-15
strategy:
fail-fast: false
matrix:
platform: [iOS, macOS, tvOS, watchOS, visionOS, macCatalyst]
include:
- platform: iOS
destination: "generic/platform=iOS"
- platform: macOS
destination: "generic/platform=macOS"
- platform: tvOS
destination: "generic/platform=tvOS"
- platform: watchOS
destination: "generic/platform=watchOS"
- platform: visionOS
destination: "generic/platform=visionOS"
- platform: macCatalyst
destination: "platform=macOS,variant=Mac Catalyst"
steps:
- name: Git Checkout
uses: actions/checkout@v4
- name: Select Xcode version
run: sudo xcodes select 16.4
- name: Archive Framework
run: |
xcodebuild archive \
-scheme "SwiftUIIntrospectTestFramework" \
-destination "${{ matrix.destination }}" \
-archivePath .build/archiving/${{ matrix.platform }} \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES