1 name: Continuous Integration Checks
12 # 1.22.0 is MSRV for rust-lightning in general:
14 # 1.34.2 is Debian stable
16 # 1.39.0 is MSRV for lightning-net-tokio and generates coverage
26 runs-on: ubuntu-latest
28 - name: Checkout source code
29 uses: actions/checkout@v2
30 - name: Install Rust ${{ matrix.toolchain }} toolchain
31 uses: actions-rs/toolchain@v1
33 toolchain: ${{ matrix.toolchain }}
36 - name: Build on Rust ${{ matrix.toolchain }} with net-tokio
37 if: matrix.build-net-tokio
38 run: RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always
39 - name: Build on Rust ${{ matrix.toolchain }}
40 if: "! matrix.build-net-tokio"
41 run: RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always -p lightning
42 - name: Test on Rust ${{ matrix.toolchain }} with net-tokio
43 if: matrix.build-net-tokio
44 run: RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always
45 - name: Test on Rust ${{ matrix.toolchain }}
46 if: "! matrix.build-net-tokio"
47 run: RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always -p lightning
48 - name: Install deps for kcov
52 sudo apt-get -y install binutils-dev libcurl4-openssl-dev zlib1g-dev libdw-dev libiberty-dev
56 wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz
58 cd kcov-master && mkdir build && cd build
61 make install DESTDIR=../../kcov-build
62 cd ../.. && rm -rf kcov-master master.tar.gz
63 - name: Generate coverage report
66 for file in target/debug/lightning-*; do
67 [ -x "${file}" ] || continue;
68 mkdir -p "target/cov/$(basename $file)";
69 ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file";
71 - name: Upload coverage
73 uses: codecov/codecov-action@v1
75 fail_ci_if_error: true
78 runs-on: ubuntu-latest
82 - name: Checkout source code
83 uses: actions/checkout@v2
84 - name: Install Rust ${{ env.TOOLCHAIN }} toolchain
85 uses: actions-rs/toolchain@v1
87 toolchain: ${{ env.TOOLCHAIN }}
90 - name: Install dependencies for honggfuzz
93 sudo apt-get -y install build-essential binutils-dev libunwind-dev
94 - name: Fuzz test on Rust ${{ matrix.TOOLCHAIN }}
95 run: cd fuzz && cargo test --verbose --color always
96 - name: Generate fuzz report
97 run: cd fuzz && ./ci-fuzz.sh