Skip to content

Fix clang tidy errors not detected as well as the errors #1057

Fix clang tidy errors not detected as well as the errors

Fix clang tidy errors not detected as well as the errors #1057

#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
name: PR validation
on:
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-24.04
timeout-minutes: 120
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Restore vcpkg installed cache
uses: actions/cache@v4
with:
path: build/vcpkg_installed
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json', 'CMakeLists.txt', 'vcpkg-triplets/**') }}
restore-keys: vcpkg-${{ runner.os }}-
- name: Build the project
run: |
cmake -B build -DINTEGRATE_VCPKG=ON -DBUILD_TESTS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build build -j8
- name: Tidy check
run: |
sudo apt-get install -y clang-tidy
./build-support/run_clang_tidy.sh
if [[ $? -ne 0 ]]; then
echo "clang-tidy failed"
exit 1
fi
# Job that will be required to complete and depends on all the other jobs
check-completion:
name: Check Completion
runs-on: ubuntu-latest
needs: [lint]
steps:
- run: true