diff --git a/.github/actions/cmake/action.yml b/.github/actions/cmake/action.yml index ef2a438..f509cbd 100644 --- a/.github/actions/cmake/action.yml +++ b/.github/actions/cmake/action.yml @@ -12,4 +12,3 @@ runs: -DCMAKE_BUILD_TYPE=${BUILD_TYPE} shell: bash working-directory: build - diff --git a/.github/actions/ctest/action.yml b/.github/actions/ctest/action.yml index ae0d9bb..364ff44 100644 --- a/.github/actions/ctest/action.yml +++ b/.github/actions/ctest/action.yml @@ -7,4 +7,3 @@ runs: run: ctest --output-on-failure shell: bash working-directory: build - diff --git a/.github/actions/install-from-git/action.yml b/.github/actions/install-from-git/action.yml index a80355b..efa3a6b 100644 --- a/.github/actions/install-from-git/action.yml +++ b/.github/actions/install-from-git/action.yml @@ -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 - diff --git a/.github/actions/install-macos/action.yml b/.github/actions/install-macos/action.yml index 3f66800..cf4b586 100644 --- a/.github/actions/install-macos/action.yml +++ b/.github/actions/install-macos/action.yml @@ -9,4 +9,3 @@ runs: gdal \ spatialite-tools shell: bash - diff --git a/.github/actions/install-ubuntu/action.yml b/.github/actions/install-ubuntu/action.yml index 708f14d..07bdcab 100644 --- a/.github/actions/install-ubuntu/action.yml +++ b/.github/actions/install-ubuntu/action.yml @@ -13,4 +13,3 @@ runs: pandoc \ spatialite-bin shell: bash - diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0bf47da..f6e6cb4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -221,4 +221,3 @@ jobs: - uses: ./.github/actions/cmake - uses: ./.github/actions/build - uses: ./.github/actions/ctest - diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml new file mode 100644 index 0000000..e619558 --- /dev/null +++ b/.github/workflows/clang-tidy.yml @@ -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