Migrate to swift6 (#25) #97
This file contains hidden or 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 ] | |
env: | |
SCHEME: "swift-user-defaults" | |
XCODEBUILD: set -o pipefail && env NSUnbufferedIO=YES xcodebuild | |
jobs: | |
test-macos: | |
name: Test (macOS, Xcode ${{ matrix.xcode }}) | |
runs-on: ${{ matrix.macos }} | |
env: | |
DEVELOPER_DIR: '/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer' | |
strategy: | |
matrix: | |
xcode: [ 16.4 ] | |
include: | |
- xcode: 16.4 | |
macos: macos-15 | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Test | |
run: ${{ env.XCODEBUILD }} -scheme "${{ env.SCHEME }}" -destination "platform=macOS" clean test | xcbeautify | |
test-ios: | |
name: Test (iOS, Xcode ${{ matrix.xcode }}) | |
runs-on: ${{ matrix.macos }} | |
env: | |
DEVELOPER_DIR: '/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer' | |
strategy: | |
matrix: | |
xcode: [ 16.4 ] | |
include: | |
- xcode: 16.4 | |
macos: macos-15 | |
destination: "platform=iOS Simulator,name=iPhone 16,OS=18.5" | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Test | |
run: ${{ env.XCODEBUILD }} -scheme "${{ env.SCHEME }}" -destination "${{ matrix.destination }}" clean test | xcbeautify | |
test-tvos: | |
name: Test (tvOS, Xcode ${{ matrix.xcode }}) | |
runs-on: ${{ matrix.macos }} | |
strategy: | |
matrix: | |
xcode: [ 16.4 ] | |
include: | |
- xcode: 16.4 | |
macos: macos-15 | |
destination: "platform=tvOS Simulator,name=Apple TV,OS=18.5" | |
env: | |
DEVELOPER_DIR: '/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer' | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Test | |
run: ${{ env.XCODEBUILD }} -scheme "${{ env.SCHEME }}" -destination "${{ matrix.destination }}" clean test | xcbeautify | |
test-watchos: | |
name: Test (watchOS, Xcode ${{ matrix.xcode }}) | |
runs-on: ${{ matrix.macos }} | |
strategy: | |
matrix: | |
xcode: [ 16.4 ] | |
include: | |
- xcode: 16.4 | |
macos: macos-15 | |
destination: "platform=watchOS Simulator,name=Apple Watch Series 10 (42mm),OS=11.5" | |
env: | |
DEVELOPER_DIR: '/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer' | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Test | |
run: ${{ env.XCODEBUILD }} -scheme "${{ env.SCHEME }}" -destination "${{ matrix.destination }}" clean test | xcbeautify | |
example: | |
name: Example Project | |
runs-on: macos-15 | |
env: | |
DEVELOPER_DIR: '/Applications/Xcode_16.4.app/Contents/Developer' | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: UI Test | |
run: ${{ env.XCODEBUILD }} -workspace "Example/Example.xcworkspace" -scheme "Example" -destination "platform=iOS Simulator,name=iPhone 16,OS=18.5" clean test | xcbeautify | |
cocoapods: | |
name: CocoaPods | |
runs-on: macos-15 | |
env: | |
DEVELOPER_DIR: '/Applications/Xcode_16.4.app/Contents/Developer' | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Lint | |
run: make lint |