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
31 - uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
33 github_token: "${{ secrets.github_token }}"
34 - name: rust-toolchain
35 uses: actions-rs/toolchain@v1.0.3
38 target: x86_64-unknown-linux-gnu
40 - name: Cache cargo dir
41 uses: actions/cache@v1
44 key: ${{ runner.os }}-x86_64-unknown-linux-gnu
46 uses: actions/checkout@v2.0.0
47 - name: Master Toolchain Setup
48 run: bash setup-toolchain.sh
50 - name: Set LD_LIBRARY_PATH (Linux)
52 SYSROOT=$(rustc --print sysroot)
53 echo "::set-env name=LD_LIBRARY_PATH::${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}"
55 run: cargo build --features deny-warnings
57 run: cargo test --features deny-warnings
58 - name: Test clippy_lints
59 run: cargo test --features deny-warnings
60 working-directory: clippy_lints
61 - name: Test rustc_tools_util
62 run: cargo test --features deny-warnings
63 working-directory: rustc_tools_util
64 - name: Test clippy_dev
65 run: cargo test --features deny-warnings
66 working-directory: clippy_dev
67 - name: Test cargo-clippy
68 run: ../target/debug/cargo-clippy
69 working-directory: clippy_workspace_tests
70 - name: Test clippy-driver
71 run: bash .github/driver.sh
75 - name: Run cargo-cache --autoclean
77 cargo install cargo-cache --debug
78 find ~/.cargo/bin ! -type d -exec strip {} \;
79 cargo cache --autoclean