- run: |
- cd lightning
- cargo test --verbose --color always --no-default-features --features no-std
- # check if there is a conflict between no-std and the default std feature
- cargo test --verbose --color always --features no-std
- # check that things still pass without grind_signatures
- # note that outbound_commitment_test only runs in this mode, because of hardcoded signature values
- cargo test --verbose --color always --no-default-features --features std
- # check if there is a conflict between no-std and the c_bindings cfg
- RUSTFLAGS="--cfg=c_bindings" cargo test --verbose --color always --no-default-features --features=no-std
- cd ..
- cd lightning-invoice
- cargo test --verbose --color always --no-default-features --features no-std
- # check if there is a conflict between no-std and the default std feature
- cargo test --verbose --color always --features no-std
- # check if there is a conflict between no-std and the c_bindings cfg
- RUSTFLAGS="--cfg=c_bindings" cargo test --verbose --color always --no-default-features --features=no-std
- # check no-std compatibility across dependencies
- cd ..
- cd no-std-check
- cargo check --verbose --color always
- cd ..
- - name: Test on no-std builds Rust ${{ matrix.toolchain }} and full code-linking for coverage generation
- if: "matrix.build-no-std && matrix.coverage"
- run: |
- cd lightning
- RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always --no-default-features --features no-std
- cd ..
- - 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 build --verbose --color always -p lightning-persister
- cargo build --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