Use Xcode 14.1, 14.3.1 and 15.2 #68
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
name: Checks (Xcode ${{ matrix.xcode }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
xcode: | |
- "15.2" | |
- "14.3.1" | |
- "14.1" | |
include: | |
- xcode: "15.2" | |
macos: macOS-13 | |
destination_ios: "platform=iOS Simulator,name=iPhone 14,OS=17.2" | |
destination_tvos: "platform=tvOS Simulator,name=Apple TV,OS=17.2" | |
destination_watchos: "platform=watchOS Simulator,name=Apple Watch Series 9 (41mm),OS=10.2" | |
- xcode: "14.3.1" | |
macos: macOS-13 | |
destination_ios: "platform=iOS Simulator,name=iPhone 14,OS=16.4" | |
destination_tvos: "platform=tvOS Simulator,name=Apple TV,OS=16.4" | |
destination_watchos: "platform=watchOS Simulator,name=Apple Watch Series 8 (41mm),OS=9.4" | |
- xcode: "14.1" | |
macos: macOS-12 | |
destination_ios: "platform=iOS Simulator,name=iPhone 14,OS=16.1" | |
destination_tvos: "platform=tvOS Simulator,name=Apple TV,OS=16.1" | |
destination_watchos: "platform=watchOS Simulator,name=Apple Watch Series 8 (41mm),OS=9.1" | |
runs-on: ${{ matrix.macos }} | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer | |
SCHEME: swift-user-defaults | |
XCODEBUILD: set -o pipefail && env NSUnbufferedIO=YES xcodebuild | |
steps: | |
- uses: actions/checkout@v2 | |
# Setup Ruby and Bundler | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
# Build library & Run Unit-Tests (macOS) | |
- name: Build & Unit-Test Library (macOS) | |
run: ${{ env.XCODEBUILD }} -scheme $SCHEME -destination "platform=macOS" clean test | xcbeautify | |
# Build library & Run Unit-Tests (iOS) | |
- name: Build & Unit-Test Library (iOS) | |
run: ${{ env.XCODEBUILD }} -scheme $SCHEME -destination "${{ matrix.destination_ios }}" clean test | xcbeautify | |
# Build library & Run Unit-Tests (watchOS) | |
- name: Build & Unit-Test Library (watchOS) | |
run: ${{ env.XCODEBUILD }} -scheme $SCHEME -destination "${{ matrix.destination_watchos }}" clean test | xcbeautify | |
# Build library & Run Unit-Tests (tvOS) | |
- name: Build & Unit-Test Library (tvOS) | |
run: ${{ env.XCODEBUILD }} -scheme $SCHEME -destination "${{ matrix.destination_tvos }}" clean test | xcbeautify | |
# Build Example Project & Run UI-Tests (iOS) | |
- name: Build & UI-Test Example Project (iOS) | |
run: ${{ env.XCODEBUILD }} -workspace "Example/Example.xcworkspace" -scheme "Example" -destination "${{ matrix.destination_ios }}" clean test | xcbeautify | |
# Verify CocoaPods | |
- name: Verify CocoaPods | |
run: bundle exec pod lib lint |