Add native GNS server bridge
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
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: ubuntu-latest
|
||||
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 test
|
||||
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 --target co-gns-server-bridge-tests -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
|
||||
Reference in New Issue
Block a user