mirror of
https://github.com/google/cpu_features.git
synced 2025-09-16 08:55:25 +02:00
![dependabot[bot]](/assets/img/avatar_default.png)
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4 to 5 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
25 lines
924 B
YAML
25 lines
924 B
YAML
name: clang-format Check
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
# Building using the github runner environement directly.
|
|
clang-format:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- name: Fetch origin/main
|
|
run: git fetch origin main
|
|
- name: List of changed file(s)
|
|
run: git diff --name-only FETCH_HEAD
|
|
|
|
- name: Build clang-format docker
|
|
run: cd .github/workflows && docker build --tag=linter .
|
|
- name: Check clang-format
|
|
run: docker run --rm --init -v $(pwd):/repo linter:latest clang-format --version
|
|
- name: clang-format help
|
|
run: docker run --rm --init -v $(pwd):/repo linter:latest clang-format --help
|
|
|
|
- name: Check current commit
|
|
run: docker run --rm --init -v $(pwd):/repo -w /repo linter:latest sh -c "git diff --diff-filter=d --name-only FETCH_HEAD | grep '\.c$\|\.h$\|\.cc$' | xargs clang-format --style=file --dry-run --Werror "
|