Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
44c0518
feat(ci): cross-platform CI/CD pipeline
mannie-exe Feb 23, 2026
0795a6d
fix(ci): resolve cross-platform build failures
mannie-exe Feb 24, 2026
205c019
fix(ci): resolve cross-platform failures, optimize CI, update deps
mannie-exe Feb 24, 2026
00bec8f
fix: neutralize X11 and Windows macro pollution in Quill headers
mannie-exe Feb 24, 2026
809e3ae
style: apply clang-format to entire codebase + fix lint warnings
mannie-exe Feb 24, 2026
0373edb
fix: move X11 macro undefs to WebView.hh for full coverage
mannie-exe Feb 24, 2026
63c77ae
fix: add missing <algorithm> include and fix clang-format 18 compat
mannie-exe Feb 24, 2026
821cf3e
fix: suppress DXIL shader profile on Windows
mannie-exe Feb 24, 2026
6fc3ba3
fix: set LLVM_PROFILE_FILE for coverage profraw output
mannie-exe Feb 24, 2026
8107199
fix: rename near/far params to zNear/zFar for MSVC compatibility
mannie-exe Feb 24, 2026
8f2bf44
fix: add SDL_main.h for WinMain entry point on Windows
mannie-exe Feb 24, 2026
11bb95e
fix: address clang-tidy warnings from cpp-linter report
mannie-exe Feb 24, 2026
b799c4f
fix: add actions:read permission to CodeQL workflow
mannie-exe Feb 24, 2026
3e29cfb
chore: remove CodeQL workflow (requires GHAS for private repos)
mannie-exe Feb 24, 2026
742ff83
chore: streamline CI and add local mise tasks
mannie-exe Feb 24, 2026
9ac4efb
fix: local lint/format findings and improve mise tasks
mannie-exe Feb 24, 2026
8c438c2
chore: scope LLVM toolchain to project via mise [env]
mannie-exe Feb 24, 2026
1bfecee
chore: remove CodeQL workflow (too slow for CI)
mannie-exe Feb 24, 2026
b4049ba
feat: add local CodeQL analysis via mise
mannie-exe Feb 24, 2026
d1ebb69
fix: align CI clang-format version with local (18 -> 21)
mannie-exe Feb 24, 2026
eb9dac0
refactor: unify CI and local build configuration
mannie-exe Feb 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
Language: Cpp
Standard: c++20

# Indentation
IndentWidth: 4
TabWidth: 4
UseTab: Never
NamespaceIndentation: None
IndentCaseLabels: true
IndentPPDirectives: None
IndentRequiresClause: true

# Line width
ColumnLimit: 120

# Braces
BreakBeforeBraces: Attach

# Alignment
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignOperands: Align
AlignTrailingComments: true

# Short forms
AllowShortFunctionsOnASingleLine: Inline
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Inline
AllowShortLoopsOnASingleLine: false

# Pointers and references
PointerAlignment: Left
ReferenceAlignment: Left

# Templates and requires
SpaceAfterTemplateKeyword: true
RequiresClausePosition: OwnLine

# Includes
SortIncludes: CaseInsensitive
IncludeBlocks: Preserve

# Spaces
SpaceBeforeParens: ControlStatements
SpaceInEmptyBlock: false
SpacesInAngles: Never
SpacesInParens: Never

# Breaking
BreakConstructorInitializers: BeforeColon
PackConstructorInitializers: NextLine
BinPackArguments: true
BinPackParameters: true
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: true
BreakStringLiterals: true

# Lambdas
LambdaBodyIndentation: Signature

# Misc
InsertBraces: false
InsertNewlineAtEOF: true
MaxEmptyLinesToKeep: 1
EmptyLineBeforeAccessModifier: LogicalBlock
SeparateDefinitionBlocks: Leave
...
61 changes: 61 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
# Fabric Engine clang-tidy configuration
#
# Advisory mode: WarningsAsErrors is empty so findings are informational.
# Tighten as the codebase matures.

