Update CocoaPods, support new Xcode, drop iOS 11 support #77
Workflow file for this run
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_version }}) | |
runs-on: macos-11 | |
env: | |
SCHEME: "swift-user-defaults" | |
DEVELOPER_DIR: '/Applications/Xcode_${{ matrix.xcode_version }}.app/Contents/Developer' | |
strategy: | |
matrix: | |
xcode_version: ['12.5', '13.1'] | |
include: | |
- xcode_version: '12.5' | |
destination_ios: 'OS=14.5,name=iPhone 12' | |
destination_macos: 'platform=macOS' | |
destination_watchos: 'OS=7.4,name=Apple Watch Series 6 - 44mm' | |
destination_tvos: 'OS=14.5,name=Apple TV' | |
- xcode_version: '13.1' | |
destination_ios: 'OS=15.0,name=iPhone 13' | |
destination_macos: 'platform=macOS' | |
destination_watchos: 'OS=8.0,name=Apple Watch Series 7 - 45mm' | |
destination_tvos: 'OS=15.0,name=Apple TV' | |
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: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme $SCHEME -destination "${{ matrix.destination_macos }}" clean test | bundle exec xcpretty | |
# Build library & Run Unit-Tests (iOS) | |
- name: Build & Unit-Test Library (iOS) | |
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme $SCHEME -destination "${{ matrix.destination_ios }}" clean test | bundle exec xcpretty | |
# Build library & Run Unit-Tests (watchOS) | |
- name: Build & Unit-Test Library (watchOS) | |
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme $SCHEME -destination "${{ matrix.destination_watchos }}" clean test | bundle exec xcpretty | |
# Build library & Run Unit-Tests (tvOS) | |
- name: Build & Unit-Test Library (tvOS) | |
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme $SCHEME -destination "${{ matrix.destination_tvos }}" clean test | bundle exec xcpretty | |
# Build Example Project & Run UI-Tests (iOS) | |
- name: Build & UI-Test Example Project (iOS) | |
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "Example/Example.xcworkspace" -scheme "Example" -destination "${{ matrix.destination_ios }}" clean test | bundle exec xcpretty | |
# Verify CocoaPods | |
- name: Verify CocoaPods | |
run: bundle exec pod lib lint |