Skip to content

Commit

Permalink
Add convenience script to run most ci checks locally
Browse files Browse the repository at this point in the history
  • Loading branch information
heeckhau committed Oct 14, 2024
1 parent 6b845fd commit 99e02fb
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
11 changes: 8 additions & 3 deletions crates/wasm-test-runner/run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/sh

# Ensure the script runs in the folder that contains this script
cd "$(dirname "$0")"

RUSTFLAGS='-C target-feature=+atomics,+bulk-memory,+mutable-globals' \
rustup run nightly \
wasm-pack build ../wasm --target web --no-pack --out-dir=../wasm-test-runner/static/generated -- -Zbuild-std=panic_abort,std --features test,no-bundler \
&& RUST_LOG=debug cargo run --release
rustup run nightly \
wasm-pack build ../wasm --target web --no-pack --out-dir=../wasm-test-runner/static/generated -- -Zbuild-std=panic_abort,std --features test,no-bundler &&
RUST_LOG=debug cargo run --release
22 changes: 22 additions & 0 deletions pre-commit-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh

# This script is used to run checks before committing changes to the repository.
# It is a good approximation of what CI will do.

# Fail if any command fails
set -e

# Check formatting
cargo +nightly fmt --all

# Check clippy
cargo clippy --all-features --all-targets -- -D warnings

# Build all targets
# cargo build --all-targets

# Run tests
# cargo test

# Run wasm tests
# ./crates/wasm-test-runner/run.sh

0 comments on commit 99e02fb

Please sign in to comment.