Skip to content

ci: Migrate to alpine base image #12

ci: Migrate to alpine base image

ci: Migrate to alpine base image #12

Workflow file for this run

name: "C++ Lint"
on:
push:
paths-ignore:
- 'README.md'
jobs:
lint:
name: "clang-tidy"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: jirutka/setup-alpine@v1
with:
branch: v3.19
- name: Install dependencies
run: |
sudo apk update
sudo apk add \
cmake \
clang-extra-tools \
boost-filesystem \
boost-python3 \
lua-dev \
fmt \
gmock \
gtest
shell: alpine.sh {0}
- name: Generate compile_commands.json
run: |
mkdir -pv build
cd build
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
shell: alpine.sh {0}
# Check all source and header C++ files;
# ignore files in the build directory or in hidden directories
- name: Execute clang-tidy
run: find . \( \( -path './build' -o -path '*/.*' \) -prune \) -o
\( -type f -a \( -iname '*.cpp' -o -iname '*.h' \) \)
-exec echo "Linting '{}'..." \;
-exec clang-tidy -p build --warnings-as-errors='*' {} +
shell: alpine.sh {0}