File tree 2 files changed +48
-1
lines changed 2 files changed +48
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Continuous Integration Checks - Python
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ check-python :
7
+ runs-on : ubuntu-latest
8
+
9
+ env :
10
+ LDK_NODE_PYTHON_DIR : bindings/python
11
+
12
+ steps :
13
+ - name : Checkout repository
14
+ uses : actions/checkout@v4
15
+
16
+ - name : Setup Python
17
+ uses : actions/setup-python@v4
18
+ with :
19
+ python-version : ' 3.10'
20
+
21
+ - name : Generate Python bindings
22
+ run : ./scripts/uniffi_bindgen_generate_python.sh
23
+
24
+ - name : Install testing prerequisites
25
+ run : |
26
+ pip3 install requests
27
+
28
+ - name : Start bitcoind and electrs
29
+ run : docker compose up -d
30
+
31
+ - name : Run Python unit tests
32
+ env :
33
+ BITCOIN_CLI_BIN : " docker exec ldk-node-bitcoin-1 bitcoin-cli"
34
+ BITCOIND_RPC_USER : " user"
35
+ BITCOIND_RPC_PASSWORD : " pass"
36
+ ESPLORA_ENDPOINT : " http://127.0.0.1:3002"
37
+ run : |
38
+ cd $LDK_NODE_PYTHON_DIR
39
+ python3 -m unittest discover -s src/ldk_node
Original file line number Diff line number Diff line change 2
2
BINDINGS_DIR=" ./bindings/python/src/ldk_node"
3
3
UNIFFI_BINDGEN_BIN=" cargo run --manifest-path bindings/uniffi-bindgen/Cargo.toml"
4
4
5
+ if [[ " $OSTYPE " == " linux-gnu" * ]]; then
6
+ DYNAMIC_LIB_PATH=" ./target/release-smaller/libldk_node.so"
7
+ else
8
+ DYNAMIC_LIB_PATH=" ./target/release-smaller/libldk_node.dylib"
9
+ fi
10
+
5
11
cargo build --profile release-smaller --features uniffi || exit 1
6
12
$UNIFFI_BINDGEN_BIN generate bindings/ldk_node.udl --language python -o " $BINDINGS_DIR " || exit 1
7
- cp ./target/release-smaller/libldk_node.dylib " $BINDINGS_DIR " /libldk_node.dylib || exit 1
13
+
14
+ mkdir -p $BINDINGS_DIR
15
+ cp " $DYNAMIC_LIB_PATH " " $BINDINGS_DIR " || exit 1
You can’t perform that action at this time.
0 commit comments