Skip to content

Commit 583defe

Browse files
committed
Refactor GitHub check action
This removes the messy bin/check-cmake.php script in favor of separate steps: - running codespell for grammar typos - running normalizator.phar for common Git repository and files checks - and upcoming normalizer.cmake for CMake code style checks (currently in development and experimentation phase)
1 parent 63811b3 commit 583defe

File tree

4 files changed

+19
-879
lines changed

4 files changed

+19
-879
lines changed

.github/workflows/check-cmake.yaml renamed to .github/workflows/check.yaml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,35 @@ jobs:
1616
with:
1717
fetch-depth: 2
1818

19-
- name: Setup Python
20-
uses: actions/setup-python@v5
19+
- name: Install CMake
20+
uses: lukka/get-cmake@latest
2121

22-
- name: Setup PHP
22+
- name: Install PHP
2323
uses: shivammathur/setup-php@v2
2424
with:
2525
php-version: 8.4
26-
tools: php-cs-fixer
26+
27+
- name: Install Python
28+
uses: actions/setup-python@v5
2729

2830
- name: Install checking tools
2931
run: |
3032
pipx install codespell
31-
pipx install gersemi
3233
curl -OL https://github.com/petk/normalizator/releases/latest/download/normalizator.phar
3334
chmod +x normalizator.phar
3435
mv normalizator.phar /usr/local/bin/normalizator
36+
# curl -OL https://github.com/petk/cmake-normalizer/releases/latest/download/normalizer.cmake
37+
# chmod +x normalizer.cmake
38+
# mv normalizer.cmake /usr/local/bin/normalizer.cmake
3539

36-
- name: Run checks
37-
run: ./bin/check-cmake.php
40+
- name: Run Codespell
41+
continue-on-error: true
42+
run: codespell
3843

39-
# TODO: Remove PHP_CS_FIXER_IGNORE_ENV once php-cs-fixer supports PHP 8.4.
40-
- name: Run PHP CS Fixer
41-
run: |
42-
PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer check \
43-
--diff \
44-
--rules=@Symfony,@PER-CS \
45-
--using-cache=no \
46-
-- bin
44+
- name: Run normalizator.phar
45+
continue-on-error: true
46+
run: normalizator check --not php-src --not .git .
47+
48+
# - name: Run normalizer.cmake
49+
# continue-on-error: true
50+
# run: normalizer.cmake

0 commit comments

Comments
 (0)