Skip to content

Commit 4e824bb

Browse files
committed
chore(*): use a global pbxproj
1 parent 6002f87 commit 4e824bb

File tree

79 files changed

+83
-1071
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+83
-1071
lines changed

.github/workflows/build.yml

Lines changed: 52 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,66 @@
11
name: Build
2-
3-
on: [push]
4-
2+
on:
3+
- push
54
jobs:
6-
build:
7-
name: Build
8-
runs-on: macos-latest
5+
find_schemes:
6+
name: Find xcode schemes
7+
runs-on: macos-14
8+
outputs:
9+
schemes: ${{ steps.getSchemes.outputs.schemes}}
910
steps:
1011
- name: Checkout
11-
uses: actions/checkout@v3
12+
uses: actions/checkout@v4
13+
- name: xcode version
14+
uses: maxim-lobanov/setup-xcode@v1
15+
with:
16+
xcode-version: latest-stable
17+
- name: Get schemes
18+
id: getSchemes
19+
run: |
20+
TARGETS=$(xcodebuild -list -json | tr -d "\n")
21+
SCHEMES=$(echo $TARGETS | ruby -e "require 'json'; puts JSON.generate(:scheme => JSON.parse(STDIN.gets)['project']['schemes'])")
22+
echo Found schemes: $SCHEMES
23+
echo "schemes=$SCHEMES" >> $GITHUB_OUTPUT
24+
swift_build:
25+
name: Build with swift
26+
runs-on: macos-14
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
1230
- name: xcode version
1331
uses: maxim-lobanov/setup-xcode@v1
1432
with:
1533
xcode-version: latest-stable
1634
- name: Build Package with swift
1735
run: swift build
18-
- name: Set Default Scheme
19-
run: |
20-
scheme_list=$(xcodebuild -list -json | tr -d "\n")
21-
default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['workspace']['schemes'][0]")
22-
echo $default | cat >default
23-
echo Using default scheme: $default
24-
- name: Build Package with xcodebuild
25-
env:
26-
scheme: ${{ 'default' }}
27-
run: |
28-
if [ $scheme = default ]; then scheme=$(cat default); fi
29-
xcodebuild -scheme $scheme -destination 'platform=iOS Simulator,name=iPhone 13'
36+
xcode_build:
37+
name: Build with xcode
38+
needs: find_schemes
39+
runs-on: macos-14
40+
strategy:
41+
matrix: ${{ fromJson(needs.find_schemes.outputs.schemes) }}
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v4
45+
- name: xcode version
46+
uses: maxim-lobanov/setup-xcode@v1
47+
with:
48+
xcode-version: latest-stable
49+
- name: Build ${{matrix.scheme}}
50+
run: xcodebuild clean build -project ApiVideoPlayer.xcodeproj -scheme "${{matrix.scheme}}" -sdk iphoneos CODE_SIGNING_ALLOWED=NO
51+
verify:
52+
name: Verify package sanity
53+
runs-on: macos-14
54+
steps:
55+
- name: Checkout
56+
uses: actions/checkout@v4
57+
- name: xcode version
58+
uses: maxim-lobanov/setup-xcode@v1
59+
with:
60+
xcode-version: latest-stable
3061
- name: Verify cocoapods
3162
run: pod lib lint --allow-warnings
63+
- name: Install swiftlint
64+
run: brew install swiftlint
3265
- name: Execute swiftlint
3366
run: swiftlint
34-
- name: Build Example UIKit
35-
env:
36-
scheme: ${{ 'default' }}
37-
run: |
38-
if [ $scheme = default ]; then scheme=$(cat default); fi
39-
xcodebuild clean build -project Examples/PlayerUIKit/PlayerUIKit.xcodeproj -scheme $scheme -sdk iphoneos
40-
- name: Build Example SwiftUI
41-
env:
42-
scheme: ${{ 'default' }}
43-
run: |
44-
if [ $scheme = default ]; then scheme=$(cat default); fi
45-
xcodebuild clean build -project Examples/PlayerSwiftUI/PlayerSwiftUI.xcodeproj -scheme $scheme -sdk iphoneos

0 commit comments

Comments
 (0)