Skip to content

Commit 53eeec1

Browse files
Use parallel build jobs
1 parent 12a0112 commit 53eeec1

File tree

1 file changed

+55
-24
lines changed

1 file changed

+55
-24
lines changed

.github/workflows/build.yml

Lines changed: 55 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
- name: Validate Podspec
2424
run: pod lib lint --allow-warnings
2525

26-
build-xcframework:
27-
name: Build XCFramework
26+
build-ios-xcframework:
27+
name: Build iOS XCFramework
2828
runs-on: macos-15
2929
needs: [validate-cocoapods]
3030
steps:
@@ -56,6 +56,31 @@ jobs:
5656
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
5757
CODE_SIGNING_ALLOWED=NO
5858
59+
- name: Create iOS XCFramework
60+
run: |
61+
xcodebuild -create-xcframework \
62+
-framework build/ios-device.xcarchive/Products/Library/Frameworks/raygun4apple.framework \
63+
-framework build/ios-simulator.xcarchive/Products/Library/Frameworks/raygun4apple.framework \
64+
-output build/raygun4apple.xcframework
65+
66+
- name: Upload iOS XCFramework
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: raygun4apple-iOS-xcframework
70+
path: build/raygun4apple.xcframework
71+
retention-days: 30
72+
73+
build-macos-xcframework:
74+
name: Build macOS XCFramework
75+
runs-on: macos-15
76+
needs: [validate-cocoapods]
77+
steps:
78+
- name: Checkout code
79+
uses: actions/checkout@v4
80+
81+
- name: Select Xcode version
82+
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
83+
5984
- name: Build macOS Framework
6085
run: |
6186
xcodebuild archive \
@@ -67,6 +92,30 @@ jobs:
6792
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
6893
CODE_SIGNING_ALLOWED=NO
6994
95+
- name: Create macOS XCFramework
96+
run: |
97+
xcodebuild -create-xcframework \
98+
-framework build/macos.xcarchive/Products/Library/Frameworks/raygun4apple.framework \
99+
-output build/raygun4apple.xcframework
100+
101+
- name: Upload macOS XCFramework
102+
uses: actions/upload-artifact@v4
103+
with:
104+
name: raygun4apple-macOS-xcframework
105+
path: build/raygun4apple.xcframework
106+
retention-days: 30
107+
108+
build-tvos-xcframework:
109+
name: Build tvOS XCFramework
110+
runs-on: macos-15
111+
needs: [validate-cocoapods]
112+
steps:
113+
- name: Checkout code
114+
uses: actions/checkout@v4
115+
116+
- name: Select Xcode version
117+
run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
118+
70119
- name: Build tvOS Framework (Device)
71120
run: |
72121
xcodebuild archive \
@@ -89,34 +138,16 @@ jobs:
89138
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
90139
CODE_SIGNING_ALLOWED=NO
91140
92-
- name: Create iOS XCFramework
93-
run: |
94-
xcodebuild -create-xcframework \
95-
-framework build/ios-device.xcarchive/Products/Library/Frameworks/raygun4apple.framework \
96-
-framework build/ios-simulator.xcarchive/Products/Library/Frameworks/raygun4apple.framework \
97-
-output build/raygun4apple-iOS.xcframework
98-
99-
- name: Create macOS XCFramework
100-
run: |
101-
xcodebuild -create-xcframework \
102-
-framework build/macos.xcarchive/Products/Library/Frameworks/raygun4apple.framework \
103-
-output build/raygun4apple-macOS.xcframework
104-
105141
- name: Create tvOS XCFramework
106142
run: |
107143
xcodebuild -create-xcframework \
108144
-framework build/tvos-device.xcarchive/Products/Library/Frameworks/raygun4apple.framework \
109145
-framework build/tvos-simulator.xcarchive/Products/Library/Frameworks/raygun4apple.framework \
110-
-output build/raygun4apple-tvOS.xcframework
111-
112-
- name: Package XCFramework
113-
run: |
114-
cd build
115-
zip -r raygun4apple-xcframework.zip raygun4apple-iOS.xcframework raygun4apple-macOS.xcframework raygun4apple-tvOS.xcframework
146+
-output build/raygun4apple.xcframework
116147
117-
- name: Upload XCFramework
148+
- name: Upload tvOS XCFramework
118149
uses: actions/upload-artifact@v4
119150
with:
120-
name: raygun4apple-xcframework
121-
path: build/raygun4apple-xcframework.zip
151+
name: raygun4apple-tvOS-xcframework
152+
path: build/raygun4apple.xcframework
122153
retention-days: 30

0 commit comments

Comments
 (0)