diff --git a/cranelift/publish-all.sh b/cranelift/publish-all.sh index 41c90e7224..d0e2e01ab3 100755 --- a/cranelift/publish-all.sh +++ b/cranelift/publish-all.sh @@ -1,5 +1,10 @@ #!/bin/bash set -euo pipefail + +# This is a convenience script for maintainers publishing a new version of +# Cranelift to crates.io. To use, bump the version number below, run the +# script, and then run the commands that the script prints. + topdir=$(dirname "$0") cd "$topdir" @@ -12,9 +17,12 @@ version="0.14.0" echo "Updating crate versions to $version" for crate in . lib/*; do # Update the version number of this crate to $version. - sed -i.bk -e "s/^version = .*/version = \"$version\"/" "$crate/Cargo.toml" + sed -i.bk -e "s/^version = .*/version = \"$version\"/" \ + "$crate/Cargo.toml" + # Update the required version number of any cranelift* dependencies. - sed -i.bk -e "/^cranelift/s/version = \"[^\"]*\"/version = \"$version\"/" "$crate/Cargo.toml" + sed -i.bk -e "/^cranelift/s/version = \"[^\"]*\"/version = \"$version\"/" \ + "$crate/Cargo.toml" done # Update our local Cargo.lock (not checked in). @@ -27,8 +35,10 @@ cargo update echo git commit -a -m "\"Bump version to $version"\" echo git push -for crate in entity codegen frontend native reader wasm module simplejit faerie umbrella ; do +for crate in \ + entity codegen frontend native \ + reader wasm module simplejit \ + faerie umbrella +do echo cargo publish --manifest-path "lib/$crate/Cargo.toml" done -echo -echo Then, go to https://github.com/CraneStation/cranelift/releases/ and define a new release. diff --git a/cranelift/test-all.sh b/cranelift/test-all.sh index 9b13390783..580c41d47b 100755 --- a/cranelift/test-all.sh +++ b/cranelift/test-all.sh @@ -3,10 +3,12 @@ set -euo pipefail # This is the top-level test script: # +# - Check code formatting. # - Make a debug build. # - Make a release build. # - Run unit tests for all Rust crates (including the filetests) # - Build API documentation. +# - Optionally, run clippy and fuzzing. # # All tests run by this script should be passing at all times. @@ -85,7 +87,11 @@ if rustup toolchain list | grep -q nightly; then echo "installing cargo-fuzz" cargo +nightly install cargo-fuzz fi - ASAN_OPTIONS=detect_leaks=0 cargo +nightly fuzz run fuzz_translate_module "$topdir/fuzz/corpus/fuzz_translate_module/ffaefab69523eb11935a9b420d58826c8ea65c4c" + + fuzz_module="ffaefab69523eb11935a9b420d58826c8ea65c4c" + ASAN_OPTIONS=detect_leaks=0 \ + cargo +nightly fuzz run fuzz_translate_module \ + "$topdir/fuzz/corpus/fuzz_translate_module/$fuzz_module" else echo "nightly toolchain not found, skipping fuzz target integration test" fi