From a1f65656c39ee089e6f2a2cf34c4d5570ef22757 Mon Sep 17 00:00:00 2001 From: flip1995 Date: Thu, 23 Jan 2020 10:26:00 +0100 Subject: [PATCH] [WIP] Remove old CI files --- .github/deploy.sh | 81 -------------------- .github/deploy_key.enc | Bin 1680 -> 0 bytes .travis.yml | 166 ----------------------------------------- appveyor.yml | 34 +-------- ci/base-tests.sh | 55 -------------- 5 files changed, 2 insertions(+), 334 deletions(-) delete mode 100755 .github/deploy.sh delete mode 100644 .github/deploy_key.enc delete mode 100644 .travis.yml delete mode 100755 ci/base-tests.sh diff --git a/.github/deploy.sh b/.github/deploy.sh deleted file mode 100755 index 19dc4017166c..000000000000 --- a/.github/deploy.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash - -# Automatically deploy on gh-pages - -set -ex - -SOURCE_BRANCH="master" -TARGET_BRANCH="gh-pages" - -# Save some useful information -REPO=$(git config remote.origin.url) -SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:} -SHA=$(git rev-parse --verify HEAD) - -# Clone the existing gh-pages for this repo into out/ -git clone --quiet --single-branch --branch "$TARGET_BRANCH" "$REPO" out - -echo "Removing the current docs for master" -rm -rf out/master/ || exit 0 - -echo "Making the docs for master" -mkdir out/master/ -cp util/gh-pages/index.html out/master -python ./util/export.py out/master/lints.json - -if [[ -n "$TRAVIS_TAG" ]]; then - echo "Save the doc for the current tag ($TRAVIS_TAG) and point current/ to it" - cp -r out/master "out/$TRAVIS_TAG" - rm -f out/current - ln -s "$TRAVIS_TAG" out/current -fi - -# Generate version index that is shown as root index page -cp util/gh-pages/versions.html out/index.html -pushd out - -cat <<-EOF | python - > versions.json -import os, json -print json.dumps([ - dir for dir in os.listdir(".") if not dir.startswith(".") and os.path.isdir(dir) -]) -EOF -popd - -# Pull requests and commits to other branches shouldn't try to deploy, just build to verify -if [[ "$TRAVIS_PULL_REQUEST" != "false" ]] || [[ "$TRAVIS_BRANCH" != "$SOURCE_BRANCH" ]]; then - # Tags should deploy - if [[ -z "$TRAVIS_TAG" ]]; then - echo "Generated, won't push" - exit 0 - fi -fi - -# Now let's go have some fun with the cloned repo -cd out -git config user.name "Travis CI" -git config user.email "travis@ci.invalid" - -if git diff --exit-code --quiet; then - echo "No changes to the output on this push; exiting." - exit 0 -fi -cd - - -# Get the deploy key by using Travis's stored variables to decrypt deploy_key.enc -ENCRYPTION_LABEL=e3a2d77100be -ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key" -ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv" -ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR} -ENCRYPTED_IV=${!ENCRYPTED_IV_VAR} -openssl aes-256-cbc -K "$ENCRYPTED_KEY" -iv "$ENCRYPTED_IV" -in .github/deploy_key.enc -out .github/deploy_key -d -chmod 600 .github/deploy_key -eval "$(ssh-agent -s)" -ssh-add .github/deploy_key - -cd out -git add . -git commit -m "Automatic deploy to GitHub Pages: ${SHA}" - -# Now that we're all set up, we can push. -git push "$SSH_REPO" "$TARGET_BRANCH" diff --git a/.github/deploy_key.enc b/.github/deploy_key.enc deleted file mode 100644 index 48cb3f5a1276dfdacef1d54cecd1ded0911738a8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1680 zcmV;B25vF7u9N_L=w*TIYn1;MzUesW5ej2=oot?d>%{ zy=pH1(l$5zhk3TM$4_n%!q&1t*9w&T&t=Or-GHPK7bN}_feZhHHdR&H%g~fu8 z*f}0Udo-cU!f_}8=ay!LF^mdI-0d?3(@?B;SSW!+ZL5c1PDks2hcD%mUhf*AEOX!_ zOU@QB+)7ilyfBZ@cukZ)uLi1?TTviJa`BQYlNl6Da9f2!Pf__3o}Qy4{g+q6JG{|X z+A#u1gC(!>8kL`2OyiC4;APXVtcaHcyi!y#2EUg}LC-1QuNf2M$VV_Qpc>Ayfw7C# zISG~sUT6PTwLQn+MX8?=|y&G%V&|B`{XdC$vN{4|BAg7kQMQGf;rb+Pm`@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Q@%|218fm aw@mexo81x=`|RI})%;EfbOs3kDMvfxY($g* diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bd3003d45977..000000000000 --- a/.travis.yml +++ /dev/null @@ -1,166 +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 - 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 - 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 - -after_success: - - | - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - set -e - if [[ -z ${INTEGRATION} ]]; then - ./.github/deploy.sh - else - echo "Not deploying, because we're in an integration test run" - fi - set +e - fi diff --git a/appveyor.yml b/appveyor.yml index bf6133e98a06..fe6745997ede 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,44 +3,14 @@ environment: 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 + - dummy_dummy_dummy build_script: - - cargo build --features deny-warnings - -test_script: - - cargo test --features deny-warnings + - echo "Dummy" notifications: - provider: Email diff --git a/ci/base-tests.sh b/ci/base-tests.sh deleted file mode 100755 index 010c8919752f..000000000000 --- a/ci/base-tests.sh +++ /dev/null @@ -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 -./util/dev update_lints --check -./util/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 -)