Skip to content

Apply relaxed merge to reserve balance and validate transaction. Enable relaxed merge. #3312

Apply relaxed merge to reserve balance and validate transaction. Enable relaxed merge.

Apply relaxed merge to reserve balance and validate transaction. Enable relaxed merge. #3312

Workflow file for this run

name: Code Quality Checks
on:
push:
branches: ["main"]
pull_request:
types: [ opened, synchronize, reopened, edited ]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: >
${{
(github.event_name == 'push' && format('push-{0}-code-quality', github.ref))
|| (github.event_name == 'pull_request' && format('pr-{0}-code-quality', github.event.pull_request.number))
|| (github.event_name == 'workflow_dispatch' && format('workflow-dispatch-{0}-code-quality', github.run_id))
|| format('{0}-code-quality', github.run_id)
}}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
formatting-check:
name: Check clang-format
runs-on: ubuntu-24.04
env:
LLVM_VERSION: '19'
steps:
- uses: actions/checkout@v4
with:
submodules: false
- name: Install clang-format-${{ env.LLVM_VERSION }}
run: |
wget https://apt.llvm.org/llvm.sh
sudo bash llvm.sh ${{ env.LLVM_VERSION }}
sudo apt install -y clang-format-${{ env.LLVM_VERSION }}
- name: Run clang-format check
run: |
find category cmd test -regex '.*\.\(cpp\|hpp\|c\|h\)' -exec clang-format-${{ env.LLVM_VERSION }} -style=file --dry-run --Werror {} +
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 `code_quality` stage
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
target: code_quality
cache-from: type=gha,scope=base