Skip to content

Commit

Permalink
added xcframework builder to gh workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bryce-b committed May 30, 2024
1 parent 7ceceeb commit c9cabcb
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 39 deletions.
48 changes: 48 additions & 0 deletions .ci/scripts/xcframework.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/env bash
# Bash strict mode
set -eo pipefail
trap 's=$?; echo >&2 "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR

xcodebuild clean archive -scheme ElasticApm_iOS \
-configuration Release \
-destination 'generic/platform=iOS' \
-archivePath ./build/Release-iOS.xcarchive \
-derivedDataPath ./build/derivedDataPath \
SKIP_INSTALL=NO

xcodebuild clean archive -scheme ElasticApm_iOS \
-configuration Release \
-destination 'generic/platform=iOS Simulator' \
-archivePath ./build/Release-iphonesimulator.xcarchive \
-derivedDataPath ./build/derivedDataPath \
SKIP_INSTALL=NO

xcodebuild -create-xcframework \
-framework $(pwd)/build/Release-iOS.xcarchive/Products/Library/Frameworks/ElasticApm.framework \
-framework $(pwd)/build/Release-iphonesimulator.xcarchive/Products/Library/Frameworks/ElasticApm.framework \
-output ./build/ElasticApm_iOS.xcframework


xcodebuild clean archive -scheme ElasticApm_macOS \
-configuration Release \
-destination 'generic/platform=macOS' \
-archivePath ./build/Release-macOS.xcarchive \
-derivedDataPath ./build/derivedDataPath \
SKIP_INSTALL=NO

xcodebuild -create-xcframework \
-framework $(pwd)/build/Release-macOS.xcarchive/Products/Library/Frameworks/ElasticApm.framework \
-output ./build/ElasticApm_macOS.xcframework

xcodebuild clean archive -scheme ElasticApm_tvOS \
-configuration Release \
-destination 'generic/platform=tvOS' \
-archivePath ./build/Release-tvOS.xcarchive \
-derivedDataPath ./build/derivedDataPath \
SKIP_INSTALL=NO

xcodebuild -create-xcframework \
-framework $(pwd)/build/Release-tvOS.xcarchive/Products/Library/Frameworks/ElasticApm.framework \
-output ./build/ElasticApm_tvOS.xcframework


10 changes: 10 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ jobs:
run: |
xcodebuild -scheme apm-agent-ios -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 15' test
- name: Build XCFramework
uses: xavierLowmiller/[email protected]
with:
spec: project.yaml
quiet: true
version: '2.41.0'
run : |
xcodegen --generate
./ci/scripts/xcframework.sh
- name: Run package snapshots
run: .ci/scripts/package.sh

Expand Down
39 changes: 0 additions & 39 deletions xcframework-builder.sh

This file was deleted.

0 comments on commit c9cabcb

Please sign in to comment.