Skip to content

Prepare 117 bindings #259

Prepare 117 bindings

Prepare 117 bindings #259

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-12
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_13.2.1.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: latest
- 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@v3
with:
name: bindings
path: ./bindings/**/bin/release/${{ matrix.configuration['human_readable_platform'] }}/${{ matrix.configuration['human_readable_platform'] }}.xcarchive
generate:
name: Combine xcarchives into xcframework
runs-on: macos-12
needs: [ build-xcarchives ]
env:
DEVELOPER_DIR: /Applications/Xcode_13.2.1.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: latest
- name: Checkout
uses: actions/checkout@v3
- name: Download xcarchives
uses: actions/download-artifact@v3
- 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