From 73572e988c1ee6b8957475892210438a25d801b4 Mon Sep 17 00:00:00 2001 From: "andrei.on1ca" Date: Mon, 10 Aug 2026 11:17:10 +0300 Subject: [PATCH 1/2] ci: build altserverwebsocket-sharp.dll and upload it as an artifact AltTester-Server vendors this DLL rather than consuming a package, and the binary was produced by hand, so it drifted from the source: the copy that shipped carried an unmerged fix (the Stop() deadlock work) while missing a merged one (the ReadBytesAsync stack-overflow guard), matching no branch in this repository. Build it on push and pull request against AltServer-Websocket-Sharp, and on demand, uploading all three target frameworks. netstandard2.0 is the one AltTester-Server vendors today. Builds the project file directly: the solution still refers to the pre-rename websocket-sharp.csproj and no longer loads. --- .github/workflows/build-dll.yml | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/build-dll.yml diff --git a/.github/workflows/build-dll.yml b/.github/workflows/build-dll.yml new file mode 100644 index 000000000..ea31150f2 --- /dev/null +++ b/.github/workflows/build-dll.yml @@ -0,0 +1,42 @@ +# Builds altserverwebsocket-sharp.dll and publishes it as a downloadable artifact. +# +# AltTester-Server vendors this DLL (AltServer/altserverwebsocket-sharp.dll) rather than consuming a +# package, so the binary used to be produced by hand. That is how it drifted from every branch: the +# DLL that shipped carried an unmerged fix while missing a merged one. Build it here instead, so the +# binary always corresponds to a commit anyone can point at. +name: build-dll + +on: + push: + branches: [AltServer-Websocket-Sharp] + pull_request: + branches: [AltServer-Websocket-Sharp] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup .NET SDK + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + # The solution still points at the pre-rename websocket-sharp.csproj, so build the project + # file directly. + - name: Build + run: dotnet build websocket-sharp/altserverwebsocket-sharp.csproj -c Release + + # netstandard2.0 is the one AltTester-Server vendors (its AltServer project targets down to + # netstandard2.0); net6.0 and net7.0 are uploaded too so a consumer on either can take them. + - name: Upload altserverwebsocket-sharp.dll + uses: actions/upload-artifact@v4 + with: + name: altserverwebsocket-sharp-${{ github.sha }} + path: | + websocket-sharp/bin/Release/netstandard2.0/altserverwebsocket-sharp.dll + websocket-sharp/bin/Release/net6.0/altserverwebsocket-sharp.dll + websocket-sharp/bin/Release/net7.0/altserverwebsocket-sharp.dll + if-no-files-found: error From 05475e21db7ae1150427ea5c6a91d021f910ec40 Mon Sep 17 00:00:00 2001 From: "andrei.on1ca" Date: Mon, 10 Aug 2026 11:32:30 +0300 Subject: [PATCH 2/2] ci: build on the self-hosted Windows runner Match AltTester-Server, whose tests job runs on [self-hosted, Windows] and relies on the SDK already being installed there, so drop setup-dotnet rather than reinstalling a toolchain on a shared machine. Carry over the guards that go with running on our own hardware: skip drafts, and skip pull requests from forks. This repository is a public fork, so without the second guard anyone's pull request would execute on the runner. --- .github/workflows/build-dll.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-dll.yml b/.github/workflows/build-dll.yml index ea31150f2..f930e93ce 100644 --- a/.github/workflows/build-dll.yml +++ b/.github/workflows/build-dll.yml @@ -15,17 +15,24 @@ on: jobs: build: - runs-on: ubuntu-latest + # Same guards AltTester-Server puts on its self-hosted job: skip drafts, and never run a pull + # request from a fork - this executes on our own hardware, so it must not build code from a + # repository we do not control. This one is a public fork, so that matters here. + if: | + github.event.pull_request.draft != true && + (github.event_name != 'pull_request' || + github.event.pull_request.head.repo.full_name == github.repository) + runs-on: [self-hosted, Windows] + timeout-minutes: 15 + steps: - uses: actions/checkout@v4 - - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 8.0.x - - # The solution still points at the pre-rename websocket-sharp.csproj, so build the project - # file directly. + # No setup-dotnet step: the runner already has the SDK, the same assumption AltTester-Server's + # tests job makes, and installing one per run would churn a machine we share. + # + # The solution still points at the pre-rename websocket-sharp.csproj, so build the project file + # directly. - name: Build run: dotnet build websocket-sharp/altserverwebsocket-sharp.csproj -c Release