From fc2a2e122b2c9d34ab602cec8e7bd1bf7e6d5e0d Mon Sep 17 00:00:00 2001 From: Josh-Heaps Date: Mon, 8 Jun 2026 14:12:50 -0600 Subject: [PATCH] Build libchess_engine.so in CI deploy and pin runner to ubuntu-24.04 Compile the native engine and copy it into Resources/ before publish so it ships to prod automatically. Runner pinned to ubuntu-24.04 to match the server's glibc. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/deploy.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 26c0e01..49a282e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,7 +14,9 @@ concurrency: jobs: build: - runs-on: ubuntu-latest + # Pinned (not ubuntu-latest) to match the prod server's Ubuntu/glibc so the + # compiled libchess_engine.so loads there. Keep this == the server's release. + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 @@ -25,6 +27,13 @@ jobs: dotnet-version: '8.0.x' # adjust if needed - name: Restore run: dotnet restore JoshHeaps.Net/JoshHeaps.Net.csproj + + - name: Build native chess engine (libchess_engine.so) + run: | + cmake -S native/chess_engine -B native/chess_engine/build -DCMAKE_BUILD_TYPE=Release + cmake --build native/chess_engine/build + cp native/chess_engine/build/libchess_engine.so JoshHeaps.Net/Resources/ + - name: Publish run: dotnet publish JoshHeaps.Net/JoshHeaps.Net.csproj -c Release -o ./publish