Skip to content

Commit

Permalink
Improve XCFramework Building (#71)
Browse files Browse the repository at this point in the history
# Improve XCFramework Building

## ⚙️ Release Notes 
- Improve XCFramework Building


### Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md).
  • Loading branch information
PSchmiedmayer authored May 18, 2024
1 parent 9a803d1 commit 8cee273
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
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

0 comments on commit 8cee273

Please sign in to comment.