Files
Commonwealth-Online-Server/.github/workflows/gns-transport.yml
T
NomadsReach ff5c6d883a Run the GNS bridge job on the self-hosted runner instead of GitHub-hosted
The ubuntu-latest job cannot start while GitHub-hosted minutes are
billing-blocked. Target the self-hosted Linux x64 runner, matching the
rest of the CI (csharp-server.yml, CO-BETA/beta-ci.yml).
2026-08-16 16:51:10 -04:00

47 lines
1.6 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: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build libssl-dev libprotobuf-dev protobuf-compiler
- 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