Skip to content

Commit af40bec

Browse files
committed
Break down xcframework generation parallelization levels into separate workflows.
1 parent cd3a101 commit af40bec

File tree

3 files changed

+120
-72
lines changed

3 files changed

+120
-72
lines changed
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Generate XCFramework from parallel XCArchive builds
2+
permissions:
3+
contents: read
4+
statuses: read
5+
pull-requests: read
6+
actions: read
7+
checks: write
8+
on:
9+
push:
10+
branches:
11+
- main
12+
pull_request:
13+
branches:
14+
- "*"
15+
16+
jobs:
17+
build:
18+
name: Build XCArchive for ${{ matrix.configuration['platform'] }}
19+
runs-on: macos-12
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
configuration:
24+
- scheme: LDKFramework
25+
destination: generic/platform=iOS
26+
platform: iOS
27+
project: LDKFramework/LDKFramework.xcodeproj
28+
- scheme: LDKFramework
29+
destination: platform=iOS Simulator,OS=15.2,name=iPhone 13 Pro
30+
platform: iOS Simulator
31+
project: LDKFramework/LDKFramework.xcodeproj
32+
- scheme: LDKFramework
33+
destination: generic/platform=OS X
34+
platform: OS X
35+
project: LDKFramework/LDKFramework.xcodeproj
36+
- scheme: LDKFramework
37+
destination: platform=macOS,variant=Mac Catalyst,arch=x86_64
38+
platform: Mac Catalyst
39+
project: LDKFramework/LDKFramework.xcodeproj
40+
env:
41+
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
42+
LDK_C_BINDINGS_BASE: /Users/runner/work/ldk-swift/ldk-swift/bindings/artifacts/ldk-c-bindings
43+
LDK_C_BINDINGS_BINARY_DIRECTORY: /Users/runner/work/ldk-swift/ldk-swift/bindings/artifacts/bin
44+
steps:
45+
- name: Configure Xcode
46+
uses: maxim-lobanov/setup-xcode@v1
47+
with:
48+
xcode-version: latest
49+
- name: Checkout
50+
uses: actions/checkout@v2
51+
- name: Install Dependencies
52+
uses: ./.github/actions/install-dependencies
53+
- name: Build
54+
id: build
55+
uses: ./.github/actions/build-for-testing
56+
with:
57+
project: ${{ matrix.configuration['project'] }}
58+
scheme: ${{ matrix.configuration['scheme'] }}
59+
destination: ${{ matrix.configuration['destination'] }}
60+
61+
# generate:
62+
# name: Generate XCFramework
63+
# runs-on: macos-12
64+
# env:
65+
# DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
66+
# LDK_C_BINDINGS_BASE: /Users/runner/work/ldk-swift/ldk-swift/bindings/artifacts/ldk-c-bindings
67+
# steps:
68+
# - name: Configure Xcode
69+
# uses: maxim-lobanov/setup-xcode@v1
70+
# with:
71+
# xcode-version: latest
72+
# - name: Checkout
73+
# uses: actions/checkout@v2
74+
# - name: Install Dependencies
75+
# uses: ./.github/actions/install-dependencies
76+
# - name: Generate XCFramework
77+
# uses: ./.github/actions/generate-xcframework
78+
# - name: Zip Xcframework (remove before merging!)
79+
# run: |
80+
# ditto -c -k --sequesterRsrc /Users/runner/work/ldk-swift/ldk-swift/bindings/bin/release/LDKFramework.xcframework LDKFramework.xcframework.zip
81+
# - name: Upload Framework Artifact (remove before merging!)
82+
# uses: actions/upload-artifact@v3
83+
# with:
84+
# name: LDKFramework.xcframework.zip
85+
# path: LDKFramework.xcframework.zip

.github/workflows/build-frameworks.yml renamed to .github/workflows/build-xcframework-parallel-libldk.yml

