5 # Ignore bors branches, since they are covered by `clippy_bors.yml`
6 branches-ignore: [auto, try]
7 # Don't run Clippy tests, when only textfiles were modified
14 # Don't run Clippy tests, when only textfiles were modified
23 CARGO_TARGET_DIR: '${{ github.workspace }}/target'
28 runs-on: ubuntu-latest
32 - uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
34 github_token: "${{ secrets.github_token }}"
36 - name: rust-toolchain
37 uses: actions-rs/toolchain@v1.0.3
40 target: x86_64-unknown-linux-gnu
44 uses: actions/checkout@v2.0.0
46 - name: Run cargo update
49 - name: Cache cargo dir
50 uses: actions/cache@v1
53 key: ${{ runner.os }}-x86_64-unknown-linux-gnu-${{ hashFiles('Cargo.lock') }}
55 ${{ runner.os }}-x86_64-unknown-linux-gnu
57 - name: Master Toolchain Setup
58 run: bash setup-toolchain.sh
61 - name: Set LD_LIBRARY_PATH (Linux)
63 SYSROOT=$(rustc --print sysroot)
64 echo "::set-env name=LD_LIBRARY_PATH::${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}"
67 run: cargo build --features deny-warnings
70 run: cargo test --features deny-warnings
72 - name: Test clippy_lints
73 run: cargo test --features deny-warnings
74 working-directory: clippy_lints
76 - name: Test rustc_tools_util
77 run: cargo test --features deny-warnings
78 working-directory: rustc_tools_util
80 - name: Test clippy_dev
81 run: cargo test --features deny-warnings
82 working-directory: clippy_dev
84 - name: Test cargo-clippy
85 run: ../target/debug/cargo-clippy
86 working-directory: clippy_workspace_tests
88 - name: Test clippy-driver
89 run: bash .github/driver.sh
94 - name: Run cargo-cache --autoclean
96 cargo +nightly install cargo-cache --debug
97 find ~/.cargo/bin ! -type d -exec strip {} \;
98 cargo cache --autoclean