Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rehlds/ReHLDS
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.12.0.780
Choose a base ref
...
head repository: rehlds/ReHLDS
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Dec 7, 2022

  1. Added more check for possible numleaf overflow

    Minor refactoring
    s1lentq committed Dec 7, 2022
    Copy the full SHA
    14b56e0 View commit details
  2. 1
    Copy the full SHA
    5e8b0ba View commit details

Commits on Feb 11, 2023

  1. Add SV_AllowPhysent hook (#951)

    * Add SV_AllowPhysent hook
    Hamdi authored Feb 11, 2023
    Copy the full SHA
    1796459 View commit details

Commits on May 8, 2023

  1. Copy the full SHA
    a680f18 View commit details

Commits on Jul 1, 2023

  1. Allow the clients to connect on the server of different game Fixed #975

    Client should be use "setinfo _gd <game>"
    s1lentq committed Jul 1, 2023
    4
    Copy the full SHA
    0c5ce53 View commit details

Commits on Jul 3, 2023

  1. Copy the full SHA
    8841ba4 View commit details
  2. Copy the full SHA
    918612f View commit details
  3. Copy the full SHA
    f955b07 View commit details

Commits on Sep 3, 2023

  1. Copy the full SHA
    2ba27d4 View commit details

Commits on Sep 20, 2023

  1. Copy the full SHA
    de3679f View commit details

Commits on Sep 24, 2023

  1. Added cvarhook from latest HLDS build

    Making mapcyclefile/sv_cheats work in realtime
    Resolve #868
    s1lentq committed Sep 24, 2023
    Copy the full SHA
    6f03190 View commit details
  2. Update world.cpp (#985)

    dystopm authored Sep 24, 2023
    Copy the full SHA
    5ec8c29 View commit details

Commits on Sep 27, 2023

  1. Copy the full SHA
    b7f6eb8 View commit details

Commits on Oct 8, 2023

  1. Copy the full SHA
    7fcec97 View commit details

Commits on Nov 21, 2023

  1. engine: add sv_allow_autoaim cvar for HL25 DLL compatibility (#1000)

    add sv_allow_autoaim cvar for HL25 DLL compatibility
    a1batross authored Nov 21, 2023
    Copy the full SHA
    3f19bc1 View commit details

Commits on Nov 22, 2023

  1. Update workflows/build.yml

    Fixes #1004
    s1lentq committed Nov 22, 2023
    Copy the full SHA
    ffb6579 View commit details

Commits on Nov 28, 2023

  1. Add reg cvar r_cachestudio

    s1lentq committed Nov 28, 2023
    Copy the full SHA
    0af97d9 View commit details

Commits on Dec 14, 2023

  1. Reworked AlertMessage

    s1lentq committed Dec 14, 2023
    Copy the full SHA
    93f5775 View commit details

Commits on Jan 12, 2024

  1. Copy the full SHA
    32857e7 View commit details

Commits on Jan 13, 2024

  1. Prevent crash "Cache_UnlinkLRU: NULL link" on client-side if aiment w…

    …ith sprite model will be to render as a studio model
    s1lentq committed Jan 13, 2024
    Copy the full SHA
    5002ff9 View commit details
  2. fix build

    s1lentq committed Jan 13, 2024
    Copy the full SHA
    1d6c682 View commit details

Commits on Jan 17, 2024

  1. Implement commands rcon_adduser,rcon_deluser,rcon_users to allow use …

    …RCON only by known user IPs (Resolves #796)
    
    SV_Rcon: Minor refactoring
    s1lentq committed Jan 17, 2024
    Copy the full SHA
    62407e0 View commit details
  2. Fix unit-test

    s1lentq committed Jan 17, 2024
    Copy the full SHA
    355172d View commit details
  3. Update README.md

    s1lentq committed Jan 17, 2024
    Copy the full SHA
    f29d6c5 View commit details

Commits on Jan 18, 2024

  1. Implemented optional CVar sv_tags for sets a string defining the "gam…

    …etags" for this server to allows users/scripts to filter in the matchmaking/server-browser interfaces based on the value
    s1lentq committed Jan 18, 2024
    Copy the full SHA
    76cbd2c View commit details
  2. Update README.md

    s1lentq committed Jan 18, 2024
    Copy the full SHA
    90cb97d View commit details

Commits on Jan 21, 2024

  1. Copy the full SHA
    41c5186 View commit details

Commits on Jan 25, 2024

  1. Copy the full SHA
    9b0dbe8 View commit details

Commits on Jan 26, 2024

  1. MSG_WriteBitAngle: Cap the precision check from 32 to 22 to avoid ove…

    …rflow issues when representing angles with more than 22 bits because the multiply by 'shift' may result in overflow
    s1lentq committed Jan 26, 2024
    Copy the full SHA
    63fde22 View commit details

Commits on Jan 31, 2024

  1. Copy the full SHA
    a7b6045 View commit details

Commits on Feb 14, 2024

  1. Copy the full SHA
    498d7e0 View commit details

Commits on Feb 19, 2024

  1. Copy the full SHA
    58391b6 View commit details

Commits on Mar 2, 2024

  1. Copy the full SHA
    05f4a27 View commit details

Commits on Mar 18, 2024

  1. 8
    Copy the full SHA
    174414d View commit details
  2. Copy the full SHA
    516bb93 View commit details
  3. Copy the full SHA
    59ed3f6 View commit details
  4. Copy the full SHA
    f26ad71 View commit details
  5. Copy the full SHA
    462fe55 View commit details
  6. Copy the full SHA
    ec47e4d View commit details

Commits on Mar 26, 2024

  1. 1
    Copy the full SHA
    3c282b4 View commit details

Commits on Apr 6, 2024

  1. fix: README badges

    [skip ci]
    SergeyShorokhov authored Apr 6, 2024
    Copy the full SHA
    b870de7 View commit details

Commits on Apr 10, 2024

  1. Netchan_CreateFileFragments: Fixed a hang connection on verifying res…

    …ource stage, when precached file exists but is absolutely empty
    s1lentq committed Apr 10, 2024
    Copy the full SHA
    61ee4f9 View commit details

Commits on Apr 13, 2024

  1. Implemented reduction of impact caused by zip-bomb exploit (#994)

    * Implemented reduction of impact caused by zip-bomb exploit
    Added network security CVars:
    - sv_net_incoming_decompression (0-1) Enables or disables incoming data decompression
    - sv_net_incoming_decompression_max_ratio (0.0 - 100.0) Sets max allowed ratio between compressed and decompressed data. (A ratio close to 90 indicates large uncompressed data with low entropy)
    - sv_net_incoming_decompression_max_size (16-65536) Adjusts max size of output data after decompression.
    Added CVar sv_net_incoming_decompression_punish for ban
    * Fix missing reg CVar sv_net_incoming_decompression_punish
    s1lentq authored Apr 13, 2024
    Copy the full SHA
    0d1bdba View commit details

Commits on May 10, 2024

  1. Copy the full SHA
    5b72d06 View commit details
  2. Fix warning

    s1lentq committed May 10, 2024
    Copy the full SHA
    3c4acbb View commit details
  3. Fix rehlsdk

    s1lentq committed May 10, 2024
    Copy the full SHA
    47ffe4b View commit details
  4. Copy the full SHA
    693b51c View commit details
  5. Add SV_SendResources hook (#1024)

    * Implement `SV_AddResources` hook
    ShadowsAdi authored May 10, 2024
    Copy the full SHA
    82a3d1d View commit details

Commits on May 13, 2024

  1. Minor cleanup

    s1lentq committed May 13, 2024
    Copy the full SHA
    a761efa View commit details
  2. Copy the full SHA
    c9f9bbf View commit details
Showing with 3,698 additions and 803 deletions.
  1. +156 −83 .github/workflows/build.yml
  2. +238 −0 CHANGELOG.md
  3. +49 −19 README.md
  4. +1 −0 rehlds/CMakeLists.txt
  5. +1 −1 rehlds/HLTV/Core/src/BSPModel.cpp
  6. +2 −3 rehlds/HLTV/Core/src/BSPModel.h
  7. +153 −132 rehlds/HLTV/Core/src/World.cpp
  8. +3 −0 rehlds/HLTV/Core/src/World.h
  9. +3 −0 rehlds/HLTV/common/net_internal.h
  10. +1 −1 rehlds/common/ObjectDictionary.cpp
  11. +12 −0 rehlds/common/cvardef.h
  12. +3 −0 rehlds/common/quakedef.h
  13. +5 −9 rehlds/engine/cmd.cpp
  14. +3 −3 rehlds/engine/cmodel.cpp
  15. +0 −5 rehlds/engine/cmodel.h
  16. +30 −2 rehlds/engine/common.cpp
  17. +2 −0 rehlds/engine/common.h
  18. +47 −2 rehlds/engine/cvar.cpp
  19. +30 −39 rehlds/engine/decals.cpp
  20. +3 −0 rehlds/engine/delta_packet.h
  21. +0 −2 rehlds/engine/filter.h
  22. +2 −0 rehlds/engine/hashpak.cpp
  23. +35 −3 rehlds/engine/host.cpp
  24. +119 −7 rehlds/engine/host_cmd.cpp
  25. +9 −0 rehlds/engine/mathlib.cpp
  26. +1 −0 rehlds/engine/mathlib_e.h
  27. +15 −2 rehlds/engine/model.cpp
  28. +1 −0 rehlds/engine/net.h
  29. +216 −14 rehlds/engine/net_chan.cpp
  30. +4 −4 rehlds/engine/net_ws.cpp
  31. +2 −2 rehlds/engine/pmove.cpp
  32. +1 −1 rehlds/engine/pmove.h
  33. +15 −4 rehlds/engine/pr_cmds.cpp
  34. +22 −4 rehlds/engine/r_studio.cpp
  35. +10 −16 rehlds/engine/server.h
  36. +637 −321 rehlds/engine/sv_main.cpp
  37. +1 −22 rehlds/engine/sv_phys.cpp
  38. +21 −0 rehlds/engine/sv_steam3.cpp
  39. +7 −0 rehlds/engine/sv_steam3.h
  40. +19 −11 rehlds/engine/sv_upld.cpp
  41. +38 −22 rehlds/engine/sv_user.cpp
  42. +36 −31 rehlds/engine/sys_dll.cpp
  43. +4 −3 rehlds/engine/textures.cpp
  44. +4 −1 rehlds/engine/usermsg.h
  45. +17 −25 rehlds/engine/world.cpp
  46. +1 −1 rehlds/engine/zone.cpp
  47. +4 −0 rehlds/msvc/ReHLDS.vcxproj
  48. +9 −0 rehlds/msvc/ReHLDS.vcxproj.filters
  49. +1 −1 rehlds/pm_shared/pm_defs.h
  50. +337 −0 rehlds/public/rehlds/IMessageManager.h
  51. +1 −0 rehlds/public/rehlds/bspfile.h
  52. +8 −0 rehlds/public/rehlds/maintypes.h
  53. +7 −0 rehlds/public/rehlds/model.h
  54. +13 −1 rehlds/public/rehlds/rehlds_api.h
  55. +1 −0 rehlds/public/rehlds/rehlds_interfaces.h
  56. +4 −0 rehlds/rehlds/hookchains_impl.cpp
  57. +11 −1 rehlds/rehlds/hookchains_impl.h
  58. +1 −0 rehlds/rehlds/precompiled.h
  59. +27 −3 rehlds/rehlds/rehlds_api_impl.cpp
  60. +13 −0 rehlds/rehlds/rehlds_api_impl.h
  61. +9 −0 rehlds/rehlds/rehlds_interfaces_impl.cpp
  62. +20 −0 rehlds/rehlds/rehlds_interfaces_impl.h
  63. +1,066 −0 rehlds/rehlds/rehlds_messagemngr_impl.cpp
  64. +183 −0 rehlds/rehlds/rehlds_messagemngr_impl.h
  65. +3 −1 rehlds/rehlds/structSizeCheck.cpp
  66. +1 −1 rehlds/version/version.h
239 changes: 156 additions & 83 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ on:
types: [opened, reopened, synchronize]
release:
types: [published]
workflow_dispatch:

jobs:
windows:
@@ -25,12 +26,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.0.2
uses: microsoft/setup-msbuild@v2

- name: Build and Run unittests
run: |
@@ -46,6 +47,11 @@ jobs:
msbuild ${{ env.solution }} -p:Configuration="${{ env.buildRelease }}" /t:Clean,Build /p:Platform=${{ env.buildPlatform }} /p:PlatformToolset=v140_xp /p:XPDeprecationWarning=false
msbuild ${{ env.solution }} -p:Configuration="${{ env.buildReleasePlay }}" /t:Clean,Build /p:Platform=${{ env.buildPlatform }} /p:PlatformToolset=v140_xp /p:XPDeprecationWarning=false
- name: Get rcedit from chocolatey
run: |
choco install rcedit -y
shell: "pwsh"

- name: Move files
run: |
mkdir publish\debug
@@ -69,99 +75,150 @@ jobs:
move msvc\${{ env.buildRelease }}\filesystem_stdio.pdb publish\debug\filesystem_stdio.pdb
move msvc\${{ env.buildRelease }}\director.pdb publish\debug\director.pdb
# TODO: Set version to exe dynamicly: 0.0.0.0 to normal version such as at linux
- name: Edit resources at windows binaries
run: |
rcedit ${{ github.workspace }}\publish\bin\win32\hlds.exe --set-version-string ProductName "ReHLDS" --set-file-version "0.0.0.0" --set-product-version "0.0.0.0" --set-version-string FileDescription "The Half-Life Dedicated Server, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam"
rcedit ${{ github.workspace }}\publish\bin\win32\hltv.exe --set-version-string ProductName "ReHLTV" --set-file-version "0.0.0.0" --set-product-version "0.0.0.0" --set-version-string FileDescription "The Half-Life TV, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam"
rcedit ${{ github.workspace }}\publish\tests\swds.dll --set-version-string ProductName "swds.dll" --set-file-version "0.0.0.0" --set-product-version "0.0.0.0" --set-version-string FileDescription "A dll used by Steamworks Dedicated Servers, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" --set-icon rehlds/dedicated/msvc/icon.ico
rcedit ${{ github.workspace }}\publish\bin\win32\swds.dll --set-version-string ProductName "swds.dll" --set-file-version "0.0.0.0" --set-product-version "0.0.0.0" --set-version-string FileDescription "A ddll used by Steamworks Dedicated Servers, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" --set-icon rehlds/dedicated/msvc/icon.ico
rcedit ${{ github.workspace }}\publish\bin\win32\core.dll --set-version-string ProductName "core.dll" --set-file-version "0.0.0.0" --set-product-version "0.0.0.0" --set-version-string FileDescription " A dll, it is a core of game engine, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" --set-icon rehlds/dedicated/msvc/icon.ico
rcedit ${{ github.workspace }}\publish\bin\win32\proxy.dll --set-version-string ProductName "proxy.dll" --set-file-version "0.0.0.0" --set-product-version "0.0.0.0" --set-version-string FileDescription "A dll for proxying network connections, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" --set-icon rehlds/dedicated/msvc/icon.ico
rcedit ${{ github.workspace }}\publish\bin\win32\demoplayer.dll --set-version-string ProductName "demoplayer.dll" --set-file-version "0.0.0.0" --set-product-version "0.0.0.0" --set-version-string FileDescription "A dll for demoplayer functionality, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" --set-icon rehlds/dedicated/msvc/icon.ico
rcedit ${{ github.workspace }}\publish\bin\win32\filesystem_stdio.dll --set-version-string ProductName "filesystem_stdio.dll" --set-file-version "0.0.0.0" --set-product-version "0.0.0.0" --set-version-string FileDescription "A dll that manages file input/output operations, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" --set-icon rehlds/dedicated/msvc/icon.ico
rcedit ${{ github.workspace }}\publish\bin\win32\valve\dlls\director.dll --set-version-string ProductName "director.dll" --set-file-version "0.0.0.0" --set-product-version "0.0.0.0" --set-version-string FileDescription "A dll used for Director functionality in Half-Life 1, Commit: $env:GITHUB_SHA" --set-version-string "Comments" "Commit: $env:GITHUB_SHA" --set-version-string CompanyName "ReHLDS Dev Team" --set-version-string LegalCopyright "Copyright 2025 Valve, ReHLDS DevTeam" --set-icon rehlds/dedicated/msvc/icon.ico
shell: "pwsh"

- name: Import PFX and sign
env:
KEY_PFX_PASS: ${{ secrets.KEY_PFX_PASS}}
run: |
$pfxBase64 = "${{ secrets.KEY_PFX_B64 }}"
[IO.File]::WriteAllBytes("${{ github.workspace }}\signing-cert.pfx", [Convert]::FromBase64String($pfxBase64))
certutil -f -p "${{ secrets.KEY_PFX_PASS }}" -importPFX "${{ github.workspace }}\signing-cert.pfx"
& 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha512 /fd sha512 /v ${{ github.workspace }}\publish\bin\win32\hlds.exe
& 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "reHLTV" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha512 /fd sha512 /v ${{ github.workspace }}\publish\bin\win32\hltv.exe
& 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS - swds.dll" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha512 /fd sha512 /v ${{ github.workspace }}\publish\tests\swds.dll
& 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS - swds.dll" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha512 /fd sha512 /v ${{ github.workspace }}\publish\bin\win32\swds.dll
& 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS - core.dll" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha512 /fd sha512 /v ${{ github.workspace }}\publish\bin\win32\core.dll
& 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS - proxy.dll" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha512 /fd sha512 /v ${{ github.workspace }}\publish\bin\win32\proxy.dll
& 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS - demoplayer.dll" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha512 /fd sha512 /v ${{ github.workspace }}\publish\bin\win32\demoplayer.dll
& 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS - filesystem_stdio.dll" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha512 /fd sha512 /v ${{ github.workspace }}\publish\bin\win32\filesystem_stdio.dll
& 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\signtool.exe' sign /a /f "${{ github.workspace }}\signing-cert.pfx" /p $env:KEY_PFX_PASS /d "ReHLDS - director.dll" /du "https://rehlds.dev/" /tr "http://timestamp.digicert.com" /td sha512 /fd sha512 /v ${{ github.workspace }}\publish\bin\win32\valve\dlls\director.dll
Remove-Item -Recurse -Force "${{ github.workspace }}\signing-cert.pfx"
shell: "pwsh"

- name: Deploy artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: win32
path: publish/*

testdemos:
name: 'Test demos'
runs-on: ubuntu-latest
container: s1lentq/testdemos:latest
runs-on: ubuntu-24.04
container: rehldsorg/testdemos:latest
needs: [windows]

env:
WINEDEBUG: -all
WINEDLLOVERRIDES: mshtml=

defaults:
run:
shell: bash
working-directory: ../../../opt/HLDS
working-directory: /opt/HLDS

strategy:
fail-fast: false
matrix:
test: [
{ file: 'cstrike-muliplayer-1', desc: 'CS: Multiplayer' },
{ file: 'rehlds-phys-single1', desc: 'Half-Life: Physics singleplayer' },
{ file: 'crossfire-1-multiplayer-1', desc: 'Half-Life: Multiplayer on crossfire map' },
{ file: 'shooting-hl-1', desc: 'Half-Life: Shooting with several weapons' },
]

steps:
- name: Deploying windows artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: win32

- name: Play demos
- name: Setup dependencies
run: |
chown root ~
rsync -a deps/rehlds/* .
mv $GITHUB_WORKSPACE/tests/swds.dll .
descs=(
"CS: Multiplayer"
"Half-Life: Physics singleplayer"
"Half-Life: Multiplayer on crossfire map"
"Half-Life: Shooting with several weapons"
)
demos=(
"cstrike-muliplayer-1"
"rehlds-phys-single1"
"crossfire-1-multiplayer-1"
"shooting-hl-1"
)
retVal=0
for i in "${!demos[@]}"; do
params=$(cat "testdemos/${demos[i]}.params")
echo -e "\e[1m[$((i + 1))/${#demos[@]}] \e[1;36m${descs[i]} testing...\e[0m"
echo -e " - \e[0;33mParameters $params\e[0m"
wine hlds.exe --rehlds-enable-all-hooks --rehlds-test-play "testdemos/${demos[i]}.bin" $params &> result.log || retVal=$?
if [ $retVal -ne 777 ] && [ $retVal -ne 9 ]; then
# Print with catchy messages
while read line; do
echo -e " \e[0;33m$line"
done <<< $(cat result.log | sed '0,/demo failed/I!d;/wine:/d;/./,$!d')
echo " 🔸 🔸 🔸 🔸 🔸 🔸 🔸 🔸 🔸 🔸"
while read line; do
echo -e " \e[1;31m$line";
done < rehlds_demo_error.txt
echo -e " \e[30;41mExit code: $retVal\e[0m"
echo -e "\e[1m[$((i + 1))/${#demos[@]}] \e[1;36m${descs[i]} testing...\e[1;31m Failed ❌"
exit 6 # Test demo failed
else
# Print result HLDS console
while read line; do
echo -e " \e[0;33m$line"
done <<< $(cat result.log | sed '/wine:/d;/./,$!d')
echo -e " \e[30;43mExit code: $retVal\e[0m"
echo -e "\e[1m[$((i + 1))/${#demos[@]}] \e[1;36m${descs[i]} testing...\e[1;32m Succeed ✔"
fi
done
- name: Play test
env:
demo: ${{ matrix.test.file }}
desc: ${{ matrix.test.desc }}
run: ./runTest.sh

linux:
name: 'Linux'
runs-on: ubuntu-latest
container: s1lentq/linux86buildtools:latest
runs-on: ubuntu-24.04
container: debian:11-slim

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install dependencies
run: |
dpkg --add-architecture i386
apt-get update
apt-get install -y \
gcc-multilib g++-multilib \
build-essential \
libc6-dev libc6-dev-i386 \
git cmake rsync \
g++ gcc
- name: GPG Import
run: |
echo "${{ secrets.PUB_ASC }}" > "${{ secrets.PUB_ASC_FILE }}"
echo "${{ secrets.KEY_ASC }}" > "${{ secrets.KEY_ASC_FILE }}"
# Import the public key
gpg --batch --yes --import "${{ secrets.PUB_ASC_FILE }}"
if [[ $? -ne 0 ]]; then
echo "Error: Failed to import the public key"
exit 1
fi
# Import the private key
gpg --batch --yes --import "${{ secrets.KEY_ASC_FILE }}"
if [[ $? -ne 0 ]]; then
echo "Error: Failed to import the private key"
exit 2
fi
# Extract the fingerprint of the imported public key
GPG_LINUX_FINGERPRINT=$(gpg --list-keys --with-colons | grep '^fpr' | head -n 1 | cut -d: -f10)
# Check if the fingerprint was extracted
if [[ -z "$GPG_LINUX_FINGERPRINT" ]]; then
echo "Error: Failed to extract the fingerprint of the key"
exit 3
fi
# Set the trust level for the key
echo "$GPG_LINUX_FINGERPRINT:6:" | gpg --batch --import-ownertrust
if [ $? -ne 0 ]; then
echo "Error: Failed to set trust for the key $GPG_LINUX_FINGERPRINT"
exit 4
fi
echo "Key $GPG_LINUX_FINGERPRINT successfully imported and trusted"
gpg --list-keys
#export for global use
echo "GPG_LINUX_FINGERPRINT=$GPG_LINUX_FINGERPRINT" >> $GITHUB_ENV
shell: bash

- name: Build and Run unittests
run: |
rm -rf build && CC=icc CXX=icpc cmake -DCMAKE_BUILD_TYPE=Unittests -B build && cmake --build build -j8
rm -rf build && cmake -DCMAKE_BUILD_TYPE=Unittests -B build && cmake --build build -j8
retVal=0
export LD_LIBRARY_PATH="rehlds/lib/linux32:$LD_LIBRARY_PATH"
./build/rehlds/engine_i486 2> /dev/null > result.log || retVal=$?
@@ -183,9 +240,9 @@ jobs:
fi
shell: bash

- name: Build using Intel C++ Compiler
- name: Build using GCC Compiler
run: |
rm -rf build && CC=icc CXX=icpc cmake -B build && cmake --build build -j8
rm -rf build && cmake -B build && cmake --build build -j8
- name: Prepare HLSDK
run: |
@@ -228,31 +285,25 @@ jobs:
shell: bash

- name: Deploy artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
id: upload-job
with:
name: linux32
path: publish/*

- name: Cleanup temporary artifacts
if: success() && steps.upload-job.outcome == 'success'
run: |
rm -rf hlsdk
rm -f appversion.h
publish:
name: 'Publish'
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: [windows, testdemos, linux]

steps:
- name: Deploying linux artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: linux32

- name: Deploying windows artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: win32

@@ -270,18 +321,45 @@ jobs:
fi
rm -f appversion.h
- name: Packaging bin/dbg
- name: Final signing and Packaging bin/dbg
id: packaging-job
if: |
github.event_name == 'release' &&
github.event.action == 'published' &&
startsWith(github.ref, 'refs/tags/')
run: |
7z a -tzip rehlds-bin-${{ env.APP_VERSION }}.zip bin/linux32/ hlsdk/
# new runner, niw signs
echo "${{ secrets.PUB_ASC }}" > "${{ secrets.PUB_ASC_FILE }}"
echo "${{ secrets.KEY_ASC }}" > "${{ secrets.KEY_ASC_FILE }}"
gpg --batch --yes --import "${{ secrets.PUB_ASC_FILE }}"
gpg --batch --yes --import "${{ secrets.KEY_ASC_FILE }}"
GPG_LINUX_FINGERPRINT=$(gpg --list-keys --with-colons | grep '^fpr' | head -n 1 | cut -d: -f10)
echo "$GPG_LINUX_FINGERPRINT:6:" | gpg --batch --import-ownertrust
echo "GPG_LINUX_FINGERPRINT=$GPG_LINUX_FINGERPRINT" >> $GITHUB_ENV
sign_file() {
local file=$1
gpg --batch --yes --detach-sign --armor -u "$GPG_LINUX_FINGERPRINT" "$file"
if [ $? -ne 0 ]; then
echo "Error: Failed to sign $file"
exit 2
fi
echo "$file signed successfully."
}
# Pack and sign final archive
7z a -tzip rehlds-bin-${{ env.APP_VERSION }}.zip bin/ hlsdk/
sign_file "rehlds-bin-${{ env.APP_VERSION }}.zip"
# Pack and sign final archive
7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -aoa rehlds-dbg-${{ env.APP_VERSION }}.7z debug/
sign_file "rehlds-dbg-${{ env.APP_VERSION }}.7z"
shell: bash

- name: Publish artifacts
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
id: publish-job
if: |
startsWith(github.ref, 'refs/tags/') &&
@@ -290,11 +368,6 @@ jobs:
files: |
*.zip
*.7z
*.asc
env:
GITHUB_TOKEN: ${{ secrets.API_TOKEN }}

- name: Cleanup temporary artifacts
if: success() && steps.publish-job.outcome == 'success'
run: |
rm -rf bin debug hlsdk
rm -f *.7z *.zip appversion.h
Loading