Skip to content

Commit 4527ddc

Browse files
committed
Rename workflows and jobs, and canonicalize xcframework generation inside an action for easier reuse for releases.
1 parent c3423da commit 4527ddc

File tree

5 files changed

+35
-42
lines changed

5 files changed

+35
-42
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Generate XCFramework
2+
description: Build xcarchives and combine them into an xcframework using Python scripts..
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Build binaries
7+
shell: bash
8+
run:
9+
python3 ./src/scripts/build_bulk_libldks.py
10+
- name: Generate xcframework
11+
shell: bash
12+
run:
13+
python3 ./src/scripts/generate_xcframework.py

.github/workflows/build-frameworks.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Frameworks
1+
name: Xcode Builds
22
permissions:
33
contents: read
44
statuses: read
@@ -15,7 +15,7 @@ on:
1515

1616
jobs:
1717
build:
18-
name: Build Framework (${{ matrix.configuration['platform'] }})
18+
name: Build XCArchive for ${{ matrix.configuration['platform'] }}
1919
runs-on: macos-12
2020
strategy:
2121
fail-fast: false
@@ -57,3 +57,20 @@ jobs:
5757
project: ${{ matrix.configuration['project'] }}
5858
scheme: ${{ matrix.configuration['scheme'] }}
5959
destination: ${{ matrix.configuration['destination'] }}
60+
generate:
61+
name: Generate XCFramework
62+
runs-on: macos-12
63+
env:
64+
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
65+
LDK_C_BINDINGS_BASE: /Users/runner/work/ldk-swift/ldk-swift/bindings/artifacts/ldk-c-bindings
66+
steps:
67+
- name: Configure Xcode
68+
uses: maxim-lobanov/setup-xcode@v1
69+
with:
70+
xcode-version: latest
71+
- name: Checkout
72+
uses: actions/checkout@v2
73+
- name: Install Dependencies
74+
uses: ./.github/actions/install-dependencies
75+
- name: Generate XCFramework
76+
uses: ./.github/actions/generate-xcframework

.github/workflows/generate-xcframework.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/swift.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check Bindings
1+
name: Test Bindings
22

33
on:
44
push:
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
check_bindings:
11-
name: Build Bindings
11+
name: Swift Package Manager Tests
1212
runs-on: ubuntu-20.04
1313
env:
1414
TOOLCHAIN: stable

src/scripts/generate_xcframework.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def run(config: ScriptConfig):
8181
'BUILD_LIBRARY_FOR_DISTRIBUTION=YES',
8282
f'LDK_C_BINDINGS_BASE={config.LDK_C_BINDINGS_BASE}',
8383
f'LDK_C_BINDINGS_BINARY_DIRECTORY={lipo_binary_directory}',
84-
f'LDK_C_BINDINGS_BINARY_FORCED_REBUILD_OUTPUT_DIRECTORY=""',
84+
f'LDK_C_BINDINGS_BINARY_FORCED_REBUILD_OUTPUT_DIRECTORY=',
8585
], env=child_environment
8686
)
8787

0 commit comments

Comments
 (0)