Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve XCFramework Building #71

Merged
merged 2 commits into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/archive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ jobs:
swift --version
echo Release version: ${{ inputs.version }}
echo SDK: ${{ matrix.sdk }}
- name: Install xcbeautify
if: ${{ !env.selfhosted && inputs.scheme != '' }}
run: brew install xcbeautify
- name: Archive for ${{ matrix.sdk }} SDK
run: |
xcodebuild archive \
Expand All @@ -79,7 +82,8 @@ jobs:
ONLY_ACTIVE_ARCH=NO \
CI=TRUE \
VERSION_NUMBER=${{ inputs.version }} \
SWIFT_OBJC_INTEROP_MODE=${{ (inputs.cxxInterop && 'objcxx') || 'objc' }}
SWIFT_OBJC_INTEROP_MODE=${{ (inputs.cxxInterop && 'objcxx') || 'objc' }} \
| xcbeautify
- name: Package the XCArchive # To preserve symlinks within the XCArchives that are not preserved by the GitHub Actions artifact upload
run: |
cd .build
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/xcframework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ on:
type: string
required: false
default: '["iphoneos", "iphonesimulator", "macosx", "appletvos", "appletvsimulator", "xros", "xrsimulator", "watchos", "watchsimulator"]'
outputpath:
description: 'Optional Prefix for the output path'
type: string
required: false
default: '.'
user:
description: 'Optional GitHub username that is associated with the GitHub Personal Access Token (PAT)'
type: string
Expand Down Expand Up @@ -119,7 +124,7 @@ jobs:
FRAMEWORKS_ARGS=$(echo "$FRAMEWORKS_ARGS" | xargs)

echo "Executing xcodebuild with args: $FRAMEWORKS_ARGS"
xcodebuild -create-xcframework $FRAMEWORKS_ARGS -output ${{ inputs.xcFrameworkName }}.xcframework || { echo "xcodebuild failed"; exit 1; }
xcodebuild -create-xcframework $FRAMEWORKS_ARGS -output ${{ inputs.outputpath }}/${{ inputs.xcFrameworkName }}.xcframework | xcbeautify || { echo "xcodebuild failed"; exit 1; }

rm -rf .build
- name: Commit and push XCFramework
Expand Down
Loading