Skip to content

Commit 658df59

Browse files
committed
ci: add prepush checks that mirrors ci workflow
1 parent 55ae958 commit 658df59

File tree

2 files changed

+47
-16
lines changed

2 files changed

+47
-16
lines changed

.github/workflows/cont_integration.yml

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,41 @@ jobs:
5757
- name: Run Clippy
5858
run: cargo clippy ${{ matrix.features }} --all-targets -- -D warnings
5959

60-
wasm-build:
61-
name: Check WASM
62-
runs-on: ubuntu-latest
63-
steps:
64-
- name: Checkout
65-
uses: actions/checkout@v6
66-
- name: Install Rust toolchain
67-
uses: actions-rust-lang/setup-rust-toolchain@v1
68-
with:
69-
toolchain: stable
70-
profile: minimal
71-
override: true
72-
cache: true
73-
target: wasm32-unknown-unknown
74-
- name: Check WASM
75-
run: cargo check --target wasm32-unknown-unknown --no-default-features --features esplora,compiler
60+
# TODO: fix or remove this
61+
# wasm-build:
62+
# name: Build WASM
63+
# runs-on: ubuntu-20.04
64+
# env:
65+
# CC: clang-10
66+
# CFLAGS: -I/usr/include
67+
# steps:
68+
# - name: Checkout
69+
# uses: actions/checkout@v4
70+
# - name: Generate cache key
71+
# run: echo "Build WASM" | tee .cache_key
72+
# - name: Cache
73+
# uses: actions/cache@v4
74+
# with:
75+
# path: |
76+
# ~/.cargo/registry
77+
# ~/.cargo/git
78+
# target
79+
# key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
80+
# # Install a recent version of clang that supports wasm32
81+
# - run: wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - || exit 1
82+
# - run: sudo apt-get update || exit 1
83+
# - run: sudo apt-get install -y libclang-common-10-dev clang-10 libc6-dev-i386 || exit 1
84+
# - name: Set default toolchain
85+
# run: rustup default stable
86+
# - name: Set profile
87+
# run: rustup set profile minimal
88+
# - name: Add target wasm32
89+
# run: rustup target add wasm32-unknown-unknown
90+
# - name: Update toolchain
91+
# run: rustup update
92+
# - name: Build
93+
# run: cargo build --target wasm32-unknown-unknown --no-default-features --features esplora,compiler,dev-getrandom-wasm
94+
7695
fmt:
7796
name: Rust fmt
7897
runs-on: ubuntu-latest

Justfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@ build: fmt
2525
test:
2626
cargo test --all-features --tests
2727

28+
# checks before pushing
29+
pre-push:
30+
cargo build --features default
31+
cargo test --features default
32+
cargo build --no-default-features
33+
cargo test --no-default-features
34+
cargo build --all-features
35+
cargo test --all-features
36+
cargo clippy --no-default-features --all-targets -- -D warnings
37+
cargo clippy --all-features --all-targets -- -D warnings
38+
cargo fmt --all -- --check
39+
2840
# clean the project target directory
2941
clean:
3042
cargo clean

0 commit comments

Comments
 (0)