fastlane, better description #74
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions | |
# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners | |
name: clang-tidy | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install missing software | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y cmake make | |
sudo apt-get install -y libsdl2-dev libsdl2-mixer-dev | |
- name: Install clang | |
run: | | |
sudo apt-get purge --auto-remove llvm python3-lldb-14 llvm-14 | |
wget https://apt.llvm.org/llvm.sh | |
chmod +x llvm.sh | |
sudo ./llvm.sh 17 | |
sudo apt-get install -y clang-tidy-17 | |
- name: Verify clang-tidy configuration | |
run: | | |
clang-tidy-17 --verify-config | |
- name: Prepare CMake | |
run: | | |
cmake -S . -B build -G "Unix Makefiles" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON | |
env: | |
CC: clang-17 | |
CXX: clang++-17 | |
- name: Build | |
run: | | |
cmake --build build --config Release | |
- name: Clang-Tidy | |
run: | | |
run-clang-tidy-17 -p build |