From 1907624e53bafc2ed25da6817797c2ab2394ce6f Mon Sep 17 00:00:00 2001 From: Steffan Andrews Date: Sat, 9 Nov 2024 20:17:59 -0800 Subject: [PATCH] Updated GitHub CI --- .github/workflows/build.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a92725bc..894755a4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: @@ -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: @@ -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: