Merge pull request #173 from BottleRocketStudios/release/5.1.0 #134
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: Main | |
on: | |
push: | |
branches: [ main, release/*] | |
pull_request: | |
jobs: | |
Build: | |
runs-on: macos-12 | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer | |
workspace: "Hyperspace.xcworkspace" | |
strategy: | |
fail-fast: false | |
matrix: | |
name: ["iOS", "tvOS", "watchOS", "macOS"] | |
include: | |
- name: "iOS" | |
scheme: "Hyperspace iOS" | |
destination: "platform=iOS Simulator,OS=16.0,name=iPhone 12 Pro" | |
test: true | |
- name: "tvOS" | |
scheme: "Hyperspace tvOS" | |
destination: "platform=tvOS Simulator,OS=16.0,name=Apple TV" | |
test: true | |
- name: "watchOS" | |
scheme: "Hyperspace watchOS" | |
destination: "platform=watchOS Simulator,OS=9.0,name=Apple Watch Series 6 (44mm)" | |
test: true | |
- name: "macOS" | |
scheme: "Hyperspace macOS" | |
destination: "arch=x86_64" | |
test: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Build and Test | |
run: > | |
if [[ ${{ matrix.test }} == true ]]; then | |
xcodebuild test \ | |
-workspace ${{ env.workspace }} \ | |
-scheme "${{ matrix.scheme }}" \ | |
-destination "${{ matrix.destination }}" \ | |
ONLY_ACTIVE_ARCH=NO -enableCodeCoverage YES || exit 1 | |
else | |
xcodebuild \ | |
-workspace ${{ env.workspace }} \ | |
-scheme "${{ matrix.scheme }}" \ | |
-destination "${{ matrix.destination }}" \ | |
ONLY_ACTIVE_ARCH=NO || exit 1 | |
fi | |
Lint: | |
runs-on: macos-12 | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer | |
cocoapods: true | |
spm: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# Temporarily disabled watchOS linting using --platforms option | |
- name: Lint | |
run: > | |
if [[ ${{ env.spm }} == true ]]; then | |
swift package describe | |
fi | |
if [[ ${{ env.cocoapods }} == true ]]; then | |
pod lib lint --platforms=ios,macos,tvos | |
fi |