From 7001b14b4cf3123aef296c0cfa30c3818de2036d Mon Sep 17 00:00:00 2001 From: Alekos Filini Date: Thu, 1 Sep 2022 15:46:44 +0200 Subject: [PATCH 1/3] Bump version to 0.22.0 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 3a764426..329a23b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bdk" -version = "0.21.0" +version = "0.22.0" edition = "2018" authors = ["Alekos Filini ", "Riccardo Casatta "] homepage = "https://bitcoindevkit.org" From 690411722e2131f69a605a6f3b5e97911778e9ed Mon Sep 17 00:00:00 2001 From: wszdexdrf Date: Sun, 7 Aug 2022 19:18:35 +0530 Subject: [PATCH 2/3] Change configs for source-base code coverage Also add cacheing to code coverage workflow --- .github/workflows/code_coverage.yml | 48 ++++++++++++++++++++--------- codecov.yaml | 13 -------- 2 files changed, 33 insertions(+), 28 deletions(-) delete mode 100644 codecov.yaml diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 09563dc8..5e650459 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -3,35 +3,53 @@ on: [push] name: Code Coverage jobs: - Codecov: name: Code Coverage runs-on: ubuntu-latest env: - CARGO_INCREMENTAL: '0' - RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off' - RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off' + RUSTFLAGS: "-Cinstrument-coverage" + RUSTDOCFLAGS: "-Cinstrument-coverage" + LLVM_PROFILE_FILE: "report-%p-%m.profraw" steps: - name: Checkout uses: actions/checkout@v2 + - name: Install lcov tools + run: sudo apt-get install lcov -y - name: Install rustup run: curl https://sh.rustup.rs -sSf | sh -s -- -y - name: Set default toolchain run: rustup default nightly - name: Set profile run: rustup set profile minimal + - name: Add llvm tools + run: rustup component add llvm-tools-preview - name: Update toolchain run: rustup update - - name: Test - run: cargo test --features all-keys,compiler,esplora,ureq,compact_filters --no-default-features - - - id: coverage - name: Generate coverage - uses: actions-rs/grcov@v0.1.5 - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v2 + - name: Cache cargo + uses: actions/cache@v3 with: - file: ${{ steps.coverage.outputs.report }} - directory: ./coverage/reports/ + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - name: Install grcov + run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install grcov; fi + - name: Test + run: cargo test --features default,minimal,all-keys,compact_filters,key-value-db,compiler,sqlite,sqlite-bundled,test-electrum,verify,test-rpc + - name: Run grcov + run: mkdir coverage; grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore '/*' -o ./coverage/lcov.info + - name: Generate HTML coverage report + run: genhtml -o coverage-report.html ./coverage/lcov.info + + - name: Coveralls upload + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: coverage-report + path: coverage-report.html diff --git a/codecov.yaml b/codecov.yaml deleted file mode 100644 index 062eabbd..00000000 --- a/codecov.yaml +++ /dev/null @@ -1,13 +0,0 @@ -coverage: - status: - project: - default: - target: auto - threshold: 1% - base: auto - informational: false - patch: - default: - target: auto - threshold: 100% - base: auto \ No newline at end of file From 0010ecd94aae49f389093cd3e8983c405049dbf5 Mon Sep 17 00:00:00 2001 From: wszdexdrf Date: Mon, 29 Aug 2022 14:48:19 +0530 Subject: [PATCH 3/3] Add badge to README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1bfa1b6c..02a55604 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Crate Info MIT or Apache-2.0 Licensed CI Status - + API Docs Rustc Version 1.56.1+ Chat on Discord