Sync from GitHub main #1
@@ -2,39 +2,24 @@ name: CSharp Server Gate
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- rewrite/csharp-server
|
||||
paths:
|
||||
- "server/**"
|
||||
- "src/ServerProcess.*"
|
||||
- "CMakeLists.txt"
|
||||
- "cmake/stage_server.cmake"
|
||||
- "build.bat"
|
||||
- "deploy.bat"
|
||||
- "check-setup.bat"
|
||||
- ".github/workflows/csharp-server.yml"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
runtime-policy:
|
||||
name: Repository runtime policy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Enforce runtime policy
|
||||
run: bash server/scripts/verify-no-legacy-runtime.sh
|
||||
|
||||
build-and-test:
|
||||
name: C# build and test
|
||||
runs-on: [self-hosted, Linux, X64]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Reject Python files
|
||||
shell: bash
|
||||
run: |
|
||||
if find . -type f -name '*.py' -print -quit | grep -q .; then
|
||||
echo "Python files are not allowed in CO-SERVER"
|
||||
find . -type f -name '*.py' -print
|
||||
exit 1
|
||||
fi
|
||||
if find server -maxdepth 1 -type f -name 'requirements*.txt' -print -quit | grep -q .; then
|
||||
echo "Python requirements files are not allowed in CO-SERVER"
|
||||
find server -maxdepth 1 -type f -name 'requirements*.txt' -print
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: "8.0.x"
|
||||
@@ -47,13 +32,15 @@ jobs:
|
||||
working-directory: server
|
||||
run: dotnet run --project tests/CommonwealthOnline.Server.Tests.csproj -c Release
|
||||
|
||||
- name: Check Linux scripts
|
||||
- name: Check Linux scripts and repository policy
|
||||
working-directory: server
|
||||
run: |
|
||||
chmod +x start.sh fix-port.sh scripts/linux_compat_checks.sh
|
||||
chmod +x start.sh fix-port.sh scripts/linux_compat_checks.sh scripts/verify-no-legacy-runtime.sh
|
||||
bash -n start.sh
|
||||
bash -n fix-port.sh
|
||||
bash -n scripts/linux_compat_checks.sh
|
||||
bash -n scripts/verify-no-legacy-runtime.sh
|
||||
bash scripts/verify-no-legacy-runtime.sh
|
||||
|
||||
- name: Publish Linux server
|
||||
working-directory: server
|
||||
|
||||
Reference in New Issue
Block a user