Update the crates.io publishing scripts (#580)
* Fix fuzz target compilation. * Bump version to 0.7.0 * Temporarily disable fuzz tests Temporarily disable fuzz tests until https://github.com/bytecodealliance/cranelift/issues/1216 is resolved. * Fix publish-all.sh to not modify the witx crate. * Remove the "publish = false" attribute from Lightbeam. * Add a README.md for wasmtime-interface-types. * Remove the "rust" category. This fixes the following warning: warning: the following are not valid category slugs and were ignored: rust. Please see https://crates.io/category_slugs for the list of all category slugs. * Mark wasmtime-cli as "publish = false". * Sort the publishing rules in topological order. Also, publish nightly-only crates with cargo +nightly.
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# This is a trivial wrapper around cargo which just forwards its arguments
|
||||
# to cargo, and then sleeps for a few seconds, to allow for exteral services
|
||||
# to update their indices.
|
||||
# https://internals.rust-lang.org/t/changes-to-how-crates-io-handles-index-updates/9608
|
||||
|
||||
cargo "$@"
|
||||
sleep 10
|
||||
@@ -9,11 +9,13 @@ topdir=$(dirname "$0")/..
|
||||
cd "$topdir"
|
||||
|
||||
# All the wasmtime-* crates have the same version number
|
||||
version="0.2.0"
|
||||
version="0.7.0"
|
||||
|
||||
# Update the version numbers of the crates to $version.
|
||||
echo "Updating crate versions to $version"
|
||||
find -name Cargo.toml -exec sed -i.bk -e "s/^version = .*/version = \"$version\"/" {} \;
|
||||
find -name Cargo.toml \
|
||||
-not -path ./crates/wasi-common/WASI/tools/witx/Cargo.toml \
|
||||
-exec sed -i.bk -e "s/^version = \"[[:digit:]].*/version = \"$version\"/" {} \;
|
||||
|
||||
# Update our local Cargo.lock (not checked in).
|
||||
cargo update
|
||||
@@ -23,8 +25,41 @@ scripts/test-all.sh
|
||||
#
|
||||
# Note that libraries need to be published in topological order.
|
||||
|
||||
echo git checkout -b bump-version-to-$version
|
||||
echo git commit -a -m "\"Bump version to $version"\"
|
||||
echo git tag v$version
|
||||
echo git push
|
||||
echo git push origin bump-version-to-$version
|
||||
echo "# Don't forget to click the above link to open a pull-request!"
|
||||
echo git push origin v$version
|
||||
echo "find -name Cargo.toml -exec scripts/cargo-chill.sh publish --manifest-path {} \\;"
|
||||
for cargo_toml in \
|
||||
crates/wasi-common/wasi-common-cbindgen/Cargo.toml \
|
||||
crates/wasi-common/winx/Cargo.toml \
|
||||
crates/wasi-common/wig/Cargo.toml \
|
||||
crates/wasi-common/Cargo.toml \
|
||||
crates/lightbeam/Cargo.toml \
|
||||
crates/environ/Cargo.toml \
|
||||
crates/obj/Cargo.toml \
|
||||
crates/runtime/Cargo.toml \
|
||||
crates/debug/Cargo.toml \
|
||||
crates/jit/Cargo.toml \
|
||||
crates/wast/Cargo.toml \
|
||||
crates/wasi-c/Cargo.toml \
|
||||
crates/wasi/Cargo.toml \
|
||||
crates/api/Cargo.toml \
|
||||
crates/interface-types/Cargo.toml \
|
||||
crates/misc/py/Cargo.toml \
|
||||
crates/misc/rust/macro/Cargo.toml \
|
||||
crates/misc/rust/Cargo.toml \
|
||||
; do
|
||||
version=""
|
||||
case $cargo_toml in
|
||||
crates/lightbeam/Cargo.toml) version=" +nightly" ;;
|
||||
crates/misc/py/Cargo.toml) version=" +nightly" ;;
|
||||
esac
|
||||
|
||||
echo cargo$version publish --manifest-path "$cargo_toml"
|
||||
|
||||
# Sleep for a few seconds to allow the server to update the index.
|
||||
# https://internals.rust-lang.org/t/changes-to-how-crates-io-handles-index-updates/9608
|
||||
echo sleep 10
|
||||
done
|
||||
|
||||
@@ -76,17 +76,18 @@ cargo doc
|
||||
# Note LSAN is disabled due to https://github.com/google/sanitizers/issues/764
|
||||
banner "cargo fuzz check"
|
||||
if rustup toolchain list | grep -q nightly; then
|
||||
if cargo install --list | grep -q cargo-fuzz; then
|
||||
echo "cargo-fuzz found"
|
||||
else
|
||||
echo "installing cargo-fuzz"
|
||||
cargo +nightly install cargo-fuzz
|
||||
fi
|
||||
# Temporarily disable fuzz tests until https://github.com/bytecodealliance/cranelift/issues/1216 is resolved
|
||||
#if cargo install --list | grep -q cargo-fuzz; then
|
||||
# echo "cargo-fuzz found"
|
||||
#else
|
||||
# echo "installing cargo-fuzz"
|
||||
# cargo +nightly install cargo-fuzz
|
||||
#fi
|
||||
|
||||
fuzz_module="1340712d77d3db3c79b4b0c1494df18615485480"
|
||||
ASAN_OPTIONS=detect_leaks=0 \
|
||||
cargo +nightly fuzz run compile \
|
||||
"$topdir/fuzz/corpus/compile/$fuzz_module"
|
||||
#fuzz_module="1340712d77d3db3c79b4b0c1494df18615485480"
|
||||
#ASAN_OPTIONS=detect_leaks=0 \
|
||||
#cargo +nightly fuzz run compile \
|
||||
# "$topdir/fuzz/corpus/compile/$fuzz_module"
|
||||
|
||||
# Nightly is available, so also run lightbeam's tests, which we
|
||||
# skipped earlier.
|
||||
|
||||
Reference in New Issue
Block a user