Skip to content

Commit

Permalink
[chore] add Setup Xcode
Browse files Browse the repository at this point in the history
  • Loading branch information
mrs1669 committed May 20, 2024
1 parent f9f7a8b commit 2a1e805
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/build-working.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build

on:
push:
branches:
branches:
- '**'
- '!main'
- '!develop'
Expand All @@ -13,29 +13,32 @@ jobs:
runs-on: macos-latest

steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Setup Xcode
run: |
sudo xcode-select -switch /Applications/Xcode.app
sudo xcodebuild -runFirstLaunch
sudo xcodebuild -license accept
xcodebuild -version
xcodebuild -showsdks
- name: Checkout
uses: actions/checkout@v4

- name: ci_post_clone
run: |
defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES
- name: Set Default Scheme
run: |
scheme_list=$(xcodebuild -list -json)
echo "$scheme_list"
scheme_list=$(xcodebuild -list -json | tr -d "\n")]¥
default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]")
echo $default | cat >default
echo Using default scheme: $default
- name: Build
env:
scheme: ${{ 'default' }}
platform: ${{ 'iOS Simulator' }}
platform: 'iOS Simulator'
run: |
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
Expand Down

0 comments on commit 2a1e805

Please sign in to comment.