|
14 | 14 | - "*"
|
15 | 15 |
|
16 | 16 | jobs:
|
| 17 | + build-libldks: |
| 18 | + name: Build lipo libldk.a for ${{ matrix.configuration['human_readable_platform'] }} |
| 19 | + runs-on: macos-12 |
| 20 | + env: |
| 21 | + LDK_C_BINDINGS_BASE: /Users/runner/work/ldk-swift/ldk-swift/bindings/artifacts/ldk-c-bindings |
| 22 | + strategy: |
| 23 | + fail-fast: true |
| 24 | + matrix: |
| 25 | + configuration: |
| 26 | + - platform_name: 'iphoneos' |
| 27 | + human_readable_platform: 'iphoneos' |
| 28 | + llvm_target_triple_suffix: '' |
| 29 | + architectures: 'arm64' |
| 30 | + - platform_name: 'iphonesimulator' |
| 31 | + human_readable_platform: 'iphonesimulator' |
| 32 | + llvm_target_triple_suffix: '-simulator' |
| 33 | + architectures: 'arm64 x86_64' |
| 34 | + - platform_name: 'macosx' |
| 35 | + human_readable_platform: 'macosx' |
| 36 | + llvm_target_triple_suffix: '' |
| 37 | + architectures: 'arm64 x86_64' |
| 38 | + - platform_name: 'macosx' |
| 39 | + human_readable_platform: 'catalyst' |
| 40 | + llvm_target_triple_suffix: '-macabi' |
| 41 | + architectures: 'arm64 x86_64' |
| 42 | + steps: |
| 43 | + - name: Configure Xcode |
| 44 | + if: matrix.configuration['human_readable_platform'] == 'catalyst' |
| 45 | + uses: maxim-lobanov/setup-xcode@v1 |
| 46 | + with: |
| 47 | + xcode-version: latest |
| 48 | + - name: Checkout |
| 49 | + uses: actions/checkout@v2 |
| 50 | + - name: Install Dependencies |
| 51 | + uses: ./.github/actions/install-dependencies |
| 52 | + - name: Build libldk.a |
| 53 | + shell: bash |
| 54 | + run: |
| 55 | + python3 ./src/scripts/build_individual_libldk.py |
| 56 | + env: |
| 57 | + PLATFORM_NAME: ${{ matrix.configuration['platform_name'] }} |
| 58 | + LLVM_TARGET_TRIPLE_SUFFIX: ${{ matrix.configuration['llvm_target_triple_suffix'] }} |
| 59 | + ARCHS: ${{ matrix.configuration['architectures'] }} |
| 60 | + - name: Upload binary |
| 61 | + uses: actions/upload-artifact@v3 |
| 62 | + with: |
| 63 | + name: libldk-${{ matrix.configuration['human_readable_platform'] }}.a |
| 64 | + path: | |
| 65 | + /Users/runner/work/ldk-swift/ldk-swift/bindings/bin/release/${{ matrix.configuration['human_readable_platform'] }}/libldk.a |
| 66 | + generate-parallel: |
| 67 | + name: Generate XCFramework based on parallelized libldk builds |
| 68 | + needs: [ build-libldks ] |
| 69 | + runs-on: macos-12 |
| 70 | + env: |
| 71 | + DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer |
| 72 | + LDK_C_BINDINGS_BASE: /Users/runner/work/ldk-swift/ldk-swift/bindings/artifacts/ldk-c-bindings |
| 73 | + steps: |
| 74 | + - name: Configure Xcode |
| 75 | + uses: maxim-lobanov/setup-xcode@v1 |
| 76 | + with: |
| 77 | + xcode-version: latest |
| 78 | + - name: Checkout |
| 79 | + uses: actions/checkout@v2 |
| 80 | + - name: Download xcarchives |
| 81 | + uses: actions/download-artifact@v3 |
| 82 | + - name: Generate Swift Bindings |
| 83 | + shell: bash |
| 84 | + run: | |
| 85 | + python3 ./ |
| 86 | + env: |
| 87 | + LDK_SWIFT_GENERATOR_INPUT_HEADER_PATH: bindings/artifacts/ldk-c-bindings/lightning-c-bindings/include/lightning.h |
| 88 | + - name: Generate xcframework |
| 89 | + shell: bash |
| 90 | + run: |
| 91 | + python3 ./src/scripts/generate_xcframework.py |
| 92 | + |
17 | 93 | build:
|
18 | 94 | name: Build XCArchive for ${{ matrix.configuration['platform'] }}
|
19 | 95 | runs-on: macos-12
|
|
57 | 133 | project: ${{ matrix.configuration['project'] }}
|
58 | 134 | scheme: ${{ matrix.configuration['scheme'] }}
|
59 | 135 | destination: ${{ matrix.configuration['destination'] }}
|
60 |
| - generate: |
| 136 | + |
| 137 | + generate-sequential: |
61 | 138 | name: Generate XCFramework
|
62 | 139 | runs-on: macos-12
|
63 | 140 | env:
|
|
0 commit comments