Skip to content

refactor: remove socket class #42

refactor: remove socket class

refactor: remove socket class #42

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
paths:
- 'src/**'
pull_request:
branches: ["main"]
paths:
- 'src/**'
jobs:
# Run `clang-tidy` static analysis.
tidy:
name: clang-tidy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up SDL3
uses: libsdl-org/setup-sdl@main
with:
install-linux-dependencies: true
version: 3-latest
version-sdl-image: 3-latest
- name: Install clang-tidy 21
run: |
wget -qO llvm.sh https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 21
sudo apt-get install -y clang-tidy-21
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-21 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-21 100
# Omit certain checks that lead to warnings on Linux but not macOS.
- name: Run clang-tidy
run: |
SRCS=$(find src -name "*.cpp" | tr '\n' ' ')
SDL3_INCLUDES="-isystem $(pkg-config --variable=includedir sdl3)"
SDL3_IMAGE_INCLUDES="-isystem $(pkg-config --variable=includedir sdl3-image)"
CXXFLAGS="-std=c++23 -Isrc $SDL3_INCLUDES $SDL3_IMAGE_INCLUDES \
-Wall -Weffc++ -Wextra -Wconversion \
-Wsign-conversion -Wimplicit-fallthrough -Werror"
clang-tidy --warnings-as-errors='*' --checks='-misc-include-cleaner,-clang-diagnostic-error' $SRCS -- $CXXFLAGS