Skip to content

Commit

Permalink
build: run linter on all files on main
Browse files Browse the repository at this point in the history
  • Loading branch information
Taepper committed Jan 29, 2025
1 parent b2d6dfe commit 81bfb8b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,3 +233,25 @@ jobs:
cmake --build build/Debug --target ${file%.cpp}.o
fi
done
linterAll:
name: Build/Run linter on all files
needs: dockerImage
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'trigger-linter')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Determine HEAD_SHA
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "HEAD_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
else
echo "HEAD_SHA=${{ github.sha }}" >> $GITHUB_ENV
fi
- shell: bash
name: Build all files with clang-tidy
run: |
docker build -f ./Dockerfile_linter \
--build-arg DEPENDENCY_IMAGE=ghcr.io/genspectrum/lapis-silo-dependencies:commit-${{ env.HEAD_SHA }}-amd64 .
2 changes: 1 addition & 1 deletion Dockerfile_linter
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ WORKDIR /src
COPY . ./

RUN cmake -D BUILD_WITH_CLANG_TIDY=ON -D CMAKE_BUILD_TYPE=Debug -B build/Debug
RUN cmake --build build/Debug
RUN cmake --build build/Debug --parallel $THREADS

0 comments on commit 81bfb8b

Please sign in to comment.