Auto merge of #5190 - flip1995:nuke_traveyor, r=phansch,Manishearth,llogiq,flip1995
I like to move it, move it GHA now runs in the background for 6 days (#5088) Since then ~~15~~ 19 PRs were successfully merged and Travis+Appveyor agreed on the status in every case. ([GitHub PR search query](https://github.com/rust-lang/rust-clippy/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Amerged+merged%3A%3E%3D2020-02-12T15%3A42%3A00+sort%3Aupdated-desc+NOT+%5Bgh-pages%5D+in%3Atitle)) Some PRs were: - #5163 - #5170 - #5168 - #5173 - #5171 - #5156 - #4809 - #5177 - #5182 - #5183 - #5184 - #5185 - #5186 - #5181 - #5189 Bug with GHA: - When a rustc PR gets merged between the `integration_build` and the `integration` job, the `integration` job will fail. This happened once in #5162, but not in the past 6 days. Even if it would happen every 4th PR we would save time, since splitting up the integration build and tests saves 5-7 minutes per run and a complete run takes 15-17 minutes - Sometimes the MacOS build takes up to an hour to download the master toolchain. Until now, this happend 2 or 3 times and can be resolved by a `@bors r3try`+canceling the previous run (restarting single jobs is not supported yet) ## Before merging this, https://github.com/rust-lang/rust-central-station/pull/578 has to get merged This PR is for starting the discussion and to get consensus (@rust-lang/clippy) on a final move to GHA. If we're ready, I'll contact Pietro, to finalize the move. changelog: Clippy completely runs on GHA now 🎉 --- BTW: The deployment already runs on GHA, instead of Travis.
This commit is contained in:
commit
06f0ab03ef
BIN
.github/deploy_key.enc
vendored
BIN
.github/deploy_key.enc
vendored
Binary file not shown.
154
.travis.yml
154
.travis.yml
@ -1,154 +0,0 @@
|
|||||||
dist: xenial
|
|
||||||
language: bash
|
|
||||||
git:
|
|
||||||
depth: 1
|
|
||||||
quiet: true
|
|
||||||
|
|
||||||
branches:
|
|
||||||
# Don't build these branches
|
|
||||||
except:
|
|
||||||
# Used by bors
|
|
||||||
- trying.tmp
|
|
||||||
- staging.tmp
|
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- $HOME/.cargo
|
|
||||||
before_cache:
|
|
||||||
- cargo install cargo-cache --debug
|
|
||||||
- find $HOME/.cargo/bin/ ! -type d -exec strip {} \;
|
|
||||||
- cargo cache --autoclean
|
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- RUST_BACKTRACE=1
|
|
||||||
- secure: "OKulfkA5OGd/d1IhvBKzRkHQwMcWjzrzbimo7+5NhkUkWxndAzl+719TB3wWvIh1i2wXXrEXsyZkXM5FtRrHm55v1VKQ5ibjEvFg1w3NIg81iDyoLq186fLqywvxGkOAFPrsePPsBj5USd5xvhwwbrjO6L7/RK6Z8shBwOSc41s="
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- export CARGO_TARGET_DIR="$TRAVIS_BUILD_DIR/target"
|
|
||||||
- |
|
|
||||||
case "$TRAVIS_OS_NAME" in
|
|
||||||
linux ) HOST=x86_64-unknown-linux-gnu;;
|
|
||||||
osx ) HOST=x86_64-apple-darwin;;
|
|
||||||
windows ) HOST=x86_64-pc-windows-msvc;;
|
|
||||||
esac
|
|
||||||
- curl -sSL https://sh.rustup.rs | sh -s -- -y --default-host="$HOST" --default-toolchain=nightly --profile=minimal
|
|
||||||
- export PATH="$HOME/.cargo/bin:$PATH"
|
|
||||||
install:
|
|
||||||
- |
|
|
||||||
if [[ -z ${INTEGRATION} ]]; then
|
|
||||||
if ! rustup component add rustfmt; then
|
|
||||||
TARGET=$(rustc -Vv | awk '/host/{print $2}')
|
|
||||||
NIGHTLY=$(curl -s "https://rust-lang.github.io/rustup-components-history/${TARGET}/rustfmt")
|
|
||||||
curl -sSL "https://static.rust-lang.org/dist/${NIGHTLY}/rustfmt-nightly-${TARGET}.tar.xz" | \
|
|
||||||
tar -xJf - --strip-components=3 -C ~/.cargo/bin
|
|
||||||
rm -rf ~/.cargo/bin/doc
|
|
||||||
fi
|
|
||||||
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
|
||||||
. $HOME/.nvm/nvm.sh
|
|
||||||
nvm install stable
|
|
||||||
nvm use stable
|
|
||||||
npm install remark-cli remark-lint remark-lint-maximum-line-length remark-preset-lint-recommended
|
|
||||||
elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
|
|
||||||
choco install windows-sdk-10.1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# disabling the integration tests in forks should be done with
|
|
||||||
# if: fork = false
|
|
||||||
# but this is currently buggy travis-ci/travis-ci#9118
|
|
||||||
matrix:
|
|
||||||
fast_finish: true
|
|
||||||
include:
|
|
||||||
# Builds that are executed for every PR
|
|
||||||
- os: linux
|
|
||||||
# i686 toolchain could run on x86_64 system.
|
|
||||||
- os: linux
|
|
||||||
env: HOST_TOOLCHAIN=i686-unknown-linux-gnu
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- gcc-multilib
|
|
||||||
- libssl-dev:i386 # openssl dev in Cargo.toml
|
|
||||||
if: branch IN (auto, try)
|
|
||||||
- os: windows
|
|
||||||
env: CARGO_INCREMENTAL=0 OS_WINDOWS=true
|
|
||||||
|
|
||||||
# Builds that are only executed when a PR is r+ed or a try build is started
|
|
||||||
# We don't want to run these always because they go towards
|
|
||||||
# the build limit within the Travis rust-lang account.
|
|
||||||
# The jobs are approximately sorted by execution time
|
|
||||||
- os: osx
|
|
||||||
if: branch IN (auto, try)
|
|
||||||
- env: INTEGRATION=rust-lang/rls
|
|
||||||
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
|
|
||||||
- env: INTEGRATION=rust-lang/cargo
|
|
||||||
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
|
|
||||||
- env: INTEGRATION=rust-lang/chalk
|
|
||||||
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
|
|
||||||
- env: INTEGRATION=Geal/nom
|
|
||||||
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
|
|
||||||
- env: INTEGRATION=rust-lang/rustfmt
|
|
||||||
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
|
|
||||||
- env: INTEGRATION=hyperium/hyper
|
|
||||||
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
|
|
||||||
- env: INTEGRATION=rust-itertools/itertools
|
|
||||||
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
|
|
||||||
# FIXME: rustc ICE on `serde_test_suite`
|
|
||||||
# - env: INTEGRATION=serde-rs/serde
|
|
||||||
# if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
|
|
||||||
- env: INTEGRATION=rust-lang/stdarch
|
|
||||||
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
|
|
||||||
- env: INTEGRATION=rust-random/rand
|
|
||||||
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
|
|
||||||
- env: INTEGRATION=rust-lang/futures-rs
|
|
||||||
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
|
|
||||||
- env: INTEGRATION=Marwes/combine
|
|
||||||
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
|
|
||||||
- env: INTEGRATION=rust-lang-nursery/failure
|
|
||||||
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
|
|
||||||
- env: INTEGRATION=rust-lang/log
|
|
||||||
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
|
|
||||||
- env: INTEGRATION=chronotope/chrono
|
|
||||||
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
|
|
||||||
allow_failures:
|
|
||||||
- os: windows
|
|
||||||
env: CARGO_INCREMENTAL=0 OS_WINDOWS=true
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- |
|
|
||||||
if [[ "$TRAVIS_BRANCH" == "auto" ]] || [[ "$TRAVIS_BRANCH" == "try" ]]; then
|
|
||||||
PR=$(echo "$TRAVIS_COMMIT_MESSAGE" | grep -o "#[0-9]*" | head -1 | sed 's/^#//g')
|
|
||||||
output=$(curl -H "Authorization: token $GITHUB_API_TOKEN" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$PR" | \
|
|
||||||
python -c "import sys, json; print(json.load(sys.stdin)['body'])" | \
|
|
||||||
grep "^changelog: " | \
|
|
||||||
sed "s/changelog: //g")
|
|
||||||
if [[ -z "$output" ]]; then
|
|
||||||
echo "ERROR: PR body must contain 'changelog: ...'"
|
|
||||||
exit 1
|
|
||||||
elif [[ "$output" = "none" ]]; then
|
|
||||||
echo "WARNING: changelog is 'none'"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
- |
|
|
||||||
rm rust-toolchain
|
|
||||||
./setup-toolchain.sh
|
|
||||||
- |
|
|
||||||
SYSROOT=$(rustc --print sysroot)
|
|
||||||
case "$TRAVIS_OS_NAME" in
|
|
||||||
windows ) export PATH="${SYSROOT}/bin:${PATH}" ;;
|
|
||||||
linux ) export LD_LIBRARY_PATH="${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" ;;
|
|
||||||
osx )
|
|
||||||
# See <https://github.com/nteract/nteract/issues/1523#issuecomment-301623519>
|
|
||||||
sudo mkdir -p /usr/local/lib
|
|
||||||
sudo find "$SYSROOT/lib" -maxdepth 1 -name '*.dylib' -exec ln -s {} /usr/local/lib \;
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
script:
|
|
||||||
- |
|
|
||||||
if [[ -n ${INTEGRATION} ]]; then
|
|
||||||
cargo test --test integration --features integration && sleep 5
|
|
||||||
else
|
|
||||||
./ci/base-tests.sh && sleep 5
|
|
||||||
fi
|
|
@ -18,9 +18,7 @@ build = "build.rs"
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[badges]
|
# [badges]
|
||||||
travis-ci = { repository = "rust-lang/rust-clippy" }
|
|
||||||
appveyor = { repository = "rust-lang/rust-clippy" }
|
|
||||||
# FIXME(flip1995): Add GHA badge once rust-lang/crates.io#1838 is merged
|
# FIXME(flip1995): Add GHA badge once rust-lang/crates.io#1838 is merged
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
# Clippy
|
# Clippy
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.com/rust-lang/rust-clippy.svg?branch=master)](https://travis-ci.com/rust-lang/rust-clippy)
|
|
||||||
[![Windows Build status](https://ci.appveyor.com/api/projects/status/id677xpw1dguo7iw?svg=true)](https://ci.appveyor.com/project/rust-lang-libs/rust-clippy)
|
|
||||||
[![Clippy Test](https://github.com/rust-lang/rust-clippy/workflows/Clippy%20Test/badge.svg?branch=auto&event=push)](https://github.com/rust-lang/rust-clippy/actions?query=workflow%3A%22Clippy+Test%22+event%3Apush+branch%3Aauto)
|
[![Clippy Test](https://github.com/rust-lang/rust-clippy/workflows/Clippy%20Test/badge.svg?branch=auto&event=push)](https://github.com/rust-lang/rust-clippy/actions?query=workflow%3A%22Clippy+Test%22+event%3Apush+branch%3Aauto)
|
||||||
[![License: MIT OR Apache-2.0](https://img.shields.io/crates/l/clippy.svg)](#license)
|
[![License: MIT OR Apache-2.0](https://img.shields.io/crates/l/clippy.svg)](#license)
|
||||||
|
|
||||||
|
47
appveyor.yml
47
appveyor.yml
@ -1,47 +0,0 @@
|
|||||||
environment:
|
|
||||||
global:
|
|
||||||
PROJECT_NAME: rust-clippy
|
|
||||||
RUST_BACKTRACE: 1
|
|
||||||
matrix:
|
|
||||||
#- TARGET: i686-pc-windows-gnu
|
|
||||||
#- TARGET: i686-pc-windows-msvc
|
|
||||||
#- TARGET: x86_64-pc-windows-gnu
|
|
||||||
- TARGET: x86_64-pc-windows-msvc
|
|
||||||
|
|
||||||
branches:
|
|
||||||
# Only build AppVeyor on r+ and try branch
|
|
||||||
only:
|
|
||||||
- auto
|
|
||||||
- try
|
|
||||||
|
|
||||||
cache:
|
|
||||||
- '%USERPROFILE%\.cargo'
|
|
||||||
# before cache
|
|
||||||
after_test:
|
|
||||||
- cargo install cargo-cache --debug
|
|
||||||
- cargo cache --autoclean
|
|
||||||
|
|
||||||
install:
|
|
||||||
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
|
|
||||||
- rustup-init.exe -y --default-host %TARGET% --default-toolchain nightly --profile=minimal
|
|
||||||
- set PATH=%USERPROFILE%\.cargo\bin;%PATH%
|
|
||||||
- rustup component add rustfmt --toolchain nightly & exit 0 # Format test handles missing rustfmt
|
|
||||||
- del rust-toolchain
|
|
||||||
- cargo install rustup-toolchain-install-master
|
|
||||||
- rustup-toolchain-install-master -f -n master -c rustc-dev
|
|
||||||
- rustup override set master
|
|
||||||
- rustc -V
|
|
||||||
- cargo -V
|
|
||||||
|
|
||||||
# Build settings, not to be confused with "before_build" and "after_build".
|
|
||||||
build: false
|
|
||||||
|
|
||||||
build_script:
|
|
||||||
- cargo build --features deny-warnings
|
|
||||||
|
|
||||||
test_script:
|
|
||||||
- cargo test --features deny-warnings
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
- provider: Email
|
|
||||||
on_build_success: false
|
|
@ -1,55 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
echo "Running clippy base tests"
|
|
||||||
|
|
||||||
PATH=$PATH:./node_modules/.bin
|
|
||||||
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
|
||||||
remark -f ./*.md -f doc/*.md > /dev/null
|
|
||||||
fi
|
|
||||||
# build clippy in debug mode and run tests
|
|
||||||
cargo build --features deny-warnings
|
|
||||||
cargo test --features deny-warnings
|
|
||||||
|
|
||||||
(cd clippy_lints && cargo test --features deny-warnings)
|
|
||||||
(cd rustc_tools_util && cargo test --features deny-warnings)
|
|
||||||
(cd clippy_dev && cargo test --features deny-warnings)
|
|
||||||
|
|
||||||
# make sure clippy can be called via ./path/to/cargo-clippy
|
|
||||||
(
|
|
||||||
cd clippy_workspace_tests
|
|
||||||
../target/debug/cargo-clippy
|
|
||||||
)
|
|
||||||
|
|
||||||
# Perform various checks for lint registration
|
|
||||||
cargo dev update_lints --check
|
|
||||||
cargo dev --limit-stderr-length
|
|
||||||
|
|
||||||
# Check running clippy-driver without cargo
|
|
||||||
(
|
|
||||||
# Check sysroot handling
|
|
||||||
sysroot=$(./target/debug/clippy-driver --print sysroot)
|
|
||||||
test "$sysroot" = "$(rustc --print sysroot)"
|
|
||||||
|
|
||||||
if [[ -z "$OS_WINDOWS" ]]; then
|
|
||||||
desired_sysroot=/tmp
|
|
||||||
else
|
|
||||||
desired_sysroot=C:/tmp
|
|
||||||
fi
|
|
||||||
sysroot=$(./target/debug/clippy-driver --sysroot $desired_sysroot --print sysroot)
|
|
||||||
test "$sysroot" = $desired_sysroot
|
|
||||||
|
|
||||||
sysroot=$(SYSROOT=$desired_sysroot ./target/debug/clippy-driver --print sysroot)
|
|
||||||
test "$sysroot" = $desired_sysroot
|
|
||||||
|
|
||||||
# Make sure this isn't set - clippy-driver should cope without it
|
|
||||||
unset CARGO_MANIFEST_DIR
|
|
||||||
|
|
||||||
# Run a lint and make sure it produces the expected output. It's also expected to exit with code 1
|
|
||||||
# FIXME: How to match the clippy invocation in compile-test.rs?
|
|
||||||
./target/debug/clippy-driver -Dwarnings -Aunused -Zui-testing --emit metadata --crate-type bin tests/ui/cstring.rs 2> cstring.stderr && exit 1
|
|
||||||
sed -e 's,tests/ui,$DIR,' -e '/= help/d' cstring.stderr > normalized.stderr
|
|
||||||
diff normalized.stderr tests/ui/cstring.stderr
|
|
||||||
|
|
||||||
# TODO: CLIPPY_CONF_DIR / CARGO_MANIFEST_DIR
|
|
||||||
)
|
|
Loading…
Reference in New Issue
Block a user