forked from servo/servo
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (77 loc) · 3.11 KB
/
lint.yml
File metadata and controls
81 lines (77 loc) · 3.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Lint
on:
workflow_call:
workflow_dispatch:
env:
RUST_BACKTRACE: 1
SHELL: /bin/bash
CARGO_INCREMENTAL: 0
jobs:
# Runs the underlying job (“workload”) on a self-hosted runner if available,
# with the help of a `runner-select` job and a `runner-timeout` job.
runner-select:
runs-on: ubuntu-24.04
outputs:
unique-id: ${{ steps.select.outputs.unique-id }}
selected-runner-label: ${{ steps.select.outputs.selected-runner-label }}
runner-type-label: ${{ steps.select.outputs.runner-type-label }}
is-self-hosted: ${{ steps.select.outputs.is-self-hosted }}
steps:
- name: Runner select
id: select
uses: servo/ci-runners/actions/runner-select@f0b81b95522256c64ee207b4236ec71fc23b99a1
with:
GITHUB_TOKEN: ${{ github.token }}
# Before updating the GH action runner image for the nightly job, ensure
# that the system has a glibc version that is compatible with the one
# used by the wpt.fyi runners.
github-hosted-runner-label: ubuntu-22.04
self-hosted-image-name: servo-ubuntu2204
# You can disable self-hosted runners globally by creating a repository variable named
# NO_SELF_HOSTED_RUNNERS with any non-empty value.
# <https://github.com/servo/servo/settings/variables/actions>
NO_SELF_HOSTED_RUNNERS: ${{ vars.NO_SELF_HOSTED_RUNNERS }}
# Any other boolean conditions that disable self-hosted runners go here.
force-github-hosted-runner: ${{ inputs.force-github-hosted-runner }}
lint:
needs:
- runner-select
name: Lint [${{ needs.runner-select.outputs.unique-id }}]
runs-on: ${{ needs.runner-select.outputs.selected-runner-label }}
steps:
- uses: servo/ci-runners/actions/checkout@f0b81b95522256c64ee207b4236ec71fc23b99a1
with:
fetch-depth: 2
- name: Set LIBCLANG_PATH env # needed for bindgen in mozangle
if: ${{ runner.environment != 'self-hosted' }}
run: echo "LIBCLANG_PATH=/usr/lib/llvm-14/lib" >> $GITHUB_ENV
- name: Setup Python
if: ${{ runner.environment != 'self-hosted' }}
uses: ./.github/actions/setup-python
- name: Install taplo
if: ${{ runner.environment != 'self-hosted' }}
uses: baptiste0928/cargo-install@v3
with:
crate: taplo-cli
locked: true
- name: Install cargo-deny
if: ${{ runner.environment != 'self-hosted' }}
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-deny
version: 0.19.0
locked: true
- name: Change Mirror Priorities
if: ${{ runner.environment != 'self-hosted' }}
uses: ./.github/actions/apt-mirrors
- name: Bootstrap dependencies
if: ${{ runner.environment != 'self-hosted' }}
timeout-minutes: 30
run: |
sudo apt update
./mach bootstrap --yes --skip-nextest
- name: Clippy
run: |
./mach clippy --locked --github-annotations -- -- --deny warnings
- name: Tidy
run: ./mach test-tidy --no-progress --all --github-annotations