- cd lightning-background-processor
- RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always --no-default-features --features futures
- - name: Test on Rust ${{ matrix.toolchain }}
- if: "! matrix.build-net-tokio"
- run: |
- cargo test --verbose --color always -p lightning
- cargo test --verbose --color always -p lightning-invoice
- cargo test --verbose --color always -p lightning-rapid-gossip-sync
- cargo test --verbose --color always -p lightning-persister
- cargo test --verbose --color always -p lightning-background-processor
- - name: Test C Bindings Modifications on Rust ${{ matrix.toolchain }}
- if: "! matrix.build-net-tokio"
- run: |
- RUSTFLAGS="--cfg=c_bindings" cargo test --verbose --color always -p lightning
- RUSTFLAGS="--cfg=c_bindings" cargo test --verbose --color always -p lightning-invoice
- RUSTFLAGS="--cfg=c_bindings" cargo build --verbose --color always -p lightning-persister
- RUSTFLAGS="--cfg=c_bindings" cargo build --verbose --color always -p lightning-background-processor
- - name: Test Block Sync Clients on Rust ${{ matrix.toolchain }} with features
- if: "matrix.build-net-tokio && !matrix.coverage"
- run: |
- cd lightning-block-sync
- cargo test --verbose --color always --features rest-client
- cargo test --verbose --color always --features rpc-client
- cargo test --verbose --color always --features rpc-client,rest-client
- cargo test --verbose --color always --features rpc-client,rest-client,tokio
- - name: Test Block Sync Clients on Rust ${{ matrix.toolchain }} with features and full code-linking for coverage generation
- if: matrix.coverage
- run: |
- cd lightning-block-sync
- RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always --features rest-client
- RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always --features rpc-client
- RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always --features rpc-client,rest-client
- RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always --features rpc-client,rest-client,tokio
- - name: Test Custom Message Macros on Rust ${{ matrix.toolchain }}
- if: "matrix.test-custom-message"
- run: |
- cd lightning-custom-message
- cargo test --verbose --color always
- - name: Install deps for kcov
- if: matrix.coverage
- run: |
- sudo apt-get update
- sudo apt-get -y install binutils-dev libcurl4-openssl-dev zlib1g-dev libdw-dev libiberty-dev
- - name: Install kcov
- if: matrix.coverage
- run: |
- wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz
- tar xzf master.tar.gz
- cd kcov-master && mkdir build && cd build
- cmake ..
- make
- make install DESTDIR=../../kcov-build
- cd ../.. && rm -rf kcov-master master.tar.gz
- - name: Generate coverage report
- if: matrix.coverage