Skip to content

Commit ca620b4

Browse files
committed
Update build scripts to use new framework name.
1 parent 79f480b commit ca620b4

File tree

10 files changed

+36
-45
lines changed

10 files changed

+36
-45
lines changed

.github/actions/archive-framework/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ runs:
1717
1818
LDK_C_BINDINGS_BINARY_DIRECTORY="" \
1919
xcodebuild archive \
20-
-project 'LDKFramework/LDKFramework.xcodeproj' \
21-
-scheme 'LDKFramework' \
20+
-project 'LDKFramework/LDK.xcodeproj' \
21+
-scheme 'LightningDevKit' \
2222
-destination 'generic/platform=${{ inputs.destination }}' \
2323
-archivePath "/Users/runner/work/ldk-swift/ldk-swift/bindings/bin/release/${{ inputs.human_readable_platform }}/${{ inputs.human_readable_platform }}" \
2424
ENABLE_BITCODE=NO \

.github/actions/install-dependencies/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ runs:
1212
run: |
1313
echo `pwd`
1414
mkdir -p ./bindings/artifacts/bin
15-
git clone --branch 2022-06-108-java-bindings https://github.com/TheBlueMatt/rust-lightning ./bindings/artifacts/rust-lightning
16-
git clone --branch v0.0.108.2 https://github.com/lightningdevkit/ldk-c-bindings ./bindings/artifacts/ldk-c-bindings
15+
git clone --branch 2022-07-109-java-bindings https://github.com/TheBlueMatt/rust-lightning ./bindings/artifacts/rust-lightning
16+
git clone --branch v0.0.109.0 https://github.com/lightningdevkit/ldk-c-bindings ./bindings/artifacts/ldk-c-bindings
1717
- name: Install Rust, required targets
1818
shell: bash
1919
run: |
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Upload XCFramework
2+
description: Create artifact containing a zipped xcframework.
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Zip Xcframework
7+
shell: bash
8+
run: |
9+
ditto -c -k --sequesterRsrc /Users/runner/work/ldk-swift/ldk-swift/bindings/bin/release/LightningDevKit.xcframework LightningDevKit.xcframework.zip
10+
- name: Upload Framework Artifact
11+
uses: actions/upload-artifact@v3
12+
with:
13+
name: LightningDevKit
14+
path: LightningDevKit.xcframework.zip

.github/workflows/build-xcframework-parallel-archives.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,5 @@ jobs:
7878
python3 ./src/scripts/generate_xcframework.py
7979
env:
8080
PRESERVE_XCARCHIVES: true
81-
- name: Zip Xcframework
82-
run: |
83-
ditto -c -k --sequesterRsrc /Users/runner/work/ldk-swift/ldk-swift/bindings/bin/release/LDKFramework.xcframework LDKFramework.xcframework.zip
84-
- name: Upload Framework Artifact
85-
uses: actions/upload-artifact@v3
86-
with:
87-
name: LDKFramework
88-
path: LDKFramework.xcframework.zip
81+
- name: Create XCFramework artifact
82+
uses: ./.github/actions/upload-xcframework-artifact

.github/workflows/build-xcframework-parallel-libldk.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,5 @@ jobs:
9292
shell: bash
9393
run:
9494
python3 ./src/scripts/generate_xcframework.py
95-
- name: Zip Xcframework
96-
run: |
97-
ditto -c -k --sequesterRsrc /Users/runner/work/ldk-swift/ldk-swift/bindings/bin/release/LDKFramework.xcframework LDKFramework.xcframework.zip
98-
- name: Upload Framework Artifact
99-
uses: actions/upload-artifact@v3
100-
with:
101-
name: LDKFramework
102-
path: LDKFramework.xcframework.zip
95+
- name: Create XCFramework artifact
96+
uses: ./.github/actions/upload-xcframework-artifact

.github/workflows/build-xcframework-sequential.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,5 @@ jobs:
3131
uses: ./.github/actions/install-dependencies
3232
- name: Generate XCFramework
3333
uses: ./.github/actions/generate-xcframework
34-
- name: Zip Xcframework
35-
run: |
36-
ditto -c -k --sequesterRsrc /Users/runner/work/ldk-swift/ldk-swift/bindings/bin/release/LDKFramework.xcframework LDKFramework.xcframework.zip
37-
- name: Upload Framework Artifact
38-
uses: actions/upload-artifact@v3
39-
with:
40-
name: LDKFramework
41-
path: LDKFramework.xcframework.zip
34+
- name: Create XCFramework artifact
35+
uses: ./.github/actions/upload-xcframework-artifact

