Remove Travis conf and redundant scripts
This commit is contained in:
50
.travis.yml
50
.travis.yml
@@ -1,50 +0,0 @@
|
|||||||
# Travis CI script borrows heavily from CraneStation/wasmtime project.
|
|
||||||
os:
|
|
||||||
- linux
|
|
||||||
- osx
|
|
||||||
- windows
|
|
||||||
language: rust
|
|
||||||
rust:
|
|
||||||
- 1.36.0
|
|
||||||
- stable
|
|
||||||
- beta
|
|
||||||
- nightly
|
|
||||||
matrix:
|
|
||||||
allow_failures:
|
|
||||||
# We try to be compatible with beta and nightly, but they occasionally
|
|
||||||
# fail, so we don't allow them to hold up people using stable.
|
|
||||||
- rust: beta
|
|
||||||
- rust: nightly
|
|
||||||
# Similarly, we don't need to hold up people using stable while we wait
|
|
||||||
# for the results which may fail.
|
|
||||||
fast_finish: true
|
|
||||||
dist: xenial
|
|
||||||
sudo: false
|
|
||||||
# Caching done according to pointers found in
|
|
||||||
# https://levans.fr/rust_travis_cache.html
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- $HOME/.cargo
|
|
||||||
before_cache:
|
|
||||||
- rm -rf /home/travis/.cargo/registry
|
|
||||||
before_install:
|
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then choco install python3; fi
|
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export PATH="/c/Python37:/c/Python37/Scripts:$PATH"; fi
|
|
||||||
before_script:
|
|
||||||
# If an old version of rustfmt from cargo is already installed, uninstall
|
|
||||||
# it, since it can prevent the installation of the new version from rustup.
|
|
||||||
- cargo uninstall rustfmt || true
|
|
||||||
- cargo install --list
|
|
||||||
# If we're testing beta or nightly, we still need to install the stable
|
|
||||||
# toolchain so that we can run the stable version of rustfmt.
|
|
||||||
- rustup toolchain install stable
|
|
||||||
# Install the stable version of rustfmt.
|
|
||||||
- rustup component add --toolchain=stable rustfmt-preview
|
|
||||||
- rustup component list --toolchain=stable
|
|
||||||
- rustup show
|
|
||||||
- rustfmt +stable --version || echo fail
|
|
||||||
# Sometimes the component isn't actually ready after being installed, and
|
|
||||||
# rustup update makes it ready.
|
|
||||||
- rustup update
|
|
||||||
- rustfmt +stable --version
|
|
||||||
script: ./test-all.sh
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
# Format all sources using rustfmt.
|
|
||||||
# This script borrows heavily from CraneStation/wasmtime project.
|
|
||||||
|
|
||||||
topdir=$(dirname "$0")
|
|
||||||
cd "$topdir"
|
|
||||||
|
|
||||||
# Make sure we can find rustfmt.
|
|
||||||
export PATH="$PATH:$HOME/.cargo/bin"
|
|
||||||
|
|
||||||
exec cargo +stable fmt --all -- "$@"
|
|
||||||
53
test-all.sh
53
test-all.sh
@@ -1,53 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
# This is the top-level test script borrows heavily from CraneStation/wasmtime project:
|
|
||||||
#
|
|
||||||
# - Check code formatting.
|
|
||||||
# - Make a debug build.
|
|
||||||
# - Make a release build.
|
|
||||||
# - Run unit tests for all Rust crates
|
|
||||||
# - Build API documentation.
|
|
||||||
#
|
|
||||||
# All tests run by this script should be passing at all times.
|
|
||||||
|
|
||||||
# Repository top-level directory.
|
|
||||||
topdir=$(dirname "$0")
|
|
||||||
cd "$topdir"
|
|
||||||
|
|
||||||
function banner {
|
|
||||||
echo "====== $* ======"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Run rustfmt if we have it.
|
|
||||||
banner "Rust formatting"
|
|
||||||
if cargo +stable fmt -- --version > /dev/null ; then
|
|
||||||
if ! "$topdir/format-all.sh" --check ; then
|
|
||||||
echo "Formatting diffs detected! Run \"cargo fmt --all\" to correct."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "cargo-fmt not available; formatting not checked!"
|
|
||||||
echo
|
|
||||||
echo "If you are using rustup, rustfmt can be installed via"
|
|
||||||
echo "\"rustup component add --toolchain=stable rustfmt-preview\", or see"
|
|
||||||
echo "https://github.com/rust-lang-nursery/rustfmt for more information."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Make sure the code builds in release mode.
|
|
||||||
banner "Rust release build"
|
|
||||||
cargo build --release
|
|
||||||
|
|
||||||
# Make sure the code builds in debug mode.
|
|
||||||
banner "Rust debug build"
|
|
||||||
cargo build
|
|
||||||
|
|
||||||
# Run the tests. We run these in debug mode so that assertions are enabled.
|
|
||||||
banner "Rust unit and integration tests"
|
|
||||||
RUST_BACKTRACE=1 cargo test --all
|
|
||||||
|
|
||||||
# Make sure the documentation builds.
|
|
||||||
banner "Rust documentation: $topdir/target/doc/wasi-common/index.html"
|
|
||||||
cargo doc
|
|
||||||
|
|
||||||
banner "OK"
|
|
||||||
Reference in New Issue
Block a user