Update Package.swift for 0.0.125 release #369
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: XCFramework from XCArchives | |
permissions: | |
contents: read | |
statuses: read | |
pull-requests: read | |
actions: read | |
checks: write | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- "*" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-xcarchives: | |
name: Build xcarchive for ${{ matrix.configuration['human_readable_platform'] }} | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
configuration: | |
- destination: 'iOS Simulator' | |
human_readable_platform: 'iphonesimulator' | |
- destination: 'iOS' | |
human_readable_platform: 'iphoneos' | |
- destination: 'OS X' | |
human_readable_platform: 'macosx' | |
- destination: 'macOS,variant=Mac Catalyst' | |
human_readable_platform: 'catalyst' | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_15.4.0.app/Contents/Developer | |
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/bindings/artifacts/ldk-c-bindings | |
LDK_C_BINDINGS_BINARY_DIRECTORY: ${{ github.workspace }}/bindings/artifacts/bin | |
steps: | |
- name: Configure Xcode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: 15.4.0 | |
- name: Print Xcode SDK availability | |
shell: bash | |
run: | |
xcodebuild -showsdks | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Dependencies | |
uses: ./.github/actions/install-dependencies | |
with: | |
destination: ./bindings/artifacts | |
- name: Build | |
id: build | |
uses: ./.github/actions/archive-framework | |
with: | |
destination: ${{ matrix.configuration['destination'] }} | |
human_readable_platform: ${{ matrix.configuration['human_readable_platform'] }} | |
- name: Xcarchive hack | |
run: touch ./bindings_root.txt | |
- name: Upload xcarchive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bindings-${{ matrix.configuration['human_readable_platform'] }} | |
path: ./bindings/**/bin/release/${{ matrix.configuration['human_readable_platform'] }}/${{ matrix.configuration['human_readable_platform'] }}.xcarchive | |
generate: | |
name: Combine xcarchives into xcframework | |
runs-on: macos-latest | |
needs: [ build-xcarchives ] | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_15.4.0.app/Contents/Developer | |
LDK_C_BINDINGS_BASE: ${{ github.workspace }}/bindings/artifacts/ldk-c-bindings | |
steps: | |
- name: Configure Xcode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: 15.4.0 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download xcarchives | |
uses: actions/download-artifact@v4 | |
with: | |
merge-multiple: true | |
path: ./bindings | |
- name: Print post-artifact-download directory structure | |
shell: bash | |
run: | | |
echo "Current path:" | |
pwd | |
echo "Recursive enumeration" | |
find "$PWD" | |
- name: Generate xcframework | |
shell: bash | |
run: | |
python3 ./scripts/generate_xcframework.py | |
env: | |
PRESERVE_XCARCHIVES: true | |
- name: Create XCFramework artifact | |
uses: ./.github/actions/upload-xcframework-artifact |