Skip to content

build: Fix bad lua includes in sol.hpp #15776

build: Fix bad lua includes in sol.hpp

build: Fix bad lua includes in sol.hpp #15776

Workflow file for this run

name: Clang-tidy (tiles)
on:
# push:
# branches: [main]
# paths: [ "**.cpp", "**.h", "**.c", "**/CMakeLists.txt", "**.hpp", "**.cmake", "build-scripts/**","tools/clang-tidy-plugin/**", ".github/workflows/clang-tidy.yml", "**/.clang-tidy" ]
workflow_dispatch:
pull_request:
branches: [main]
paths:
[
"**.cpp",
"**.h",
"**.c",
"**/CMakeLists.txt",
"**.hpp",
"**.cmake",
"build-scripts/**",
"tools/clang-tidy-plugin/**",
".github/workflows/clang-tidy.yml",
"**/.clang-tidy",
]
# We only care about the latest revision of a PR, so cancel all previous instances.
concurrency:
group: clang-tidy-build-${{ github.event.pull_request.number || github.ref_name }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
env:
CMAKE: 1
LLVM_VERSION: "22"
CLANG: clang++
COMPILER: clang++
TILES: 1
SOUND: 1
BUILD_PATH: "build"
AFFECTED_FILES: "affected_files.txt"
steps:
- name: checkout repository
uses: actions/checkout@v4
with: { fetch-depth: 2 }
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
gettext mold jq \
sqlite3 libsqlite3-dev zlib1g-dev libvulkan-dev mesa-vulkan-drivers xvfb \
autoconf autoconf-archive automake libtool libltdl-dev
- name: Setup LLVM lint tools
uses: aminya/setup-cpp@v1
with:
compiler: llvm-${{ env.LLVM_VERSION }}
clang-format: ${{ env.LLVM_VERSION }}
clang-tidy: ${{ env.LLVM_VERSION }}
cmake: true
ninja: true
setup-cpp: false
- name: Show LLVM tool versions
run: |
clang++ --version
clang-format --version
clang-tidy --version
llvm-config --version
#- name: Install SDL3
# run: |
# sudo apt-get install --ignore-missing libsdl3-dev libsdl3-ttf-dev libsdl3-image-dev libsdl3-mixer-dev
- name: Install SDL3-devel dependencies
run: |
sudo apt-get install libasound2-dev libpulse-dev libaudio-dev libjack-dev libsndio-dev libx11-dev \
libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxtst-dev libxkbcommon-dev \
libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev \
libibus-1.0-dev libudev-dev libpipewire-0.3-dev libwayland-dev libdecor-0-dev liburing-dev \
libfreetype-dev libharfbuzz-dev \
libtiff-dev libavif-dev libwebp-dev libjpeg-dev libjxl-dev \
libflac-dev libvorbis-dev libxmp-dev libmpg123-dev libwavpack-dev
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: clang-tidy-${{ github.ref_name }}
restore-keys: |
clang-tidy-${{ github.ref_name }}
clang-tidy-main
clang-tidy-
max-size: 500M
verbose: 2
save: ${{ github.event_name != 'pull_request' }}
- name: Install shadercross
run: bash build-scripts/install-shadercross-vcpkg.sh
- name: add problem matcher
run: |
# Enable GitHub actions problem matchers
# (See https://github.com/actions/toolkit/blob/master/docs/problem-matchers.md)
echo "::add-matcher::build-scripts/problem-matchers/catch2.json"
echo "::add-matcher::build-scripts/problem-matchers/debugmsg.json"
- uses: denoland/setup-deno@v2
with: { cache: true }
- name: build clang-tidy plugin
run: |
pip install --break-system-packages lit
bash ./build-scripts/build-clang-tidy-plugin.sh
# - name: test clang-tidy plugin
# run: |
# lit -v $BUILD_PATH/tools/clang-tidy-plugin/test
# clang-tidy --version
- name: gather affected files
run: |
ref=refs/remotes/pull/${{ github.event.pull_request.number }}/merge
git fetch --no-tags --filter=blob:none --depth=2 origin "+refs/pull/${{ github.event.pull_request.number }}/merge:$ref"
deno task affected-files --base "$ref^1" --head "$ref" --output "$AFFECTED_FILES"
- name: run clang-tidy
run: bash ./build-scripts/run-clang-tidy-plugin.sh
- name: show most time consuming checks
if: always()
run: | # the folder may not exist if there is no file to analyze
if [ -d clang-tidy-trace ]
then
jq -n 'reduce(inputs.profile | to_entries[]) as {$key,$value} ({}; .[$key] += $value) | with_entries(select(.key|contains(".wall"))) | to_entries | sort_by(.value) | reverse | .[0:10] | from_entries' clang-tidy-trace/*.json
else
echo "clang-tidy-trace folder not found."
fi