Skip to content

Commit

Permalink
Updated GitHub CI
Browse files Browse the repository at this point in the history
  • Loading branch information
orchetect committed Dec 1, 2023
1 parent 9c67f24 commit efa708e
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,59 +29,69 @@ jobs:
steps:
- uses: actions/checkout@main
- name: Build
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "generic/platform=macOS,name=Any Mac"
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "generic/platform=macOS,name=Any Mac" | xcpretty && exit ${PIPESTATUS[0]}
- name: Unit Tests
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "platform=macOS"
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "platform=macOS" | xcpretty && exit ${PIPESTATUS[0]}

macOS-12:
name: macOS 12 Monterey
runs-on: macos-12
steps:
- uses: actions/checkout@main
- name: Build
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "generic/platform=macOS,name=Any Mac"
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "generic/platform=macOS,name=Any Mac" | xcpretty && exit ${PIPESTATUS[0]}
- name: Unit Tests
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "platform=macOS"
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "platform=macOS" | xcpretty && exit ${PIPESTATUS[0]}

macOS-13:
name: macOS 13 Ventura
runs-on: macos-13
steps:
- uses: actions/checkout@main
- name: Build
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "generic/platform=macOS,name=Any Mac" | xcpretty && exit ${PIPESTATUS[0]}
- name: Unit Tests
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "platform=macOS" | xcpretty && exit ${PIPESTATUS[0]}

macCatalyst:
name: macCatalyst
runs-on: macos-latest
steps:
- uses: actions/checkout@main
- name: Build
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "generic/platform=macOS,variant=Mac Catalyst,name=Any Mac"
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "generic/platform=macOS,variant=Mac Catalyst,name=Any Mac" | xcpretty && exit ${PIPESTATUS[0]}
- name: Unit Tests
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "platform=macOS,variant=Mac Catalyst"
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "platform=macOS,variant=Mac Catalyst" | xcpretty && exit ${PIPESTATUS[0]}

iOS:
name: iOS
runs-on: macos-latest # this must be macos, GitHub does not offer iOS directly but we can use xcodebuild
steps:
- uses: actions/checkout@main
- name: iPhone 12 Simulator - Build
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "generic/platform=iOS Simulator,name=Any iOS Device"
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "generic/platform=iOS Simulator,name=Any iOS Device" | xcpretty && exit ${PIPESTATUS[0]}
- name: iPhone 12 Simulator - Unit Tests
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "platform=iOS Simulator,name=iPhone 12"
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "platform=iOS Simulator,name=iPhone 12" | xcpretty && exit ${PIPESTATUS[0]}

tvOS:
name: tvOS
runs-on: macos-latest # this must be macos, GitHub does not offer tvOS directly but we can use xcodebuild
steps:
- uses: actions/checkout@main
- name: Apple TV - Build
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "generic/platform=tvOS Simulator,name=Any tvOS Simulator Device"
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "generic/platform=tvOS Simulator,name=Any tvOS Simulator Device" | xcpretty && exit ${PIPESTATUS[0]}
- name: Apple TV - Unit Tests
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "platform=tvOS Simulator,name=Apple TV 4K (2nd generation)"
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "platform=tvOS Simulator,name=Apple TV 4K (2nd generation)" | xcpretty && exit ${PIPESTATUS[0]}

watchOS:
name: watchOS
runs-on: macos-latest # this must be macos, GitHub does not offer watchOS directly but we can use xcodebuild
steps:
- uses: actions/checkout@main
- name: Apple Watch - Build
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "generic/platform=watchOS Simulator,name=Any watchOS Simulator Device"
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "generic/platform=watchOS Simulator,name=Any watchOS Simulator Device" | xcpretty && exit ${PIPESTATUS[0]}
- name: Apple Watch - Unit Tests
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "platform=watchOS Simulator,name=Apple Watch Series 8 (45mm)"
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "OTCore-CI" -destination "platform=watchOS Simulator,name=Apple Watch Series 8 (45mm)" | xcpretty && exit ${PIPESTATUS[0]}

# xcodebuild test reference:
# https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/testing_with_xcode/chapters/08-automation.html

0 comments on commit efa708e

Please sign in to comment.