Skip to content

Commit

Permalink
Use the last-working-rustfmt hack.
Browse files Browse the repository at this point in the history
  • Loading branch information
ltratt committed Jul 25, 2020
1 parent 0b1bd28 commit 3384e7a
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions .buildbot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,13 @@ export CARGO_HOME="`pwd`/.cargo"
export RUSTUP_HOME="`pwd`/.rustup"

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh
sh rustup.sh --default-host x86_64-unknown-linux-gnu --default-toolchain nightly -y --no-modify-path
# Install no toolchain initially to ensure toolchain rollback.
sh rustup.sh --default-host x86_64-unknown-linux-gnu --default-toolchain none -y --no-modify-path

export PATH=`pwd`/.cargo/bin/:$PATH
rustup install nightly

# Sometimes rustfmt is so broken that there is no way to install it at all.
# Rather than refusing to merge, we just can't rust rustfmt at such a point.
rustup component add --toolchain nightly rustfmt-preview \
|| cargo +nightly install --force rustfmt-nightly \
|| true
rustfmt=0
cargo fmt 2>&1 | grep "not installed for the toolchain" > /dev/null || rustfmt=1
if [ $rustfmt -eq 1 ]; then
cargo +nightly fmt --all -- --check
fi
cargo +nightly fmt --all -- --check

cargo test
cargo test --release
Expand Down

0 comments on commit 3384e7a

Please sign in to comment.