Skip to content

Update GitHub actions with new Xcode select action #50

Update GitHub actions with new Xcode select action

Update GitHub actions with new Xcode select action #50

Workflow file for this run

name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
swiftpm:
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Select Xcode
uses: MobileDevOps/xcode-select-version-action@v1.0.0
with:
xcode-select-version: "14.2"
- name: SwiftPM Test
run: swift test
pod-lint:
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Select Xcode
uses: MobileDevOps/xcode-select-version-action@v1.0.0
with:
xcode-select-version: "14.2"
- name: Pod Lint
run: pod lib lint --verbose --allow-warnings
test:
runs-on: macos-12
timeout-minutes: 4
env:
LC_CTYPE: en_US.UTF-8
LANG: en_US.UTF-8
FRAMEWORK_NAME: "ReSwift"
strategy:
matrix:
include:
# Latest MacOS Build, with Codecov
- scheme: macOS
xcode: "14.2"
sdk: "macosx13.1"
destination: "platform=macOS"
swift_version: "5.7"
action: test
update_codecov: true
# Latest iOS Build
- scheme: iOS
xcode: "14.2"
sdk: "iphonesimulator15.2"
destination: "OS=16.2,name=iPhone 12 Pro Max"
swift_version: "5.7"
action: test
update_codecov: false
# Latest watchOS Build
- scheme: watchOS
xcode: "14.2"
sdk: "watchsimulator"
destination: "OS=9.1,name=Apple Watch Series 6 - 44mm"
swift_version: "5.7"
action: build
update_codecov: false
# Latest tvOS Build
- scheme: tvOS
xcode: "14.2"
sdk: "appletvsimulator"
destination: "OS=16.2,name=Apple TV 4K"
swift_version: "5.7"
action: test
# Swift 5.2 for backwards compatibility
- scheme: macOS
xcode: "11.7"
sdk: "macosx10.15"
destination: "platform=macOS"
swift_version: "5.2"
action: test
update_codecov: true
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Select Xcode
uses: MobileDevOps/xcode-select-version-action@v1.0.0
with:
xcode-select-version: "${{ matrix.xcode }}"
- name: Build and Test
run: |
xcodebuild \
ONLY_ACTIVE_ARCH=YES \
SWIFT_VERSION=${{ matrix.SWIFT_VERSION }} \
-configuration Debug \
-project "${{ env.FRAMEWORK_NAME }}.xcodeproj" \
-scheme "${{ env.FRAMEWORK_NAME }}-${{ matrix.scheme }}" \
-sdk "${{ matrix.sdk }}" \
-destination "${{ matrix.destination }}" \
${{ matrix.action }}