Skip to content

Commit

Permalink
Build the XcFramework macOS app
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Kirkland committed Nov 4, 2024
1 parent 09b3a24 commit 6e2ea47
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipeline.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ steps:
download: "Bugsnag.xcframework.zip"
upload:
- features/fixtures/ios/output/iOSTestAppXcFramework.ipa
# - features/fixtures/macos/output/macOSTestApp.zip
- features/fixtures/ios/output/xcframework_ipa_url_bb.txt
- features/fixtures/macos/output/macOSTestAppXcFramework.zip
commands:
- unzip Bugsnag.xcframework.zip
- bundle install
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ Package.resolved
bb.ready
/maze_output
Gemfile.lock
Bugsnag.xcframework.zip
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ test-fixtures: ## Build the end-to-end test fixture

xcframework-test-fixtures: ## Build the xcframework end-to-end test fixture
@./features/scripts/export_xcframework_ios_app.sh
# @./features/scripts/export_xcframework_mac_app.sh
@./features/scripts/export_xcframework_mac_app.sh

e2e_ios_local:
@./features/scripts/export_ios_app.sh
Expand Down
44 changes: 44 additions & 0 deletions features/scripts/export_xcframework_mac_app.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env bash

set -euo pipefail

pushd features/fixtures/macos

echo "--- macOSTestAppXcFramework: xcodebuild archive"

BUILD_ARGS=(
-workspace macOSTestAppXcFramework.xcodeproj/project.xcworkspace
-scheme macOSTestAppXcFramework
-destination generic/platform=macOS
-configuration Release
-archivePath archive/macOSTestAppXcFramework.xcarchive
-quiet
archive
ONLY_ACTIVE_ARCH=NO
)

if [ "${ENABLE_CODE_COVERAGE:-}" = YES ]; then
BUILD_ARGS+=(
OTHER_CFLAGS='$(inherited) -fprofile-instr-generate -fcoverage-mapping'
OTHER_LDFLAGS='$(inherited) -fprofile-instr-generate'
OTHER_SWIFT_FLAGS='$(inherited) -profile-generate -profile-coverage-mapping'
)
fi

xcodebuild "${BUILD_ARGS[@]}"

echo "--- macOSTestAppXcFramework: xcodebuild -exportArchive"

xcrun xcodebuild \
-exportArchive \
-exportPath output/ \
-exportOptionsPlist exportOptions.plist \
-archivePath archive/macOSTestAppXcFramework.xcarchive \
-destination generic/platform=macOS \
-quiet

pushd output
echo "--- macOSTestApp: zip"
zip -qr macOSTestAppXcFramework.zip macOSTestAppXcFramework.app
popd
popd

0 comments on commit 6e2ea47

Please sign in to comment.