Checks: >
-*,
bugprone-*,
-bugprone-easily-swappable-parameters,
cert-*,
-cert-err58-cpp,
concurrency-*,
cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-avoid-magic-numbers,
modernize-use-override,
modernize-use-nullptr,
-modernize-use-trailing-return-type,
performance-*,
readability-identifier-naming,
-readability-magic-numbers

WarningsAsErrors: ''

HeaderFilterRegex: 'include/fabric/.*'

CheckOptions:
# Naming conventions (match existing Fabric style)
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.EnumConstantCase
value: CamelCase
- key: readability-identifier-naming.FunctionCase
value: camelBack
- key: readability-identifier-naming.MemberCase
value: camelBack
- key: readability-identifier-naming.MethodCase
value: camelBack
- key: readability-identifier-naming.NamespaceCase
value: lower_case
- key: readability-identifier-naming.NamespaceIgnoredRegexp
value: '^(Space|Utils|Test)$'
- key: readability-identifier-naming.ParameterCase
value: camelBack
- key: readability-identifier-naming.PrivateMemberSuffix
value: '_'
- key: readability-identifier-naming.TemplateParameterCase
value: CamelCase
- key: readability-identifier-naming.TypeAliasCase
value: CamelCase
- key: readability-identifier-naming.VariableCase
value: camelBack
- key: readability-identifier-naming.VariableIgnoredRegexp
value: '^[A-Z][A-Z_]*$'
- key: readability-identifier-naming.ConstexprVariableCase
value: UPPER_CASE
- key: readability-identifier-naming.GlobalVariablePrefix
value: 'g_'
...
113 changes: 113 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: CI

