Skip to content

Commit

Permalink
Update build-ios.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
loay-ashraf committed Aug 24, 2023
1 parent c5f5e43 commit 6a90e1f
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,24 @@ jobs:
strategy:
matrix:
destination: ['generic/platform=iOS Simulator',
'generic/platform=iOS',
'generic/platform=macOS']
'generic/platform=iOS']

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Xcode Version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Checkout
uses: actions/checkout@v3
- name: Set Default Scheme
- name: Build Framework
env:
scheme: RxNetworkKit
destination: ${{ matrix.destination }}
run: |
scheme_list=$(xcodebuild -list -json | tr -d "\n")
default=RxNetworkKit
echo $default | cat >default
echo Using default scheme: $default
- name: Build
xcodebuild clean build -scheme '${scheme}' -destination '${destination}' | xcpretty && exit ${PIPESTATUS[0]}
- name: Build Example
env:
scheme: ${{ 'default' }}
scheme: iOS Example
destination: ${{ matrix.destination }}
run: |
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 clean build analyze -scheme "$scheme" -destination "${destination}" -"$filetype_parameter" "$file_to_build" | xcpretty && exit ${PIPESTATUS[0]}
xcodebuild clean build -scheme '${scheme}' -destination '${destination}' | xcpretty && exit ${PIPESTATUS[0]}

0 comments on commit 6a90e1f

Please sign in to comment.