You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by xy...@apache.org on 2024/03/05 04:35:58 UTC
(pulsar-client-cpp) branch main updated: [CI] Pin the clang-format version to 11 (#412)
This is an automated email from the ASF dual-hosted git repository.
xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git
The following commit(s) were added to refs/heads/main by this push:
new 747c186 [CI] Pin the clang-format version to 11 (#412)
747c186 is described below
commit 747c1863018cb345b4e2bbbaaf7a6549c9c6b429
Author: Yunze Xu <xy...@163.com>
AuthorDate: Tue Mar 5 12:35:52 2024 +0800
[CI] Pin the clang-format version to 11 (#412)
### Motivation
The `clang-format` tool on `ubuntu:22.04` runner was upgraded to 14
recently, whose rule is slightly different from 11.
### Modifications
Use clang-format-action for code format check and specify the
version to 11.
---
.github/workflows/ci-pr-validation.yaml | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci-pr-validation.yaml b/.github/workflows/ci-pr-validation.yaml
index 61134aa..d9dc2ca 100644
--- a/.github/workflows/ci-pr-validation.yaml
+++ b/.github/workflows/ci-pr-validation.yaml
@@ -29,8 +29,20 @@ concurrency:
jobs:
+ formatting-check:
+ name: Formatting Check
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - name: Run clang-format style check for C/C++/Protobuf programs.
+ uses: jidicula/clang-format-action@v4.11.0
+ with:
+ clang-format-version: '11'
+ exclude-regex: '.*\.(proto|hpp)'
+
wireshark-dissector-build:
name: Build the Wireshark dissector
+ needs: formatting-check
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
@@ -61,6 +73,7 @@ jobs:
unit-tests:
name: Run unit tests
+ needs: formatting-check
runs-on: ubuntu-22.04
timeout-minutes: 120
@@ -81,8 +94,8 @@ jobs:
./vcpkg/vcpkg format-manifest vcpkg.json
if [[ $(git diff | wc -l) -gt 0 ]]; then
echo "Please run `./vcpkg/vcpkg format-manifest vcpkg.json` to reformat vcpkg.json"
+ exit 1
fi
- make check-format
- name: Build tests
run: |
@@ -103,6 +116,7 @@ jobs:
cpp20-build:
name: Build with the C++20 standard
+ needs: formatting-check
runs-on: ubuntu-22.04
timeout-minutes: 60
@@ -288,6 +302,7 @@ jobs:
cpp-build-macos:
timeout-minutes: 120
name: Build CPP Client on macOS
+ needs: formatting-check
runs-on: macos-12
steps:
- name: checkout
@@ -337,7 +352,7 @@ jobs:
check-completion:
name: Check Completion
runs-on: ubuntu-latest
- needs: [wireshark-dissector-build, unit-tests, cpp20-build, cpp-build-windows, package, cpp-build-macos]
+ needs: [formatting-check, wireshark-dissector-build, unit-tests, cpp20-build, cpp-build-windows, package, cpp-build-macos]
steps:
- run: true