File tree Expand file tree Collapse file tree 2 files changed +48
-1
lines changed Expand file tree Collapse file tree 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 : Start bitcoind and electrs
25+ run : docker compose up -d
26+
27+ - name : Install testing prerequisites
28+ run : |
29+ pip3 install requests
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 22BINDINGS_DIR=" ./bindings/python/src/ldk_node"
33UNIFFI_BINDGEN_BIN=" cargo run --manifest-path bindings/uniffi-bindgen/Cargo.toml"
44
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+
511cargo build --profile release-smaller --features uniffi || exit 1
612$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