Skip to content

Commit f4541e2

Browse files
committed
Github action: Add clang-tidy workflow
1 parent 52beeb8 commit f4541e2

File tree

7 files changed

+59
-6
lines changed

7 files changed

+59
-6
lines changed

.github/actions/cmake/action.yml

-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ runs:
1212
-DCMAKE_BUILD_TYPE=${BUILD_TYPE}
1313
shell: bash
1414
working-directory: build
15-

.github/actions/ctest/action.yml

-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ runs:
77
run: ctest --output-on-failure
88
shell: bash
99
working-directory: build
10-

.github/actions/install-from-git/action.yml

-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ runs:
88
git clone --quiet --depth 1 https://github.com/osmcode/libosmium.git ../libosmium
99
git clone --quiet --depth 1 https://github.com/mapbox/protozero.git ../protozero
1010
shell: bash
11-

.github/actions/install-macos/action.yml

-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ runs:
99
gdal \
1010
spatialite-tools
1111
shell: bash
12-

.github/actions/install-ubuntu/action.yml

-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ runs:
1313
pandoc \
1414
spatialite-bin
1515
shell: bash
16-

.github/workflows/ci.yml

-1
Original file line numberDiff line numberDiff line change
@@ -221,4 +221,3 @@ jobs:
221221
- uses: ./.github/actions/cmake
222222
- uses: ./.github/actions/build
223223
- uses: ./.github/actions/ctest
224-

.github/workflows/clang-tidy.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: clang-tidy
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
clang-tidy:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
image: ["debian:bookworm", "debian:testing", "debian:experimental"]
12+
include:
13+
- image: "debian:bookworm"
14+
clang: 15
15+
- image: "debian:testing"
16+
clang: 19
17+
- image: "debian:experimental"
18+
clang: 20
19+
container:
20+
image: ${{ matrix.image }}
21+
env:
22+
BUILD_TYPE: Dev
23+
CC: clang-${{ matrix.clang }}
24+
CXX: clang++-${{ matrix.clang }}
25+
CPP_VERSION: c++14
26+
APT_LISTCHANGES_FRONTEND: none
27+
DEBIAN_FRONTEND: noninteractive
28+
steps:
29+
- name: Prepare container (apt)
30+
run: |
31+
apt-get update -qq
32+
apt-get install -yq \
33+
clang-${{ matrix.clang }} \
34+
clang-tidy-${{ matrix.clang }} \
35+
cmake \
36+
git \
37+
libbz2-dev \
38+
libexpat1-dev \
39+
libgdal-dev \
40+
libgeos-dev \
41+
liblz4-dev \
42+
make \
43+
zlib1g-dev
44+
shell: bash
45+
- uses: actions/checkout@v4
46+
with:
47+
submodules: true
48+
- uses: ./.github/actions/install-protozero
49+
- uses: ./.github/actions/cmake
50+
- name: Run clang-tidy
51+
run: make clang-tidy | tee osmcoastline-${{ github.sha }}-clang-tidy-${{ matrix.clang }}.log
52+
shell: bash
53+
working-directory: build
54+
- name: Upload clang-tidy log
55+
uses: actions/upload-artifact@v4
56+
if: always()
57+
with:
58+
name: osmcoastline-${{ github.sha }}-clang-tidy-${{ matrix.clang }}-log
59+
path: build/osmcoastline-${{ github.sha }}-clang-tidy-${{ matrix.clang }}.log

0 commit comments

Comments
 (0)