about summary refs log tree commit diff
diff options
context:
space:
mode:
authorflip1995 <hello@philkrones.com>2020-02-07 22:24:41 +0100
committerflip1995 <hello@philkrones.com>2020-02-12 09:34:28 +0100
commitb47dada167dea3d889abd77b7ff584afdaaf0a86 (patch)
treea33b8ddf8324fa3080c46ba933673a6003e1c125
parentabb095ddedd3c918d7c55d028d7f134bf4a507d3 (diff)
downloadrust-b47dada167dea3d889abd77b7ff584afdaaf0a86.tar.gz
rust-b47dada167dea3d889abd77b7ff584afdaaf0a86.zip
Apply review comments
-rw-r--r--.github/deploy.sh2
-rw-r--r--.github/driver.sh2
-rw-r--r--.github/workflows/clippy.yml17
-rw-r--r--.github/workflows/clippy_bors.yml42
-rw-r--r--.github/workflows/clippy_dev.yml6
-rw-r--r--.github/workflows/deploy.yml4
-rw-r--r--.github/workflows/remark.yml4
-rw-r--r--tests/fmt.rs2
8 files changed, 74 insertions, 5 deletions
diff --git a/.github/deploy.sh b/.github/deploy.sh
index d96c69392a1..4fcff830aa6 100644
--- a/.github/deploy.sh
+++ b/.github/deploy.sh
@@ -1,4 +1,4 @@
-#! /bin/bash
+#!/bin/bash
 
 set -ex
 
diff --git a/.github/driver.sh b/.github/driver.sh
index eb81e45a64e..a2e87f5eb37 100644
--- a/.github/driver.sh
+++ b/.github/driver.sh
@@ -1,4 +1,4 @@
-#! /bin/bash
+#!/bin/bash
 
 set -ex
 
diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml
index b4bd9f540bd..fb945060980 100644
--- a/.github/workflows/clippy.yml
+++ b/.github/workflows/clippy.yml
@@ -21,26 +21,31 @@ on:
 env:
   RUST_BACKTRACE: 1
   CARGO_TARGET_DIR: '${{ github.workspace }}/target'
-  GHA_CI: 1
+  NO_FMT_TEST: 1
 
 jobs:
   base:
     runs-on: ubuntu-latest
 
     steps:
+    # Setup
     - uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
       with:
         github_token: "${{ secrets.github_token }}"
+
     - name: rust-toolchain
       uses: actions-rs/toolchain@v1.0.3
       with:
         toolchain: nightly
         target: x86_64-unknown-linux-gnu
         profile: minimal
+
     - name: Checkout
       uses: actions/checkout@v2.0.0
+
     - name: Run cargo update
       run: cargo update
+
     - name: Cache cargo dir
       uses: actions/cache@v1
       with:
@@ -48,34 +53,44 @@ jobs:
         key: ${{ runner.os }}-x86_64-unknown-linux-gnu-${{ hashFiles('Cargo.lock') }}
         restore-keys: |
           ${{ runner.os }}-x86_64-unknown-linux-gnu
+
     - name: Master Toolchain Setup
       run: bash setup-toolchain.sh
 
+    # Run
     - name: Set LD_LIBRARY_PATH (Linux)
       run: |
         SYSROOT=$(rustc --print sysroot)
         echo "::set-env name=LD_LIBRARY_PATH::${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}"
+
     - name: Build
       run: cargo build --features deny-warnings
+
     - name: Test
       run: cargo test --features deny-warnings
+
     - name: Test clippy_lints
       run: cargo test --features deny-warnings
       working-directory: clippy_lints
+
     - name: Test rustc_tools_util
       run: cargo test --features deny-warnings
       working-directory: rustc_tools_util
+
     - name: Test clippy_dev
       run: cargo test --features deny-warnings
       working-directory: clippy_dev
+
     - name: Test cargo-clippy
       run: ../target/debug/cargo-clippy
       working-directory: clippy_workspace_tests
+
     - name: Test clippy-driver
       run: bash .github/driver.sh
       env:
         OS: ${{ runner.os }}
 
+    # Cleanup
     - name: Run cargo-cache --autoclean
       run: |
         cargo install cargo-cache --debug
diff --git a/.github/workflows/clippy_bors.yml b/.github/workflows/clippy_bors.yml
index b1b207416a1..a690573180f 100644
--- a/.github/workflows/clippy_bors.yml
+++ b/.github/workflows/clippy_bors.yml
@@ -7,7 +7,7 @@ on:
 env:
   RUST_BACKTRACE: 1
   CARGO_TARGET_DIR: '${{ github.workspace }}/target'
