-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (75 loc) · 2.48 KB
/
code-quality.yml
File metadata and controls
90 lines (75 loc) · 2.48 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
82
83
84
85
86
87
88
89
90
name: Code Quality Checks
on:
push:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
formatting-check:
name: Check clang-format
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Formatting Check
uses: jidicula/clang-format-action@v4.13.0
with:
clang-format-version: 19
include-regex: './(category|cmd|test)/.*\.(cpp|hpp|c|h)'
traits-check:
name: Trait instantiation check
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
submodules: false
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
uses: actions/setup-python@v5
- name: Check instantiations
run: uv run scripts/check-trait-instantiations.py category
clang-tidy:
name: Check clang-tidy
runs-on: ubuntu-24.04-32
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.REPO_READONLY_GITHUB_APP_ID }}
private_key: ${{ secrets.REPO_READONLY_GITHUB_APP_KEY }}
# Limit permissions to what we need (these need to be
# configured in the app settings as well).
permissions: >-
{"contents": "read"}
- name: Tell git to do submodules in parallel
run: |
git config --global submodule.fetchJobs "$(nproc)"
- uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ steps.generate_token.outputs.token }}
- uses: actions/checkout@v5
with:
repository: category-labs/evmone
token: ${{ steps.generate_token.outputs.token }}
ref: v0.18.0-category
path: third_party/evmone
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build `base` stage
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
target: base
cache-from: type=gha,scope=base
cache-to: type=gha,scope=base,mode=max
- name: Build `code_quality` stage
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
target: code_quality
cache-from: type=gha,scope=base