From: Vihiga Tyonum Date: Tue, 6 Jan 2026 11:51:32 +0000 (+0100) Subject: ci: add prepush checks that mirrors ci workflow X-Git-Url: http://internal-gitweb-vhost/parse/%22https:/struct.EncoderStringWriter.html?a=commitdiff_plain;h=e39e59c339903b213696f97004e93a951ecfb4de;p=bdk-cli ci: add prepush checks that mirrors ci workflow --- diff --git a/.github/workflows/cont_integration.yml b/.github/workflows/cont_integration.yml index 90878f3..727f042 100644 --- a/.github/workflows/cont_integration.yml +++ b/.github/workflows/cont_integration.yml @@ -57,22 +57,41 @@ jobs: - name: Run Clippy run: cargo clippy ${{ matrix.features }} --all-targets -- -D warnings - wasm-build: - name: Check WASM - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v6 - - name: Install Rust toolchain - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true - cache: true - target: wasm32-unknown-unknown - - name: Check WASM - run: cargo check --target wasm32-unknown-unknown --no-default-features --features esplora,compiler +# TODO: fix or remove this +# wasm-build: +# name: Build WASM +# runs-on: ubuntu-20.04 +# env: +# CC: clang-10 +# CFLAGS: -I/usr/include +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# - name: Generate cache key +# run: echo "Build WASM" | tee .cache_key +# - name: Cache +# uses: actions/cache@v4 +# with: +# path: | +# ~/.cargo/registry +# ~/.cargo/git +# target +# key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} +# # Install a recent version of clang that supports wasm32 +# - run: wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - || exit 1 +# - run: sudo apt-get update || exit 1 +# - run: sudo apt-get install -y libclang-common-10-dev clang-10 libc6-dev-i386 || exit 1 +# - name: Set default toolchain +# run: rustup default stable +# - name: Set profile +# run: rustup set profile minimal +# - name: Add target wasm32 +# run: rustup target add wasm32-unknown-unknown +# - name: Update toolchain +# run: rustup update +# - name: Build +# run: cargo build --target wasm32-unknown-unknown --no-default-features --features esplora,compiler,dev-getrandom-wasm + fmt: name: Rust fmt runs-on: ubuntu-latest diff --git a/Justfile b/Justfile index 4842595..0629681 100644 --- a/Justfile +++ b/Justfile @@ -25,6 +25,18 @@ build: fmt test: cargo test --all-features --tests +# checks before pushing +pre-push: + cargo build --features default + cargo test --features default + cargo build --no-default-features + cargo test --no-default-features + cargo build --all-features + cargo test --all-features + cargo clippy --no-default-features --all-targets -- -D warnings + cargo clippy --all-features --all-targets -- -D warnings + cargo fmt --all -- --check + # clean the project target directory clean: cargo clean