Skip to content

Commit

Permalink
Updated GitHub CI
Browse files Browse the repository at this point in the history
  • Loading branch information
orchetect committed Nov 10, 2024
1 parent 02f05d9 commit 1907624
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ jobs:
xcode-version: latest-stable
- name: Build
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TimecodeKit-CI" -destination "generic/platform=iOS Simulator,name=Any iOS Device" | xcpretty && exit ${PIPESTATUS[0]}
- name: Destination Device Name
run: destName=$(xcodebuild -showdestinations -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TimecodeKit-CI" | perl -nle 'if (m/iOS\sSimulator.*(iPhone.*)\s\}\.*/g) { print $1; }' | head -n 1)
- name: Unit Tests
run: destName=$(xcodebuild -showdestinations -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TimecodeKit-CI" | perl -nle 'if (m/iOS\sSimulator.*(iPhone.*)\s\.*/g) { print $1; }' | head -n 1)
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TimecodeKit-CI" -destination "platform=iOS Simulator,name=${destName}" | xcpretty && exit ${PIPESTATUS[0]}

tvOS:
Expand All @@ -73,8 +74,9 @@ jobs:
xcode-version: latest-stable
- name: Build
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TimecodeKit-CI" -destination "generic/platform=tvOS Simulator,name=Any tvOS Simulator Device" | xcpretty && exit ${PIPESTATUS[0]}
- name: Destination Device Name
run: destName=$(xcodebuild -showdestinations -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TimecodeKit-CI" | perl -nle 'if (m/tvOS\sSimulator.*(Apple\sTV.*)\s\}\.*/g) { print $1; }' | head -n 1)
- name: Unit Tests
run: destName=$(xcodebuild -showdestinations -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TimecodeKit-CI" | perl -nle 'if (m/tvOS\sSimulator.*(Apple\sTV.*)\s\.*/g) { print $1; }' | head -n 1)
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TimecodeKit-CI" -destination "platform=tvOS Simulator,name=${destName}" | xcpretty && exit ${PIPESTATUS[0]}

watchOS:
Expand All @@ -87,8 +89,9 @@ jobs:
xcode-version: latest-stable
- name: Build
run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TimecodeKit-CI" -destination "generic/platform=watchOS Simulator,name=Any watchOS Simulator Device" | xcpretty && exit ${PIPESTATUS[0]}
- name: Destination Device Name
run: destName=$(xcodebuild -showdestinations -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TimecodeKit-CI" | perl -nle 'if (m/watchOS\sSimulator.*(Apple\sWatch.*)\s\}\.*/g) { print $1; }' | head -n 1)
- name: Unit Tests
run: destName=$(xcodebuild -showdestinations -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TimecodeKit-CI" | perl -nle 'if (m/watchOS\sSimulator.*(Apple\sWatch.*)\s\.*/g) { print $1; }' | head -n 1)
run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "TimecodeKit-CI" -destination "platform=watchOS Simulator,name=${destName}" | xcpretty && exit ${PIPESTATUS[0]}

examples:
Expand Down

0 comments on commit 1907624

Please sign in to comment.