Skip to content

Commit

Permalink
fix(swift5): ci: simplify xcodebuild workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultBee committed Oct 21, 2024
1 parent c92de48 commit 99961b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 32 deletions.
18 changes: 2 additions & 16 deletions templates/swift5/statics/client/.github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,10 @@ jobs:
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Set Default Scheme
run: |
scheme_list=$(xcodebuild -list -json | tr -d "\n")
default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['workspace']['schemes'][0]")
echo $default | cat >default
echo Using default scheme: $default
- name: Build Package with xcodebuild
env:
scheme: ${{ 'default' }}
run: |
if [ $scheme = default ]; then scheme=$(cat default); fi
xcodebuild -scheme $scheme -destination 'platform=iOS Simulator,name=iPhone 16'
run: xcodebuild -scheme ApiVideoClient -destination 'platform=iOS Simulator,name=iPhone 16'
- name: Build Example
env:
scheme: ${{ 'default' }}
run: |
if [ $scheme = default ]; then scheme=$(cat default); fi
xcodebuild clean build -project Example/Example.xcodeproj -scheme $scheme -sdk iphoneos
run: xcodebuild clean build -project Example/Example.xcodeproj -scheme ApiVideoClient -sdk iphoneos

cocoapods:
name: Verify cocopods podspec
Expand Down
18 changes: 2 additions & 16 deletions templates/swift5/statics/uploader/.github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,10 @@ jobs:
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Set Default Scheme
run: |
scheme_list=$(xcodebuild -list -json | tr -d "\n")
default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['workspace']['schemes'][0]")
echo $default | cat >default
echo Using default scheme: $default
- name: Build Package with xcodebuild
env:
scheme: ${{ 'default' }}
run: |
if [ $scheme = default ]; then scheme=$(cat default); fi
xcodebuild -scheme $scheme -destination 'platform=iOS Simulator,name=iPhone 16'
run: xcodebuild -scheme ApiVideoUploader -destination 'platform=iOS Simulator,name=iPhone 16'
- name: Build Example
env:
scheme: ${{ 'default' }}
run: |
if [ $scheme = default ]; then scheme=$(cat default); fi
xcodebuild clean build -project Example/Example.xcodeproj -scheme $scheme -sdk iphoneos
run: xcodebuild clean build -project Example/Example.xcodeproj -scheme ApiVideoUploader -sdk iphoneos

cocoapods:
name: Verify cocopods podspec
Expand Down

0 comments on commit 99961b4

Please sign in to comment.