Skip to content

Commit

Permalink
Update swift.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jsangyun authored Nov 23, 2023
1 parent 277215a commit e1f0955
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,7 @@ jobs:
echo $default | cat >default
echo Using default scheme: $default
- name: Build
env:
scheme: ${{ 'default' }}
platform: ${{ 'iOS Simulator' }}
run: |
# xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959)
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"`
if [ $scheme = default ]; then scheme=$(cat default); fi
if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi
file_to_build=`echo $file_to_build | awk '{$1=$1;print}'`
xcodebuild build-for-testing -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device" -skipPackagePluginValidation -skipMacroValidation
xcodebuild clean test -project ./iOS/Village.xcodeproj \
-scheme Village \
-destination 'platform=iOS Simulator,name=iPhone 13,OS=latest'

0 comments on commit e1f0955

Please sign in to comment.