-
-
Notifications
You must be signed in to change notification settings - Fork 474
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2226 from joto/ci-clang-tidy
Github actions: Add clang-tidy run to CI
- Loading branch information
Showing
6 changed files
with
91 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: Run clang-tidy | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Run clang-tidy | ||
run: run-clang-tidy-17 -q -p build | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: CMake | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: create build directory | ||
run: mkdir build | ||
shell: bash | ||
|
||
- name: configure | ||
run: | | ||
CMAKE_OPTIONS="-LA -DBUILD_TESTS=ON -DWITH_LUAJIT=${LUAJIT_OPTION}" | ||
if [ -n "$WITH_PROJ" ]; then | ||
CMAKE_OPTIONS="$CMAKE_OPTIONS -DWITH_PROJ=$WITH_PROJ" | ||
fi | ||
if [ -n "$CPP_VERSION" ]; then | ||
CMAKE_OPTIONS="$CMAKE_OPTIONS -DCMAKE_CXX_STANDARD=$CPP_VERSION" | ||
fi | ||
if [ -n "$BUILD_TYPE" ]; then | ||
CMAKE_OPTIONS="$CMAKE_OPTIONS -DCMAKE_BUILD_TYPE=$BUILD_TYPE" | ||
fi | ||
cmake $CMAKE_OPTIONS .. | ||
shell: bash | ||
working-directory: build | ||
env: | ||
CXXFLAGS: -pedantic -Wextra ${{ env.EXTRA_FLAGS }} -Werror | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: clang-tidy | ||
|
||
on: [ push, pull_request ] | ||
|
||
jobs: | ||
clang-tidy: | ||
runs-on: ubuntu-24.04 | ||
|
||
env: | ||
CC: clang-18 | ||
CXX: clang++-18 | ||
LUA_VERSION: 5.4 | ||
LUAJIT_OPTION: OFF | ||
POSTGRESQL_VERSION: 16 | ||
POSTGIS_VERSION: 3 | ||
BUILD_TYPE: Debug | ||
PSYCOPG: 3 | ||
PIP_OPTION: --break-system-packages | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/ubuntu-prerequisites | ||
- uses: ./.github/actions/linux-cmake | ||
- uses: ./.github/actions/clang-tidy | ||
|