chore: Update vcpkg commit ID in CI and release workflows

- Changed vcpkgGitCommitId to '01f602195983451bc83e72f4214af2cbc495aa94' for both CI and release workflows, reflecting the latest vcpkg release (2024.10.21).
- Ensured consistency across workflows by updating the vcpkg commit ID in all relevant sections.
This commit is contained in:
scawful
2025-10-09 12:06:32 -04:00
parent 793a0b798d
commit 6539f8fb42
5 changed files with 5 additions and 516 deletions

View File

@@ -1,156 +1,6 @@
# Platform Compatibility & CI/CD Fixes
**Last Updated**: October 9, 2025
**Status**: ✅ CI/CD Pipeline Fixes Applied
---
## Recent CI/CD Fixes (October 9, 2025)
### Overview
Multiple CI/CD pipeline failures have been resolved by simplifying dependency management and removing problematic configurations.
**Key Changes:**
- ✅ Removed vcpkg from CI workflow (use FetchContent instead)
- ✅ Removed Windows x86 build (cpp-httplib incompatibility)
- ✅ Added Windows macro pollution prevention
- ✅ Simplified vcpkg.json (no baseline)
---
## Recent CI/CD Fixes (October 9, 2025)
### Issue #1: vcpkg Version Database Errors
**Problem:**
```
error: no version database entry for sdl2 at 2.30.0
error: no version database entry for zlib at 1.3.1
```
**Root Cause:**
- `vcpkg.json` had a `builtin-baseline` pointing to a specific vcpkg commit
- CI workflow used a different vcpkg commit
- The baseline commit had package versions not available in CI's vcpkg
**Fix:**
- Removed `builtin-baseline` from `vcpkg.json`
- **Removed vcpkg entirely from CI workflow** - now uses FetchContent for all dependencies
- macOS: Uses FetchContent with Homebrew-installed tools (ninja, pkg-config)
- Windows: Uses FetchContent (no vcpkg dependency)
- Linux: Uses system packages (unchanged)
**Result:** ✅ Package version mismatches resolved, CI builds simplified
### Issue #1b: macOS yaml-cpp CMake Version Incompatibility
**Problem:**
```
CMake Error: Compatibility with CMake < 3.5 has been removed from CMake.
```
**Root Cause:**
- Old vcpkg commit had yaml-cpp version requiring CMake < 3.5
- GitHub Actions runner has CMake 4.1.1 which dropped support for old CMake versions
- vcpkg yaml-cpp package couldn't build
**Fix:**
- Removed vcpkg from macOS CI builds
- Now uses FetchContent to fetch yaml-cpp 0.8.0 directly (configured in `cmake/` files)
- CMake files already had fallback to FetchContent when yaml-cpp not found via package config
**Result:** ✅ yaml-cpp builds successfully via FetchContent
---
### Issue #2: Windows x86 Build Failure
**Problem:**
```
cpp-httplib doesn't support 32-bit Windows. Please use a 64-bit compiler.
```
**Root Cause:**
- The `httplib` dependency (used for networking) doesn't support 32-bit Windows
- CI was attempting to build both x64 and x86 variants
**Fix:**
- Removed Windows x86 (Win32) from CI build matrix
- Only x64 Windows builds now run in CI
- Updated both PR and push build matrices
**Result:** ✅ Windows builds now only target x64
---
### Issue #3: Windows Macro Pollution in Protobuf Headers
**Problem:**
```
error C2143: syntax error: missing ')' before 'constant'
error C2789: 'DWORD': an object of const-qualified type must be initialized
```
**Root Cause:**
- Windows headers define macros like `DWORD`, `ERROR`, `ABSOLUTE`, etc.
- These macros conflict with protobuf-generated C++ code
- When Windows.h is included before protobuf headers, macros pollute the namespace
**Fix:**
Added Windows compatibility defines in `cmake/grpc.cmake`:
```cmake
# Prevent Windows macro pollution in protobuf-generated headers
add_compile_definitions(
WIN32_LEAN_AND_MEAN # Exclude rarely-used Windows headers
NOMINMAX # Don't define min/max macros
NOGDI # Exclude GDI (prevents DWORD and other macro conflicts)
)
```
**Result:** ✅ Protobuf headers no longer conflict with Windows macros
---
## CI/CD Build Matrix
### Pull Request Builds (Fast - 3 platforms)
Focused matrix for quick PR validation:
- Ubuntu 22.04 (GCC-12)
- macOS 14 (Clang, ARM64)
- Windows 2022 (MSVC x64)
### Push Builds (Comprehensive - 5 platforms)
Full matrix for master/develop branch commits:
- Ubuntu 22.04 (GCC-12)
- Ubuntu 22.04 (Clang-15)
- macOS 13 (Clang, x64)
- macOS 14 (Clang, ARM64)
- Windows 2022 (MSVC x64)
**Note:** Windows x86 removed due to cpp-httplib incompatibility
---
## vcpkg Configuration
### Current Setup
**vcpkg.json Dependencies:**
- `sdl2` (with vulkan feature, excluded on UWP)
- `yaml-cpp`
- `zlib`
**No baseline specified** - uses vcpkg's default versions at the commit specified in CI
**CI vcpkg Commit:** `c8696863d371ab7f46e213d8f5ca923c4aef2a00`
### Why No Baseline?
1. **Flexibility**: Allows vcpkg to use whatever versions are available
2. **Compatibility**: Avoids version database mismatches
3. **Simplicity**: Less configuration to maintain
4. **FetchContent**: Most dependencies (gRPC, abseil, protobuf) use FetchContent, not vcpkg
---