on:
push:
branches: [main]
paths: [src/**, include/**, tests/**, CMakeLists.txt, cmake/**, CMakePresets.json]
pull_request:
branches: [main]
paths: [src/**, include/**, tests/**, CMakeLists.txt, cmake/**, CMakePresets.json]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: ${{ matrix.target }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 30

strategy:
fail-fast: false
matrix:
include:
- target: Linux AMD64
runner: blacksmith-4vcpu-ubuntu-2404
preset: ci-linux-gcc
os: linux
arch: x64
compiler_cache: ccache
- target: Linux ARM64
runner: blacksmith-4vcpu-ubuntu-2404-arm
preset: ci-linux-gcc
os: linux
arch: arm64
compiler_cache: ccache
- target: Windows AMD64
runner: blacksmith-4vcpu-windows-2025
preset: ci-windows
os: windows
arch: amd64
compiler_cache: sccache
- target: macOS ARM64
runner: macos-26
preset: ci-macos
os: macos
arch: arm64
compiler_cache: ccache

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Install dependencies (Linux)
if: matrix.os == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y ninja-build pkg-config \
libwebkit2gtk-4.1-dev libvulkan-dev libfreetype-dev \
libx11-dev libxext-dev libxrandr-dev libxcursor-dev \
libxfixes-dev libxi-dev libxss-dev \
libwayland-dev libxkbcommon-dev libdrm-dev libgbm-dev \
libgl-dev libegl-dev \
libasound2-dev libpulse-dev libpipewire-0.3-dev \
libdbus-1-dev libudev-dev

- name: Setup MSVC (Windows)
if: matrix.os == 'windows'
uses: ilammy/msvc-dev-cmd@v1.13.0
with:
arch: ${{ matrix.arch }}

- name: Install Ninja (Windows)
if: matrix.os == 'windows'
run: choco install ninja -y

- name: Install dependencies (macOS)
if: matrix.os == 'macos'
run: brew install ninja cmake

- name: Cache FetchContent
uses: actions/cache@v5
with:
path: build/${{ matrix.preset }}/_deps
key: ${{ matrix.target }}-deps-${{ hashFiles('CMakeLists.txt', 'cmake/modules/*.cmake') }}
restore-keys: |
${{ matrix.target }}-deps-

- name: Setup ccache
if: matrix.compiler_cache == 'ccache'
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ matrix.target }}

- name: Setup sccache (Windows)
if: matrix.compiler_cache == 'sccache'
uses: mozilla-actions/sccache-action@v0.0.9

- name: Configure
run: cmake --preset ${{ matrix.preset }}
env:
CMAKE_C_COMPILER_LAUNCHER: ${{ matrix.compiler_cache }}
CMAKE_CXX_COMPILER_LAUNCHER: ${{ matrix.compiler_cache }}

- name: Build
run: cmake --build build/${{ matrix.preset }} -j

- name: Test
run: ctest --test-dir build/${{ matrix.preset }} --output-on-failure
80 changes: 80 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Coverage

on:
pull_request:
branches: [main]
paths: [src/**, include/**, tests/**, CMakeLists.txt, cmake/**]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
coverage:
name: Code Coverage
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 20

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build clang llvm pkg-config \
libwebkit2gtk-4.1-dev libvulkan-dev libfreetype-dev \
libx11-dev libxext-dev libxrandr-dev libxcursor-dev \
libxfixes-dev libxi-dev libxss-dev \
libwayland-dev libxkbcommon-dev libdrm-dev libgbm-dev \
libgl-dev libegl-dev \
libasound2-dev libpulse-dev libpipewire-0.3-dev \
libdbus-1-dev libudev-dev

- name: Cache FetchContent
uses: actions/cache@v5
with:
path: build/ci-coverage/_deps
key: linux-amd64-coverage-deps-${{ hashFiles('CMakeLists.txt', 'cmake/modules/*.cmake') }}
restore-keys: |
linux-amd64-coverage-deps-

- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: linux-amd64-coverage

- name: Configure
run: cmake --preset ci-coverage
env:
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache

- name: Build
run: cmake --build build/ci-coverage -j

- name: Test
run: ctest --test-dir build/ci-coverage --output-on-failure
env:
LLVM_PROFILE_FILE: "${{ github.workspace }}/build/ci-coverage/fabric-%p.profraw"

- name: Merge profiles
run: llvm-profdata merge -sparse build/ci-coverage/fabric-*.profraw -o build/ci-coverage/coverage.profdata

- name: Generate lcov report
run: |
llvm-cov export \
build/ci-coverage/bin/UnitTests \
-instr-profile=build/ci-coverage/coverage.profdata \
-format=lcov \
-ignore-filename-regex='build/|_deps/|tests/' \
> build/ci-coverage/coverage.lcov

- name: Upload to Codecov
uses: codecov/codecov-action@v5
with:
files: build/ci-coverage/coverage.lcov
51 changes: 51 additions & 0 deletions .github/workflows/dependency-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Dependency Scan

on:
schedule:
- cron: "0 8 * * 1"
push:
branches: [main]
paths: [CMakeLists.txt, cmake/modules/**]
workflow_dispatch:

permissions:
actions: read
security-events: write
contents: read

jobs:
osv-scan:
name: OSV-Scanner
runs-on: blacksmith-2vcpu-ubuntu-2404
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build cmake pkg-config \
libwebkit2gtk-4.1-dev libvulkan-dev libfreetype-dev \
libx11-dev libxext-dev libxrandr-dev libxcursor-dev \
libxfixes-dev libxi-dev libxss-dev \
libwayland-dev libxkbcommon-dev libdrm-dev libgbm-dev \
libgl-dev libegl-dev \
libasound2-dev libpulse-dev libpipewire-0.3-dev \
libdbus-1-dev libudev-dev

- name: Cache FetchContent
uses: actions/cache@v5
with:
path: build/ci-linux-gcc/_deps
key: dep-scan-deps-${{ hashFiles('CMakeLists.txt', 'cmake/modules/*.cmake') }}
restore-keys: |
dep-scan-deps-

- name: Configure (populate _deps)
run: cmake --preset ci-linux-gcc

- name: Run OSV-Scanner
uses: google/osv-scanner-action/scan@v2.3.3
with:
scan-args: "--recursive --call-analysis=all ."
Loading
Loading