Skip to content

Disable touch controls in Versus split-screen sessions (#18) #62

Disable touch controls in Versus split-screen sessions (#18)

Disable touch controls in Versus split-screen sessions (#18) #62

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
clang-format:
name: 'clang-format'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Run clang-format
run: |
find LEGORacers GolDP common util miniwin 3rdparty/ffmpeg-indeo5/indeo5dec.c 3rdparty/ffmpeg-indeo5/indeo5dec.h \
-iname '*.h' -o -iname '*.cpp' | \
grep -v '3rdparty/ffmpeg-indeo5/shim' | xargs \
pipx run "clang-format>=22,<23" \
--style=file \
-i
- name: Check diff
run: |
git diff --exit-code
ncc:
name: Naming conventions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2
with:
version: '21'
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install python libraries
run: |
pip install clang==21.* pyyaml
- name: Run ncc
run: |
python3 tools/ncc/ncc.py \
--clang-lib ${{ env.LLVM_PATH }}/lib/libclang.so \
--recurse \
--style tools/ncc/ncc.style \
--skip tools/ncc/skip.yml \
--definition DEFINE_GUID PASCAL WINAPI FAR BOOL CALLBACK HWND__=HWND SDLCALL GOLDP_EXPORT_INNER= \
--include \
util \
LEGORacers/include \
LEGORacers \
GolDP/include \
GolDP \
common/include \
common \
--exclude \
LEGORacers/src/app/main.cpp \
LEGORacers/emscripten/filesystem.cpp \
LEGORacers/emscripten/filesystem.h \
LEGORacers/src/video/avireader.cpp \
LEGORacers/src/video/videoplayer.cpp \
LEGORacers/include/video/avireader.h \
--path LEGORacers GolDP common
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: sh
strategy:
fail-fast: false
matrix:
include:
- { name: 'Linux', os: 'ubuntu-latest', generator: 'Ninja' , linux: true }
- { name: 'MSVC (x64)', os: 'windows-latest', generator: 'Ninja' , msvc: true, vc-arch: 'amd64' }
- { name: 'macOS', os: 'macos-latest', generator: 'Ninja' , brew: true }
- { name: 'Emscripten', os: 'ubuntu-latest', generator: 'Ninja' , emsdk: true, cmake-wrapper: 'emcmake' }
steps:
- name: Setup vcvars
if: ${{ !!matrix.msvc }}
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.vc-arch }}
- name: Setup ninja
if: ${{ !!matrix.msvc }}
uses: ashutoshvarma/setup-ninja@master
- name: Install Linux dependencies (apt-get)
if: ${{ matrix.linux }}
run: |
sudo apt-get update
sudo apt-get install -y ninja-build \
libx11-dev libxext-dev libxrandr-dev libxrender-dev libxfixes-dev libxi-dev libxinerama-dev \
libxcursor-dev libwayland-dev libxkbcommon-dev wayland-protocols libgl1-mesa-dev \
libasound2-dev libpulse-dev libxss-dev libxtst-dev
- name: Install macOS dependencies (brew)
if: ${{ matrix.brew }}
run: |
brew update
brew install cmake ninja || true
- name: Install Emscripten dependencies (apt-get)
if: ${{ matrix.emsdk }}
run: |
sudo apt-get update
sudo apt-get install -y ninja-build
- name: Setup Emscripten
if: ${{ matrix.emsdk }}
uses: emscripten-core/setup-emsdk@v15
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure (CMake)
run: |
${{ matrix.cmake-wrapper || '' }} cmake -S . -B build -G "${{ matrix.generator }}" \
-DCMAKE_BUILD_TYPE=Release \
-DDOWNLOAD_DEPENDENCIES=ON \
-Werror=dev
- name: Build (CMake)
run: cmake --build build --config Release
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: legoracers-${{ matrix.name }}
path: |
build/LEGORacers*
!build/LEGORacers*.dir