-
Notifications
You must be signed in to change notification settings - Fork 268
61 lines (58 loc) · 1.99 KB
/
syntax-checks.yaml
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
name: Syntactic checks
on:
pull_request:
branches: [ develop ]
jobs:
# This job takes approximately 1 minute
check-clang-format:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Fetch dependencies
env:
# This is needed in addition to -yq to prevent apt-get from asking for
# user input
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -yq clang-format-11
- name: Check updated lines of code match clang-format-11 style
env:
BASE_BRANCH: ${{ github.base_ref }}
MERGE_BRANCH: ${{ github.ref }}
run: ./.github/workflows/pull-request-check-clang-format.sh
# This job takes approximately 1 minute
check-cpplint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Fetch dependencies
env:
# This is needed in addition to -yq to prevent apt-get from asking for
# user input
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -yq python3-unidiff
- name: Check updated lines of code meet linting standards
env:
BASE_BRANCH: ${{ github.base_ref }}
MERGE_BRANCH: ${{ github.ref }}
run: ./.github/workflows/pull-request-check-cpplint.sh
# This job should take about a minute (est)
check-rustfmt:
runs-on: ubuntu-latest
steps:
- name: Checkout CBMC repository
uses: actions/checkout@v4
- name: Install latest stable Rust toolchain
run: |
rustup toolchain install stable --profile minimal --no-self-update -c clippy -c rustfmt
- name: Run `cargo fmt` on top of Rust API project
run: cd src/libcprover-rust; cargo fmt --all -- --check