3737 fail-fast : false
3838 matrix :
3939 config :
40- - {name: "macOS-latest", os: "macOS-latest", cmake_extra: "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DLSL_UNITTESTS=ON -DLSL_BENCHMARKS=ON -DCMAKE_OSX_ARCHITECTURES=\"x86_64;arm64\"" }
41- - {name: "iOS", os: "macOS-latest", cmake_extra: "-DCMAKE_TOOLCHAIN_FILE=cmake/ios.toolchain.cmake -DPLATFORM=OS64" }
42- - {name: "iOS Simulator", os: "macOS-latest", cmake_extra: "-DCMAKE_TOOLCHAIN_FILE=cmake/ios.toolchain.cmake -DPLATFORM=SIMULATOR64COMBINED -G Xcode" }
40+ - {name: "macOS-latest", os: "macOS-latest", platform: "macos", cmake_extra: "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DLSL_UNITTESTS=ON -DLSL_BENCHMARKS=ON -DCMAKE_OSX_ARCHITECTURES=\"x86_64;arm64\"" }
41+ - {name: "iOS", os: "macOS-latest", platform: "ios", cmake_extra: "-DCMAKE_TOOLCHAIN_FILE=cmake/ios.toolchain.cmake -DPLATFORM=OS64" }
42+ - {name: "iOS Simulator", os: "macOS-latest", platform: "ios-simulator", cmake_extra: "-DCMAKE_TOOLCHAIN_FILE=cmake/ios.toolchain.cmake -DPLATFORM=SIMULATOR64COMBINED -G Xcode" }
4343
4444 steps :
4545 - uses : actions/checkout@v4
@@ -87,22 +87,10 @@ jobs:
8787 cmake --build examples/build --target install --config Release -j
8888 ./examples/build/install/bin/HandleMetaData
8989
90- - name : Codesign
90+ - name : Codesign Framework
9191 run : |
92- if [[ "${{ matrix.config.name }}" == "macOS-latest" ]]; then
93- codesign -vvv --force --deep --sign "$APPLE_CODE_SIGN_IDENTITY_APP" \
94- --entitlements lsl.entitlements --options runtime \
95- install/Frameworks/lsl.framework/Versions/A/lsl
96- codesign -vvv --verify --deep --strict install/Frameworks/lsl.framework/Versions/A/lsl
97- elif [[ "${{ matrix.config.name }}" == "iOS" || "${{ matrix.config.name }}" == "iOS Simulator" ]]; then
98- codesign -vvv --force --deep --sign "$APPLE_CODE_SIGN_IDENTITY_APP" \
99- install/Frameworks/lsl.framework/lsl
100- codesign -vvv --verify --deep --strict install/Frameworks/lsl.framework/lsl
101- fi
102- codesign -vvv --force --deep --sign "$APPLE_CODE_SIGN_IDENTITY_APP" \
103- --entitlements lsl.entitlements --options runtime \
104- install/Frameworks/lsl.framework
105- codesign -vvv --verify --deep --strict install/Frameworks/lsl.framework
92+ ./scripts/apple_codesign.sh install/Frameworks/lsl.framework \
93+ --platform ${{ matrix.config.platform }}
10694
10795 # run internal tests
10896 - name : unit tests
@@ -112,13 +100,6 @@ jobs:
112100 install/bin/lsl_test_internal --order rand --wait-for-keypress never --durations yes
113101 install/bin/lsl_test_exported --order rand --wait-for-keypress never --durations yes
114102 timeout-minutes : 10
115- - name : unit test (intel)
116- if : matrix.config.name == 'macOS-15-intel'
117- run : |
118- mkdir -p dumps
119- install/bin/lsl_test_internal --order rand --wait-for-keypress never --durations yes
120- install/bin/lsl_test_exported --order rand --wait-for-keypress never --durations yes
121- timeout-minutes : 10
122103
123104 - name : Package and Notarize macOS Installer
124105 if : matrix.config.name == 'macOS-latest'
@@ -127,23 +108,9 @@ jobs:
127108 APPLE_NOTARIZE_USERNAME : ${{ secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
128109 APPLE_NOTARIZE_PASSWORD : ${{ secrets.PROD_MACOS_NOTARIZATION_PWD }}
129110 run : |
130- # Get the version number from the framework's Info.plist
131- LSL_VERSION=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" install/Frameworks/lsl.framework/Versions/A/Resources/Info.plist)
132- echo "LSL_VERSION=$LSL_VERSION" >> $GITHUB_ENV
133- echo "Debug: LSL_VERSION=$LSL_VERSION"
134-
135- mkdir -p package
136- productbuild --sign "$APPLE_CODE_SIGN_IDENTITY_INST" \
137- --component install/Frameworks/lsl.framework \
138- /Library/Frameworks package/liblsl-${LSL_VERSION}-Darwin-universal.pkg
139- # Notarize the package
140- xcrun notarytool submit package/liblsl-${LSL_VERSION}-Darwin-universal.pkg \
141- --apple-id "$APPLE_NOTARIZE_USERNAME" \
142- --password "$APPLE_NOTARIZE_PASSWORD" \
143- --team-id "$APPLE_DEVELOPMENT_TEAM" \
144- --wait
145- # Staple the notarization ticket to the package
146- xcrun stapler staple package/liblsl-${LSL_VERSION}-Darwin-universal.pkg
111+ ./scripts/apple_package_notarize.sh install/Frameworks/lsl.framework \
112+ --notarize \
113+ --output package
147114
148115 - name : upload dump
149116 if : failure()
@@ -166,15 +133,13 @@ jobs:
166133 path : |
167134 package/*.pkg
168135 install/Frameworks/lsl.framework.zip
169- # Note: the artifact will preserve the folder structure up to the common root, in this case all.
170136
171137 - name : Upload iOS Framework
172138 if : matrix.config.name == 'iOS'
173139 uses : actions/upload-artifact@v4
174140 with :
175141 name : build-iOS
176142 path : install/Frameworks/lsl.framework.zip
177- # Note: the artifact drops the folder structure and only keeps the zip.
178143
179144 - name : Upload iOS Simulator Framework
180145 if : matrix.config.name == 'iOS Simulator'
@@ -202,16 +167,10 @@ jobs:
202167 name : build-iOS-Simulator
203168 path : build-iOS-Simulator
204169
205- - name : Unzip macOS Framework
170+ - name : Unzip Frameworks
206171 run : |
207172 unzip build-macOS-latest/install/Frameworks/lsl.framework.zip -d build-macOS-latest/Frameworks
208-
209- - name : Unzip iOS Framework
210- run : |
211173 unzip build-iOS/lsl.framework.zip -d build-iOS/Frameworks
212-
213- - name : Unzip iOS Simulator Framework
214- run : |
215174 unzip build-iOS-Simulator/lsl.framework.zip -d build-iOS-Simulator/Frameworks
216175
217176 - name : Install certificates and provisioning profiles
@@ -224,25 +183,19 @@ jobs:
224183
225184 - name : Create and Sign XCFramework
226185 run : |
227- xcodebuild -create-xcframework \
228- -framework build-macOS-latest/Frameworks/lsl.framework \
229- -framework build-iOS/Frameworks/lsl.framework \
230- -framework build-iOS-Simulator/Frameworks/lsl.framework \
231- -output lsl.xcframework
232-
233- codesign -vvv --force --deep --sign "$APPLE_CODE_SIGN_IDENTITY_APP" lsl.xcframework
234- echo "✅ Verifying binary signatures in XCFramework..."
235- codesign -vvv --verify --deep --strict lsl.xcframework
236-
237- ditto -c -k --sequesterRsrc --keepParent lsl.xcframework lsl.xcframework.$LSL_VERSION.zip
186+ ./scripts/apple_create_xcframework.sh \
187+ --macos build-macOS-latest/Frameworks/lsl.framework \
188+ --ios build-iOS/Frameworks/lsl.framework \
189+ --ios-simulator build-iOS-Simulator/Frameworks/lsl.framework \
190+ --output .
238191
239192 - name : upload artifacts
240193 uses : actions/upload-artifact@v4
241194 with :
242195 name : mac-packages
243196 path : |
244197 lsl.xcframework.*.zip
245- package/
198+ build-macOS-latest/ package/
246199
247200 - name : upload to release page
248201 if : github.event_name == 'release'
@@ -252,7 +205,7 @@ jobs:
252205 UPLOAD_URL : ${{ github.event.release.upload_url }}
253206 run : |
254207 UPLOAD_URL=${UPLOAD_URL%\{*} # remove "{name,label}" suffix
255- for pkg in lsl.xcframework.zip package/*.*; do
208+ for pkg in lsl.xcframework.*. zip build-macOS-latest/ package/*.*; do
256209 NAME=$(basename $pkg)
257210 MIME=$(file --mime-type $pkg|cut -d ' ' -f2)
258211 curl -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: $TOKEN" -H "Content-Type: $MIME" --data-binary @$pkg $UPLOAD_URL?name=$NAME
0 commit comments