-
Notifications
You must be signed in to change notification settings - Fork 350
67 lines (62 loc) · 1.86 KB
/
checks.yml
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
# Copyright (c) 2022 The Orbit Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
name: checks
on:
pull_request:
branches:
- 'main'
permissions: read-all
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
check-clang-format:
runs-on: ubuntu-22.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Install dependencies
run: |
sudo apt update && \
sudo apt install --yes --no-install-recommends \
clang-format-14 \
git
- name: Check formatting
run: ./contrib/scripts/check-clang-format.sh
shell: bash
- name: 'Upload clang-format diff'
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: clang_format_diff
path: clang_format.diff
retention-days: 1
- run: echo "${{ github.event.number }}" > pr_number.txt
if: success() || failure()
- name: 'Upload PR number'
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: pr_number
path: pr_number.txt
retention-days: 1
check-license-headers:
runs-on: ubuntu-22.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Check license headers
run: ./contrib/scripts/check-license-headers.sh
shell: bash
- name: 'Upload missing license headers'
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: missing_license_headers
path: missing_license_headers.txt
retention-days: 1