Skip to content

Commit

Permalink
Use latest clang-tidy for style checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaander committed May 23, 2024
1 parent 99f6cb0 commit 1baed8a
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 42 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/style_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Style check

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:

push:
branches:
- "trunk-*"

workflow_dispatch:

env:
UV_VERSION: 0.2.2

jobs:
clang-tidy:
name: Run clang-tidy
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- name: Set up Python
uses: actions/[email protected]
with:
python-version: 3.12
- name: Install uv
run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/${{ env.UV_VERSION }}/uv-installer.sh | bash
- name: Install prereqs
run: 'uv pip install -r .github/requirements-test.txt --only-binary :all: --system --reinstall'
- name: Configure
run: cmake -B build
- name: Execute clang-tidy
run: clang-tidy-14 -p=build gsd/*.c gsd/*.h scripts/*.cc --quiet --warnings-as-errors="*"

# This job is used to provide a single requirement for branch merge conditions.
checks_complete:
name: Style check
if: always()
needs: [clang-tidy]
runs-on: ubuntu-latest

steps:
- run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
- name: Done
run: exit 0
42 changes: 0 additions & 42 deletions .github/workflows/style_check.yml

This file was deleted.

0 comments on commit 1baed8a

Please sign in to comment.