Add subcrate which impls a simple SPV client from Bitcoin Core RPC
[rust-lightning] / .github / workflows / build.yml
index cd9b9f63553609cab54fe8d25b474d6db40b97d8..8f77b8d9222e7a3efd91bb641eb23fa5e7c1602e 100644 (file)
@@ -7,18 +7,19 @@ jobs:
     strategy:
       matrix:
         toolchain: [ stable,
-                     beta,
+                     nightly,
                      # 1.22.0 is MSRV for rust-lightning in general:
                      1.22.0,
                      # 1.34.2 is Debian stable
                      1.34.2,
-                     # 1.39.0 is MSRV for lightning-net-tokio and generates coverage
+                     # 1.39.0 is MSRV for lightning-net-tokio and lightning-block-sync and generates coverage
                      1.39.0]
         include:
           - toolchain: stable
             build-net-tokio: true
-          - toolchain: beta
+          - toolchain: nightly
             build-net-tokio: true
+            run-mutagen: true
           - toolchain: 1.39.0
             build-net-tokio: true
             coverage: true
@@ -38,12 +39,31 @@ jobs:
       - name: Build on Rust ${{ matrix.toolchain }}
         if: "! matrix.build-net-tokio"
         run: RUSTFLAGS="-C link-dead-code" cargo build --verbose  --color always -p lightning
+      - name: Build Block Sync Clients on Rust ${{ matrix.toolchain }} with features
+        if: matrix.build-net-tokio
+        run: |
+          cd lightning-block-sync
+          RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features rest-client
+          RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features rpc-client
+          RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features rpc-client,rest-client
+          RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features rpc-client,rest-client,tokio
+          cd ..
       - name: Test on Rust ${{ matrix.toolchain }} with net-tokio
         if: matrix.build-net-tokio
         run: RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always
       - name: Test on Rust ${{ matrix.toolchain }}
         if: "! matrix.build-net-tokio"
         run: RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always  -p lightning
+      - name: Run mutagen tests on ${{ matrix.toolchain }}
+        if: matrix.run-mutagen
+     # Run mutagen on nightly with TheBlueMatt's fork which exits with non-0 status
+     # if any mutations resulted in anything except test failures to prevent regressions.
+        run: |
+          rm -rf mutagen && git clone https://github.com/TheBlueMatt/mutagen
+          cargo install --force --path mutagen/mutagen-runner
+          cd lightning
+          ~/.cargo/bin/cargo-mutagen --features mutation_testing
+     # Generate code cov information on Rust 1.39.0
       - name: Install deps for kcov
         if: matrix.coverage
         run: |