Lines changed: 2 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Xcode Builds
1+
name: Generate XCframework from parallel libldk.a builds
22
permissions:
33
contents: read
44
statuses: read
@@ -64,7 +64,7 @@ jobs:
6464
path: |
6565
/Users/runner/work/ldk-swift/ldk-swift/bindings/bin/release/${{ matrix.configuration['human_readable_platform'] }}/libldk.a
6666
generate-parallel:
67-
name: Generate XCFramework based on parallelized libldk builds
67+
name: Generate XCarchives and XCFramework based on parallelized libldk builds
6868
needs: [ build-libldks ]
6969
runs-on: macos-12
7070
env:
@@ -89,73 +89,3 @@ jobs:
8989
shell: bash
9090
run:
9191
python3 ./src/scripts/generate_xcframework.py
92-
93-
build:
94-
name: Build XCArchive for ${{ matrix.configuration['platform'] }}
95-
runs-on: macos-12
96-
strategy:
97-
fail-fast: false
98-
matrix:
99-
configuration:
100-
- scheme: LDKFramework
101-
destination: generic/platform=iOS
102-
platform: iOS
103-
project: LDKFramework/LDKFramework.xcodeproj
104-
- scheme: LDKFramework
105-
destination: platform=iOS Simulator,OS=15.2,name=iPhone 13 Pro
106-
platform: iOS Simulator
107-
project: LDKFramework/LDKFramework.xcodeproj
108-
- scheme: LDKFramework
109-
destination: generic/platform=OS X
110-
platform: OS X
111-
project: LDKFramework/LDKFramework.xcodeproj
112-
- scheme: LDKFramework
113-
destination: platform=macOS,variant=Mac Catalyst,arch=x86_64
114-
platform: Mac Catalyst
115-
project: LDKFramework/LDKFramework.xcodeproj
116-
env:
117-
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
118-
LDK_C_BINDINGS_BASE: /Users/runner/work/ldk-swift/ldk-swift/bindings/artifacts/ldk-c-bindings
119-
LDK_C_BINDINGS_BINARY_DIRECTORY: /Users/runner/work/ldk-swift/ldk-swift/bindings/artifacts/bin
120-
steps:
121-
- name: Configure Xcode
122-
uses: maxim-lobanov/setup-xcode@v1
123-
with:
124-
xcode-version: latest
125-
- name: Checkout
126-
uses: actions/checkout@v2
127-
- name: Install Dependencies
128-
uses: ./.github/actions/install-dependencies
129-
- name: Build
130-
id: build
131-
uses: ./.github/actions/build-for-testing
132-
with:
133-
project: ${{ matrix.configuration['project'] }}
134-
scheme: ${{ matrix.configuration['scheme'] }}
135-
destination: ${{ matrix.configuration['destination'] }}
136-
137-
generate-sequential:
138-
name: Generate XCFramework
139-
runs-on: macos-12
140-
env:
141-
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
142-
LDK_C_BINDINGS_BASE: /Users/runner/work/ldk-swift/ldk-swift/bindings/artifacts/ldk-c-bindings
143-
steps:
144-
- name: Configure Xcode
145-
uses: maxim-lobanov/setup-xcode@v1
146-
with:
147-
xcode-version: latest
148-
- name: Checkout
149-
uses: actions/checkout@v2
150-
- name: Install Dependencies
151-
uses: ./.github/actions/install-dependencies
152-
- name: Generate XCFramework
153-
uses: ./.github/actions/generate-xcframework
154-
- name: Zip Xcframework (remove before merging!)
155-
run: |
156-
ditto -c -k --sequesterRsrc /Users/runner/work/ldk-swift/ldk-swift/bindings/bin/release/LDKFramework.xcframework LDKFramework.xcframework.zip
157-
- name: Upload Framework Artifact (remove before merging!)
158-
uses: actions/upload-artifact@v3
159-
with:
160-
name: LDKFramework.xcframework.zip
161-
path: LDKFramework.xcframework.zip
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Generate XCFramework from sequential bulk build script
2+
permissions:
3+
contents: read
4+
statuses: read
5+
pull-requests: read
6+
actions: read
7+
checks: write
8+
on:
9+
push:
10+
branches:
11+
- main
12+
pull_request:
13+
branches:
14+
- "*"
15+
16+
jobs:
17+
generate-sequential:
18+
name: Generate XCFramework
19+
runs-on: macos-12
20+
env:
21+
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
22+
LDK_C_BINDINGS_BASE: /Users/runner/work/ldk-swift/ldk-swift/bindings/artifacts/ldk-c-bindings
23+
steps:
24+
- name: Configure Xcode
25+
uses: maxim-lobanov/setup-xcode@v1
26+
with:
27+
xcode-version: latest
28+
- name: Checkout
29+
uses: actions/checkout@v2
30+
- name: Install Dependencies
31+
uses: ./.github/actions/install-dependencies
32+
- name: Generate XCFramework
33+
uses: ./.github/actions/generate-xcframework

0 commit comments

Comments
 (0)