Skip to content

Commit

Permalink
Github action: Add clang-tidy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
joto committed Dec 18, 2024
1 parent 52beeb8 commit f4541e2
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 6 deletions.
1 change: 0 additions & 1 deletion .github/actions/cmake/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ runs:
-DCMAKE_BUILD_TYPE=${BUILD_TYPE}
shell: bash
working-directory: build

1 change: 0 additions & 1 deletion .github/actions/ctest/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ runs:
run: ctest --output-on-failure
shell: bash
working-directory: build

1 change: 0 additions & 1 deletion .github/actions/install-from-git/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ runs:
git clone --quiet --depth 1 https://github.com/osmcode/libosmium.git ../libosmium
git clone --quiet --depth 1 https://github.com/mapbox/protozero.git ../protozero
shell: bash

1 change: 0 additions & 1 deletion .github/actions/install-macos/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ runs:
gdal \
spatialite-tools
shell: bash

1 change: 0 additions & 1 deletion .github/actions/install-ubuntu/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ runs:
pandoc \
spatialite-bin
shell: bash

1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,4 +221,3 @@ jobs:
- uses: ./.github/actions/cmake
- uses: ./.github/actions/build
- uses: ./.github/actions/ctest

59 changes: 59 additions & 0 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: clang-tidy

on: workflow_dispatch

jobs:
clang-tidy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image: ["debian:bookworm", "debian:testing", "debian:experimental"]
include:
- image: "debian:bookworm"
clang: 15
- image: "debian:testing"
clang: 19
- image: "debian:experimental"
clang: 20
container:
image: ${{ matrix.image }}
env:
BUILD_TYPE: Dev
CC: clang-${{ matrix.clang }}
CXX: clang++-${{ matrix.clang }}
CPP_VERSION: c++14
APT_LISTCHANGES_FRONTEND: none
DEBIAN_FRONTEND: noninteractive
steps:
- name: Prepare container (apt)
run: |
apt-get update -qq
apt-get install -yq \
clang-${{ matrix.clang }} \
clang-tidy-${{ matrix.clang }} \
cmake \
git \
libbz2-dev \
libexpat1-dev \
libgdal-dev \
libgeos-dev \
liblz4-dev \
make \
zlib1g-dev
shell: bash
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/actions/install-protozero
- uses: ./.github/actions/cmake
- name: Run clang-tidy
run: make clang-tidy | tee osmcoastline-${{ github.sha }}-clang-tidy-${{ matrix.clang }}.log
shell: bash
working-directory: build
- name: Upload clang-tidy log
uses: actions/upload-artifact@v4
if: always()
with:
name: osmcoastline-${{ github.sha }}-clang-tidy-${{ matrix.clang }}-log
path: build/osmcoastline-${{ github.sha }}-clang-tidy-${{ matrix.clang }}.log

0 comments on commit f4541e2

Please sign in to comment.