-  GHA_CI: 1
+  NO_FMT_TEST: 1
 
 jobs:
   changelog:
@@ -21,6 +21,8 @@ jobs:
       uses: actions/checkout@v2.0.0
       with:
         ref: ${{ github.ref }}
+
+    # Run
     - name: Check Changelog
       run: |
         MESSAGE=$(git log --format=%B -n 1)
@@ -64,25 +66,31 @@ jobs:
     runs-on: ${{ matrix.os }}
 
     steps:
+    # Setup
     - uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
       with:
         github_token: "${{ secrets.github_token }}"
+
     - name: Install dependencies (Linux-i686)
       run: |
         sudo dpkg --add-architecture i386
         sudo apt-get update
         sudo apt-get install gcc-multilib libssl-dev:i386 libgit2-dev:i386
       if: matrix.host == 'i686-unknown-linux-gnu'
+
     - name: rust-toolchain
       uses: actions-rs/toolchain@v1.0.3
       with:
         toolchain: nightly
         target: ${{ matrix.host }}
         profile: minimal
+
     - name: Checkout
       uses: actions/checkout@v2.0.0
+
     - name: Run cargo update
       run: cargo update
+
     - name: Cache cargo dir
       uses: actions/cache@v1
       with:
@@ -90,12 +98,14 @@ jobs:
         key: ${{ runner.os }}-${{ matrix.host }}-${{ hashFiles('Cargo.lock') }}
         restore-keys: |
           ${{ runner.os }}-${{ matrix.host }}
+
     - name: Master Toolchain Setup
       run: bash setup-toolchain.sh
       env:
         HOST_TOOLCHAIN: ${{ matrix.host }}
       shell: bash
 
+    # Run
     - name: Set LD_LIBRARY_PATH (Linux)
       if: runner.os == 'Linux'
       run: |
@@ -113,34 +123,42 @@ jobs:
         $sysroot = rustc --print sysroot
         $env:PATH += ';' + $sysroot + '\bin'
         echo "::set-env name=PATH::$env:PATH"
+
     - name: Build
       run: cargo build --features deny-warnings
       shell: bash
+
     - name: Test
       run: cargo test --features deny-warnings
       shell: bash
+
     - name: Test clippy_lints
       run: cargo test --features deny-warnings
       shell: bash
       working-directory: clippy_lints
+
     - name: Test rustc_tools_util
       run: cargo test --features deny-warnings
       shell: bash
       working-directory: rustc_tools_util
+
     - name: Test clippy_dev
       run: cargo test --features deny-warnings
       shell: bash
       working-directory: clippy_dev
+
     - name: Test cargo-clippy
       run: ../target/debug/cargo-clippy
       shell: bash
       working-directory: clippy_workspace_tests
+
     - name: Test clippy-driver
       run: bash .github/driver.sh
       shell: bash
       env:
         OS: ${{ runner.os }}
 
+    # Cleanup
     - name: Run cargo-cache --autoclean
       run: |
         cargo install cargo-cache --debug
@@ -152,19 +170,24 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
+    # Setup
     - uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
       with:
         github_token: "${{ secrets.github_token }}"
+
     - name: rust-toolchain
       uses: actions-rs/toolchain@v1.0.3
       with:
         toolchain: nightly
         target: x86_64-unknown-linux-gnu
         profile: minimal
+
     - name: Checkout
       uses: actions/checkout@v2.0.0
+
     - name: Run cargo update
       run: cargo update
+
     - name: Cache cargo dir
       uses: actions/cache@v1
       with:
@@ -172,22 +195,28 @@ jobs:
         key: ${{ runner.os }}-x86_64-unknown-linux-gnu-${{ hashFiles('Cargo.lock') }}
         restore-keys: |
           ${{ runner.os }}-x86_64-unknown-linux-gnu
+
     - name: Master Toolchain Setup
       run: bash setup-toolchain.sh
 
+    # Run
     - name: Build Integration Test
       run: cargo test --test integration --features integration --no-run
+
+    # Upload
     - name: Extract Binaries
       run: |
         DIR=$CARGO_TARGET_DIR/debug
         find $DIR ! -executable -o -type d ! -path $DIR | xargs rm -rf
         mv $DIR/integration-* $DIR/integration
