Skip to content

Commit f06d99d

Browse files
committed
Stabilize build, API linkage, and Windows CI
Modernizes the project for the 0.6.0-pre-alpha milestone by tightening CMake configuration (3.23+, Windows-only guard, warning controls), removing stale/empty module wiring, and adding relocatable install/export packaging with `Pyramid::Engine` plus an external `find_package` consumer test. Adds a full Windows GitHub Actions matrix (Debug/Release) for configure/build/test/install/consumer validation, expands and fixes test coverage (including API linkage and corrected PNG/JPEG/zlib fixtures), and closes public-surface gaps by implementing or explicitly failing unsupported scene/texture methods while removing undeclared render-pass placeholders. Documentation and changelog were rewritten to match the current supported scope and workflow.
1 parent 62ff08d commit f06d99d

53 files changed

Lines changed: 1440 additions & 1683 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/windows-ci.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Windows CI
2+
3+
on:
4+
push:
5+
branches: [master, main]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build-and-test:
14+
runs-on: windows-2022
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
configuration: [Debug, Release]
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Configure
25+
shell: pwsh
26+
run: >-
27+
cmake -S . -B build
28+
-G "Visual Studio 17 2022"
29+
-A x64
30+
-DPYRAMID_BUILD_EXAMPLES=ON
31+
-DPYRAMID_BUILD_TESTS=ON
32+
-DPYRAMID_WARNINGS_AS_ERRORS=OFF
33+
34+
- name: Build
35+
shell: pwsh
36+
run: cmake --build build --config ${{ matrix.configuration }} --parallel
37+
38+
- name: Test
39+
shell: pwsh
40+
run: ctest --test-dir build -C ${{ matrix.configuration }} --output-on-failure
41+
42+
- name: Install smoke test
43+
shell: pwsh
44+
run: cmake --install build --config ${{ matrix.configuration }} --prefix build/install
45+
46+
- name: Configure external consumer
47+
shell: pwsh
48+
run: >-
49+
cmake -S Tests/Consumer -B build/consumer
50+
-G "Visual Studio 17 2022"
51+
-A x64
52+
-DCMAKE_PREFIX_PATH="${{ github.workspace }}/build/install"
53+
54+
- name: Build external consumer
55+
shell: pwsh
56+
run: cmake --build build/consumer --config ${{ matrix.configuration }} --parallel
57+
58+
- name: Run external consumer
59+
shell: pwsh
60+
run: ./build/consumer/${{ matrix.configuration }}/PyramidConsumer.exe
61+
62+
- name: Upload binaries
63+
if: always()
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: pyramid-${{ matrix.configuration }}
67+
path: |
68+
build/bin/${{ matrix.configuration }}
69+
build/Examples/BasicRendering/${{ matrix.configuration }}
70+
if-no-files-found: warn

AGENTS.md

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,54 @@
11
# Repository guidelines
22

3-
## Project structure
3+
## Scope
44

5-
- `Engine/` builds the `PyramidEngine` C++17 library.
6-
- Active modules use `include/` and `source/` directories: Core, Graphics, Math, Platform, and Utils.
7-
- Audio, Input, and Physics are placeholders and must not be described as implemented.
8-
- `Engine/Utils/test/` contains utility test executables.
9-
- `Examples/BasicGame` and `Examples/BasicRendering` are the current runnable examples.
10-
- `docs/` contains the maintained compact documentation set.
11-
- `vendor/glad/` is the bundled OpenGL/WGL loader.
12-
- Generated `build*` directories stay uncommitted.
5+
- `Engine/` builds the C++17 `PyramidEngine` library.
6+
- Active modules are Core, Graphics, Math, Platform, and Utils.
7+
- `Examples/BasicGame` and `Examples/BasicRendering` are the graphical references.
8+
- `Tests/PublicApiLinkage.cpp` protects selected public symbols.
9+
- `Tests/Consumer` validates the installed CMake package.
10+
- `vendor/glad` is a bundled public dependency.
11+
- Input, audio, physics, editor, scripting, DirectX, Vulkan, Linux, and macOS are not supported.
1312

1413
## Build and test
1514

16-
Use the Windows/Visual Studio presets from the repository root:
17-
18-
```powershell
19-
cmake --preset vs2022-debug
20-
cmake --build --preset build-debug
21-
```
22-
23-
With tests:
24-
2515
```powershell
2616
cmake --preset vs2022-debug-tests
27-
cmake --build --preset build-debug-tests-clean
17+
cmake --build --preset build-debug-tests
2818
ctest --preset test-debug
19+
./scripts/run-smoke.ps1 -BuildDir build/debug-tests -Config Debug -DurationSeconds 5
2920
```
3021

31-
For graphics/runtime changes:
22+
Release validation:
3223

3324
```powershell
34-
./scripts/run-smoke.ps1 -BuildDir build -Config Debug -DurationSeconds 5
25+
cmake --preset vs2022-release-tests
26+
cmake --build --preset build-release-tests
27+
ctest --preset test-release
3528
```
3629

37-
The current source is Win32/OpenGL-specific. Do not present Linux, macOS, DirectX, or Vulkan as supported.
38-
3930
## Style
4031

41-
- C++17, four-space indentation, braces on new lines.
42-
- Types and most public methods: `PascalCase`.
43-
- Locals and parameters: `camelCase`.
44-
- Fields: `m_` prefix.
45-
- Prefer RAII and explicit ownership.
46-
- Use `PYRAMID_LOG_*`, `PYRAMID_ASSERT`, and `PYRAMID_CORE_ASSERT` for diagnostics.
47-
- Avoid adding required interface methods with silent no-op defaults.
32+
- C++17, four spaces, braces on new lines.
33+
- Types/public methods use `PascalCase`; locals/parameters use `camelCase`; fields use `m_`.
34+
- Prefer RAII, explicit ownership, and `PYRAMID_LOG_*` diagnostics.
35+
- Do not add required interface methods with silent no-op defaults.
36+
- Do not expose source-tree absolute paths through installed target interfaces.
37+
38+
## Public APIs
39+
40+
Every public declaration must be implemented, removed, or documented as an explicit failure. Add linkage-sensitive symbols to `Tests/PublicApiLinkage.cpp`.
41+
42+
Do not describe placeholder algorithms as complete. Current examples and engine shaders target GLSL 3.30; the runtime requires OpenGL 3.3 core or newer.
4843

4944
## Tests
5045

51-
Add focused `Test<Feature>.cpp` executables and register them with CTest. Tests must return non-zero on failure and print actionable context. Renderer changes also require visual inspection; the smoke script only detects early process failure.
46+
Tests must fail visibly, use valid fixtures, avoid false-success skips, clean temporary files, and print actionable context. Renderer changes require visual inspection because process smoke testing is not pixel validation.
5247

5348
## Documentation
5449

55-
Update an existing maintained document rather than adding overlapping guides or status reports. Verify paths, target names, namespaces, signatures, platform requirements, and implementation status against source. Planned behavior belongs in `docs/ROADMAP.md`, not `docs/API.md`.
50+
Update the maintained compact set instead of adding overlapping guides or status files. Planned work belongs in `docs/ROADMAP.md`; historical changes belong in `CHANGELOG.md`.
5651

5752
## Pull requests
5853

59-
Use concise imperative commit subjects. Include the affected modules, design/lifetime decisions, exact build and test commands, visible-output evidence for rendering changes, known limitations, and documentation/changelog updates.
54+
Include affected modules, ownership/API decisions, exact validation commands, visible rendering evidence, known limitations, and documentation/changelog updates.

0 commit comments

Comments
 (0)