-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6002f87
commit 4e824bb
Showing
79 changed files
with
83 additions
and
1,071 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,66 @@ | ||
name: Build | ||
|
||
on: [push] | ||
|
||
on: | ||
- push | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: macos-latest | ||
find_schemes: | ||
name: Find xcode schemes | ||
runs-on: macos-14 | ||
outputs: | ||
schemes: ${{ steps.getSchemes.outputs.schemes}} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: xcode version | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: latest-stable | ||
- name: Get schemes | ||
id: getSchemes | ||
run: | | ||
TARGETS=$(xcodebuild -list -json | tr -d "\n") | ||
SCHEMES=$(echo $TARGETS | ruby -e "require 'json'; puts JSON.generate(:scheme => JSON.parse(STDIN.gets)['project']['schemes'])") | ||
echo Found schemes: $SCHEMES | ||
echo "schemes=$SCHEMES" >> $GITHUB_OUTPUT | ||
swift_build: | ||
name: Build with swift | ||
runs-on: macos-14 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: xcode version | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: latest-stable | ||
- name: Build Package with swift | ||
run: swift build | ||
- 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 13' | ||
xcode_build: | ||
name: Build with xcode | ||
needs: find_schemes | ||
runs-on: macos-14 | ||
strategy: | ||
matrix: ${{ fromJson(needs.find_schemes.outputs.schemes) }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: xcode version | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: latest-stable | ||
- name: Build ${{matrix.scheme}} | ||
run: xcodebuild clean build -project ApiVideoPlayer.xcodeproj -scheme "${{matrix.scheme}}" -sdk iphoneos CODE_SIGNING_ALLOWED=NO | ||
verify: | ||
name: Verify package sanity | ||
runs-on: macos-14 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: xcode version | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: latest-stable | ||
- name: Verify cocoapods | ||
run: pod lib lint --allow-warnings | ||
- name: Install swiftlint | ||
run: brew install swiftlint | ||
- name: Execute swiftlint | ||
run: swiftlint | ||
- name: Build Example UIKit | ||
env: | ||
scheme: ${{ 'default' }} | ||
run: | | ||
if [ $scheme = default ]; then scheme=$(cat default); fi | ||
xcodebuild clean build -project Examples/PlayerUIKit/PlayerUIKit.xcodeproj -scheme $scheme -sdk iphoneos | ||
- name: Build Example SwiftUI | ||
env: | ||
scheme: ${{ 'default' }} | ||
run: | | ||
if [ $scheme = default ]; then scheme=$(cat default); fi | ||
xcodebuild clean build -project Examples/PlayerSwiftUI/PlayerSwiftUI.xcodeproj -scheme $scheme -sdk iphoneos |
Oops, something went wrong.