]> git.lizzy.rs Git - rust.git/blob - .github/workflows/clippy.yml
Auto merge of #9989 - xFrednet:9986-move-safety-thingy, r=flip1995
[rust.git] / .github / workflows / clippy.yml
1 name: Clippy Test
2
3 on:
4   push:
5     # Ignore bors branches, since they are covered by `clippy_bors.yml`
6     branches-ignore:
7       - auto
8       - try
9     # Don't run Clippy tests, when only text files were modified
10     paths-ignore:
11     - 'COPYRIGHT'
12     - 'LICENSE-*'
13     - '**.md'
14     - '**.txt'
15   pull_request:
16     # Don't run Clippy tests, when only text files were modified
17     paths-ignore:
18     - 'COPYRIGHT'
19     - 'LICENSE-*'
20     - '**.md'
21     - '**.txt'
22
23 env:
24   RUST_BACKTRACE: 1
25   CARGO_TARGET_DIR: '${{ github.workspace }}/target'
26   NO_FMT_TEST: 1
27   CARGO_INCREMENTAL: 0
28   CARGO_UNSTABLE_SPARSE_REGISTRY: true
29
30 jobs:
31   base:
32     # NOTE: If you modify this job, make sure you copy the changes to clippy_bors.yml
33     runs-on: ubuntu-latest
34
35     steps:
36     # Setup
37     - uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
38       with:
39         github_token: "${{ secrets.github_token }}"
40
41     - name: Checkout
42       uses: actions/checkout@v3.0.2
43
44     - name: Install toolchain
45       run: rustup show active-toolchain
46
47     # Run
48     - name: Set LD_LIBRARY_PATH (Linux)
49       run: |
50         SYSROOT=$(rustc --print sysroot)
51         echo "LD_LIBRARY_PATH=${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" >> $GITHUB_ENV
52
53     - name: Build
54       run: cargo build --features deny-warnings,internal
55
56     - name: Test
57       run: cargo test --features deny-warnings,internal
58
59     - name: Test clippy_lints
60       run: cargo test --features deny-warnings,internal
61       working-directory: clippy_lints
62
63     - name: Test clippy_utils
64       run: cargo test --features deny-warnings,internal
65       working-directory: clippy_utils
66
67     - name: Test rustc_tools_util
68       run: cargo test --features deny-warnings
69       working-directory: rustc_tools_util
70
71     - name: Test clippy_dev
72       run: cargo test --features deny-warnings
73       working-directory: clippy_dev
74
75     - name: Test clippy-driver
76       run: bash .github/driver.sh
77       env:
78         OS: ${{ runner.os }}