Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Run rustfmt on x86_64-linux only #1814

Merged
merged 1 commit into from
Apr 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,26 +68,30 @@ matrix:

install:
- sh rustup-init.sh --default-toolchain=stable -y
- export PATH="$PATH:$HOME/.cargo/bin"
- . "$HOME"/.cargo/env
- if [ -z "$NO_ADD" ]; then rustup target add "$TARGET"; fi
- rustup component add rustfmt

script:
- mkdir -p target/"$TARGET";
- >
case "$TARGET" in
*-linux-android) DOCKER=android ;; # Android uses a local docker image
*-linux-androideabi) DOCKER=android ;;
*-apple-darwin) ;;
*) DOCKER=$TARGET ;;
*-linux-android*) DOCKER=android ;; # Android uses a local docker image
*-apple-darwin) ;;
*) DOCKER="$TARGET" ;;
esac;
if [ -n "$DOCKER" ]; then
sh ci/build-run-docker.sh "$DOCKER" "$TARGET" "$SKIP_TESTS";
sh ci/build-run-docker.sh "$DOCKER" "$TARGET" "$SKIP_TESTS";
else
PATH="$HOME/rust/bin:$PATH" sh ci/run.sh;
sh ci/run.sh;
fi

# Check the formatting last because test failures are more interesting to have
# discovered for contributors lacking some platform access for testing beforehand
- if [ "${TARGET}" = x86_64-unknown-linux-gnu ]; then
shellcheck -s dash -e SC1090 -- rustup-init.sh ci/*.sh;
rustup component add rustfmt;
rustfmt -vV;
cargo fmt --all -- --check;
fi

before_deploy:
Expand Down
5 changes: 0 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,16 @@ install:
# add mingw to PATH if necessary
- if defined MINGW_DIR set PATH=C:\msys64\%MINGW_DIR%\bin;C:\msys64\usr\bin;%PATH%

# Add rustfmt support
- rustup component add rustfmt

# let's see what we got
- where gcc rustc cargo
- rustc -vV
- cargo -vV
- rustfmt -vV

build: false

test_script:
- cargo build --release --target %TARGET% --locked
- cargo test --release --target %TARGET%
- cargo fmt --all -- --check
tesuji marked this conversation as resolved.
Show resolved Hide resolved

notifications:
- provider: Webhook
Expand Down
5 changes: 0 additions & 5 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,10 @@ set -ex

rustc -vV
cargo -vV
rustfmt -vV

cargo build --locked -v --release --target "$TARGET" --features vendored-openssl

if [ -z "$SKIP_TESTS" ]; then
cargo test --release -p download --target "$TARGET" --features vendored-openssl
cargo test --release --target "$TARGET" --features vendored-openssl
fi

# Check the formatting last because test failures are more interesting to have
# discovered for contributors lacking some platform access for testing beforehand
cargo fmt --all -- --check