.github/workflows/release-framework.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,8 @@ jobs:
3434
uses: ./.github/actions/install-dependencies
3535
- name: Generate XCFramework
3636
uses: ./.github/actions/generate-xcframework
37-
- name: Zip Xcframework
38-
run: |
39-
ditto -c -k --sequesterRsrc /Users/runner/work/ldk-swift/ldk-swift/bindings/bin/release/LDKFramework.xcframework LDKFramework.xcframework.zip
40-
- name: Upload Framework Artifact
41-
uses: actions/upload-artifact@v3
42-
with:
43-
name: LDKFramework.xcframework.zip
44-
path: LDKFramework.xcframework.zip
37+
- name: Create XCFramework artifact
38+
uses: ./.github/actions/upload-xcframework-artifact
4539
release:
4640
name: Publish Release
4741
runs-on: ubuntu-latest
@@ -50,8 +44,8 @@ jobs:
5044
- name: Download Framework Artifact
5145
uses: actions/download-artifact@v3
5246
with:
53-
name: LDKFramework.xcframework.zip
47+
name: LightningDevKit
5448
- name: Create Release
5549
uses: softprops/action-gh-release@v1
5650
with:
57-
files: LDKFramework.xcframework.zip
51+
files: LightningDevKit.xcframework.zip

.github/workflows/swift.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ jobs:
2323
# Note this is a different endpoint, as we need one non-upstream commit!
2424
# git clone https://git.bitcoin.ninja/rust-lightning
2525
# git clone https://github.com/TheBlueMatt/rust-lightning
26-
git clone --branch 2022-06-108-java-bindings https://github.com/TheBlueMatt/rust-lightning
26+
git clone --branch 2022-07-109-java-bindings https://github.com/TheBlueMatt/rust-lightning
2727
cd rust-lightning
2828
echo "rust-lightning commit hash:"
2929
git rev-parse HEAD
3030
cd ..
31-
git clone --branch v0.0.108.2 https://github.com/lightningdevkit/ldk-c-bindings
31+
git clone --branch v0.0.109.0 https://github.com/lightningdevkit/ldk-c-bindings
3232
# git clone https://github.com/TheBlueMatt/ldk-c-bindings
3333
cd ldk-c-bindings
3434
echo "ldk-c-bindings commit hash:"

src/scripts/generate_xcframework.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ def parse_config() -> ScriptConfig:
2222
def run(config: ScriptConfig):
2323
build_products_directory = os.path.realpath(os.path.join(os.path.dirname(__file__), '../../bindings/bin'))
2424
xcode_project_path = os.path.realpath(
25-
os.path.join(os.path.dirname(__file__), '../../xcode/LDKFramework/LDKFramework.xcodeproj')
25+
os.path.join(os.path.dirname(__file__), '../../xcode/LDKFramework/LDK.xcodeproj')
2626
)
2727
framework_input_flags: [str] = []
2828
xcframework_output_path = os.path.join(
2929
build_products_directory,
3030
config.RUST_CONFIGURATION,
31-
'LDKFramework.xcframework'
31+
'LightningDevKit.xcframework'
3232
)
3333

3434
child_environment = dict(os.environ)
@@ -60,7 +60,7 @@ def run(config: ScriptConfig):
6060
# XCFRAMEWORK_INPUT_FLAGS="${XCFRAMEWORK_INPUT_FLAGS}-framework ${CURRENT_ARCHIVE_PATH}.xcarchive/Products/Library/Frameworks/LDKFramework.framework "
6161
framework_input_flags += [
6262
'-framework',
63-
f'{xcarchive_output_path}.xcarchive/Products/Library/Frameworks/LDKFramework.framework'
63+
f'{xcarchive_output_path}.xcarchive/Products/Library/Frameworks/LightningDevKit.framework'
6464
]
6565

6666
if config.PRESERVE_XCARCHIVES:
@@ -81,7 +81,7 @@ def run(config: ScriptConfig):
8181
'archive',
8282
'-verbose',
8383
'-project', xcode_project_path,
84-
'-scheme', 'LDKFramework',
84+
'-scheme', 'LightningDevKit',
8585
'-destination', f'generic/platform={current_destination}',
8686
'-derivedDataPath', derived_data_directory,
8787
'-archivePath', xcarchive_output_path,

src/scripts/script_config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def parse(cls, allow_ldk_argument=True, parse_configuration=False, parse_lipo_ou
5050

5151
if not ldk_directory_string:
5252
# if xcarchives are preserved, we don't need an LDK_C_BINDINGS_BASE
53-
print('Missing LDK C-bindings base directory. Either call the value or set the environment variable.', file=sys.stderr)
53+
print('Missing LDK C-bindings base directory. Either run command with the value or set the environment variable.', file=sys.stderr)
54+
print(f'Example usage: \npython3 {sys.argv[0]} /path/to/ldk-c-bindings')
5455
if not should_preserve_xcarchives:
5556
sys.exit(1)
5657
else:

0 commit comments

Comments
 (0)