Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,22 @@ on:
branches: [ master ]

jobs:
check_cc:
name: Check Coding Conventions
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2

- name: Install pip dependencies
run: pip install -r requirements.txt

- name: Check code formatting
run: bash infra/scripts/check_formatting.sh .

build:
name: ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.os }}
needs: check_cc

strategy:
fail-fast: false
Expand All @@ -21,10 +34,12 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Install pip dependencies
run: pip install -r requirements.txt

- name: Install dependencies && configure
- name: Install conan dependencies && configure
run: |
pip install 'conan~=2.0'
conan install . --build=missing --profile:all ${{github.workspace}}/.github/profiles/${{matrix.platform.profile}} -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True

- name: Build
Expand Down
1 change: 1 addition & 0 deletions infra/hooks/pre-commit
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ EOF
fi

# Check code formatting
. env/bin/activate
bash ./infra/scripts/check_formatting.sh $(pwd)
FORMATTING_EC=$?
if [[ $FORMATTING_EC -ne 0 ]]; then
Expand Down
2 changes: 1 addition & 1 deletion infra/scripts/apply_formatting.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if [[ ! -d .git ]]; then
fi

echo "Applying code formatting..."
. env/bin/activate && find src/ include/ -regex ".*\.\(hpp\|cpp\|c\|h\)$" -execdir clang-format --style=LLVM -i {} + ;
find src/ include/ -regex ".*\.\(hpp\|cpp\|c\|h\)$" -execdir clang-format --style=LLVM -i {} + ;
FORMATTING_EC=$?
if [[ $FORMATTING_EC -ne 0 ]]; then
exit 1
Expand Down
2 changes: 1 addition & 1 deletion infra/scripts/check_formatting.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if [[ ! -d .git ]]; then
fi

echo "Checking code formatting..."
. env/bin/activate && find src/ include/ -regex ".*\.\(hpp\|cpp\|c\|h\)$" -execdir clang-format --style=LLVM --dry-run --Werror {} + ;
find src/ include/ -regex ".*\.\(hpp\|cpp\|c\|h\)$" -execdir clang-format --style=LLVM --dry-run --Werror {} + ;
FORMATTING_EC=$?
if [[ $FORMATTING_EC -ne 0 ]]; then
exit 1
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
clang-format==20.1.0
conan~=2.0