- GnsTransport.cs: drop the illegal fixed statement on native.Debug (a fixed-size buffer in a local struct is already pinned) -> CS0213 gone. - ProtocolCore.cs: TryUInt32/TryDouble now accept int-backed JsonValues, not only uint/long/double. Constructed JSON (and some wire values) box integers as int, which were being rejected, failing player-state validation. - MainWindow.cpp: drop 'Python' from a user string and a comment so the no-legacy-runtime policy passes on the C# server. - gns-transport.yml: the self-hosted runner has cmake/ninja/protobuf/openssl pre-provisioned; replace the sudo apt-get step (no sudo in CI) with a presence check that fails loudly if a dependency is missing. Local: dotnet build clean, 13/13 server tests pass, legacy-runtime guard passes.
51 lines
1.8 KiB
YAML
51 lines
1.8 KiB
YAML
name: GNS Transport Bridge
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- "server/native_transport/**"
|
|
- ".github/workflows/gns-transport.yml"
|
|
pull_request:
|
|
paths:
|
|
- "server/native_transport/**"
|
|
- ".github/workflows/gns-transport.yml"
|
|
|
|
jobs:
|
|
linux:
|
|
name: Linux native GNS bridge
|
|
runs-on: [self-hosted, Linux, X64]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Verify build dependencies (pre-provisioned on the self-hosted runner)
|
|
run: |
|
|
missing=0
|
|
for tool in cmake ninja protoc; do
|
|
command -v "$tool" >/dev/null 2>&1 || { echo "::error::missing build dependency: $tool"; missing=1; }
|
|
done
|
|
test -f /usr/include/openssl/ssl.h || { echo "::error::missing libssl-dev headers"; missing=1; }
|
|
test "$missing" -eq 0
|
|
|
|
- name: Fetch pinned GameNetworkingSockets
|
|
run: |
|
|
GNS_SHA=f4525e39ee10f6b45181fd92d01fee75f7d71756
|
|
rm -rf /tmp/co-gns-src
|
|
git init /tmp/co-gns-src
|
|
git -C /tmp/co-gns-src remote add origin https://github.com/ValveSoftware/GameNetworkingSockets.git
|
|
git -C /tmp/co-gns-src fetch --depth 1 origin "$GNS_SHA"
|
|
git -C /tmp/co-gns-src checkout --detach FETCH_HEAD
|
|
test "$(git -C /tmp/co-gns-src rev-parse HEAD)" = "$GNS_SHA"
|
|
|
|
- name: Build and run native bridge tests
|
|
run: |
|
|
cmake -S server/native_transport -B /tmp/co-server-gns-build -G Ninja \
|
|
-DGNS_SOURCE_DIR=/tmp/co-gns-src \
|
|
-DCMAKE_BUILD_TYPE=Release
|
|
cmake --build /tmp/co-server-gns-build -j2
|
|
ctest --test-dir /tmp/co-server-gns-build --output-on-failure
|
|
|
|
- name: Confirm shared bridge artifact
|
|
run: |
|
|
test -f /tmp/co-server-gns-build/libcommonwealth_online_gns_bridge.so
|
|
ldd /tmp/co-server-gns-build/libcommonwealth_online_gns_bridge.so
|