+
     - name: Upload Binaries
       uses: actions/upload-artifact@v1
       with:
         name: target
         path: target
 
+    # Cleanup
     - name: Run cargo-cache --autoclean
       run: |
         cargo install cargo-cache --debug
@@ -219,19 +248,24 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
+    # Setup
     - uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
       with:
         github_token: "${{ secrets.github_token }}"
+
     - name: rust-toolchain
       uses: actions-rs/toolchain@v1.0.3
       with:
         toolchain: nightly
         target: x86_64-unknown-linux-gnu
         profile: minimal
+
     - name: Checkout
       uses: actions/checkout@v2.0.0
+
     - name: Run cargo update
       run: cargo update
+
     - name: Cache cargo dir
       uses: actions/cache@v1
       with:
@@ -239,22 +273,28 @@ jobs:
         key: ${{ runner.os }}-x86_64-unknown-linux-gnu-${{ hashFiles('Cargo.lock') }}
         restore-keys: |
           ${{ runner.os }}-x86_64-unknown-linux-gnu
+
     - name: Master Toolchain Setup
       run: bash setup-toolchain.sh
 
+    # Download
     - name: Download target dir
       uses: actions/download-artifact@v1
       with:
         name: target
         path: target
+
     - name: Make Binaries Executable
       run: chmod +x $CARGO_TARGET_DIR/debug/*
+
+    # Run
     - name: Test ${{ matrix.integration }}
       run: $CARGO_TARGET_DIR/debug/integration
       env:
         INTEGRATION: ${{ matrix.integration }}
         RUSTUP_TOOLCHAIN: master
 
+    # Cleanup
     - name: Run cargo-cache --autoclean
       run: |
         cargo install cargo-cache --debug
diff --git a/.github/workflows/clippy_dev.yml b/.github/workflows/clippy_dev.yml
index f9e5d73a345..d6f5db014a4 100644
--- a/.github/workflows/clippy_dev.yml
+++ b/.github/workflows/clippy_dev.yml
@@ -19,6 +19,7 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
+    # Setup
     - name: rust-toolchain
       uses: actions-rs/toolchain@v1.0.3
       with:
@@ -26,16 +27,21 @@ jobs:
         target: x86_64-unknown-linux-gnu
         profile: minimal
         components: rustfmt
+
     - name: Checkout
       uses: actions/checkout@v2.0.0
 
+    # Run
     - name: Build
       run: cargo build --features deny-warnings
       working-directory: clippy_dev
+
     - name: Test limit-stderr-length
       run: cargo dev --limit-stderr-length
+
     - name: Test update_lints
       run: cargo dev update_lints --check
+
     - name: Test fmt
       run: cargo dev fmt --check
 
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index a3c9b1784a1..6f79891358e 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -17,13 +17,17 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
+    # Setup
     - name: Checkout
       uses: actions/checkout@v2.0.0
+
     - name: Checkout
       uses: actions/checkout@v2.0.0
       with:
         ref: ${{ env.TARGET_BRANCH }}
         path: 'out'
+
+    # Run
     - name: Deploy
       run: |
         eval "$(ssh-agent -s)"
diff --git a/.github/workflows/remark.yml b/.github/workflows/remark.yml
index 8059dbf433b..3544053d399 100644
--- a/.github/workflows/remark.yml
+++ b/.github/workflows/remark.yml
@@ -12,13 +12,17 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
+    # Setup
     - name: Checkout
       uses: actions/checkout@v2.0.0
+
     - name: Setup Node.js
       uses: actions/setup-node@v1.1.0
+
     - name: Install remark
       run: npm install remark-cli remark-lint remark-lint-maximum-line-length remark-preset-lint-recommended
 
+    # Run
     - name: Check *.md files
       run: git ls-files -z '*.md' | xargs -0 -n 1 -I {} ./node_modules/.bin/remark {} -u lint -f > /dev/null
 
diff --git a/tests/fmt.rs b/tests/fmt.rs
index e2675fa0968..3aff8741f60 100644
--- a/tests/fmt.rs
+++ b/tests/fmt.rs
@@ -3,7 +3,7 @@ use std::process::Command;
 
 #[test]
 fn fmt() {
-    if option_env!("RUSTC_TEST_SUITE").is_some() || option_env!("GHA_CI").is_some() {
+    if option_env!("RUSTC_TEST_SUITE").is_some() || option_env!("NO_FMT_TEST").is_some() {
         return;
     }