Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/lnd-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI Checks - LND Integration Tests

on: [push, pull_request]

jobs:
check-lnd:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Check and install CMake if needed
# lnd_grpc_rust (via prost-build v0.10.4) requires CMake >= 3.5 but is incompatible with CMake >= 4.0.
# This step checks if CMake is missing, below 3.5, or 4.0 or higher, and installs CMake 3.31.6 if needed,
# ensuring compatibility with prost-build in ubuntu-latest.
run: |
if ! command -v cmake &> /dev/null ||
[ "$(cmake --version | head -n1 | cut -d' ' -f3)" \< "3.5" ] ||
[ "$(cmake --version | head -n1 | cut -d' ' -f3)" \> "4.0" ]; then
sudo apt-get update
sudo apt-get remove -y cmake
wget https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6-Linux-x86_64.sh
echo "518c76bd18cc4ca5faab891db69b1289dc1bf134f394f0983a19576711b95210 cmake-3.31.6-Linux-x86_64.sh" | sha256sum -c - || {
echo "Error: The checksum of the downloaded file does not match the expected value!"
exit 1
}
chmod +x cmake-3.31.6-Linux-x86_64.sh
sudo ./cmake-3.31.6-Linux-x86_64.sh --prefix=/usr/local --skip-license
fi

- name: Create temporary directory for LND data
id: create-temp-dir
run: echo "LND_DATA_DIR=$(mktemp -d)" >> $GITHUB_ENV

- name: Start bitcoind, electrs, and LND
run: docker compose -f docker-compose-lnd.yml up -d
env:
LND_DATA_DIR: ${{ env.LND_DATA_DIR }}

- name: Set permissions for LND data directory
# In PR 4622 (https://github.com/lightningnetwork/lnd/pull/4622),
# LND sets file permissions to 0700, preventing test code from accessing them.
# This step ensures the test suite has the necessary permissions.
run: sudo chmod -R 755 $LND_DATA_DIR
env:
LND_DATA_DIR: ${{ env.LND_DATA_DIR }}

- name: Run LND integration tests
run: LND_CERT_PATH=$LND_DATA_DIR/tls.cert LND_MACAROON_PATH=$LND_DATA_DIR/data/chain/bitcoin/regtest/admin.macaroon
RUSTFLAGS="--cfg lnd_test" cargo test --test integration_tests_lnd -- --exact --show-output
env:
LND_DATA_DIR: ${{ env.LND_DATA_DIR }}
43 changes: 0 additions & 43 deletions .github/workflows/publish-android.yml

This file was deleted.

86 changes: 0 additions & 86 deletions .github/workflows/publish-jvm.yml

This file was deleted.

10 changes: 3 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
toolchain: [
stable,
beta,
1.75.0, # Our MSRV
1.85.0, # Our MSRV
]
include:
- toolchain: stable
Expand All @@ -29,7 +29,7 @@ jobs:
platform: macos-latest
- toolchain: stable
platform: windows-latest
- toolchain: 1.75.0
- toolchain: 1.85.0
msrv: true
runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -42,10 +42,6 @@ jobs:
- name: Check formatting on Rust ${{ matrix.toolchain }}
if: matrix.check-fmt
run: rustup component add rustfmt && cargo fmt --all -- --check
- name: Pin packages to allow for MSRV
if: matrix.msrv
run: |
cargo update -p home --precise "0.5.9" --verbose # home v0.5.11 requires rustc 1.81 or newer
- name: Set RUSTFLAGS to deny warnings
if: "matrix.toolchain == 'stable'"
run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -78,7 +74,7 @@ jobs:
if: matrix.build-uniffi
run: cargo build --features uniffi --verbose --color always
- name: Build documentation on Rust ${{ matrix.toolchain }}
if: "matrix.platform != 'windows-latest' || matrix.toolchain != '1.75.0'"
if: "matrix.platform != 'windows-latest' || matrix.toolchain != '1.85.0'"
run: |
cargo doc --release --verbose --color always
cargo doc --document-private-items --verbose --color always
Expand Down
44 changes: 5 additions & 39 deletions .github/workflows/vss-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
env:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: YOU_MUST_CHANGE_THIS_PASSWORD
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
Expand All @@ -36,47 +36,13 @@ jobs:
repository: lightningdevkit/vss-server
path: vss-server

- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'

- name: Start Tomcat
- name: Build and Deploy VSS Server
run: |
docker run -d --network=host --name tomcat tomcat:latest

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: release-candidate

- name: Create database table
run: |
psql -h localhost -U postgres -d postgres -f ./vss-server/java/app/src/main/java/org/vss/impl/postgres/sql/v0_create_vss_db.sql
env:
PGPASSWORD: YOU_MUST_CHANGE_THIS_PASSWORD

- name: Build and Deploy VSS
run: |
# Print Info
java -version
gradle --version

cd vss-server/java
gradle wrapper --gradle-version 8.1.1
./gradlew --version
./gradlew build

docker cp app/build/libs/vss-1.0.war tomcat:/usr/local/tomcat/webapps/vss.war
cd ../
- name: Run VSS Integration tests against vss-instance.
cd vss-server/rust
cargo run server/vss-server-config.toml&
- name: Run VSS Integration tests
run: |
cd ldk-node
export TEST_VSS_BASE_URL="http://localhost:8080/vss"
RUSTFLAGS="--cfg vss_test" cargo build --verbose --color always
RUSTFLAGS="--cfg vss_test" cargo test --test integration_tests_vss

- name: Cleanup
run: |
docker stop tomcat && docker rm tomcat
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,11 @@ swift.swiftdoc
/bindings/kotlin/ldk-node-android/lib/src/main/kotlin/org/lightningdevkit/ldknode/ldk_node.kt
/bindings/kotlin/ldk-node-jvm/lib/src/main/kotlin/org/lightningdevkit/ldknode/ldk_node.kt
/bindings/kotlin/ldk-node-jvm/lib/src/main/resources/
.build/workspace-state.json
.build/arm64-apple-macosx/debug/index/db/v13/p69904--d2c184/data.mdb
.build/arm64-apple-macosx/debug/index/db/v13/p69904--d2c184/lock.mdb
.build/arm64-apple-macosx/debug/LDKNode.build/module.modulemap

# Hermit
.hermit/
bin/
Loading