Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
65ebc23
start
OhmV-IR Mar 12, 2026
1096743
compile
OhmV-IR Mar 13, 2026
b0708b4
interim
OhmV-IR Mar 13, 2026
0c0e638
async server
OhmV-IR Mar 15, 2026
9f677fe
some fixes
OhmV-IR Mar 15, 2026
3a1e924
start adding some launcher code
OhmV-IR Mar 18, 2026
4929686
Forgot to commit this
OhmV-IR Mar 23, 2026
1dff2b9
Forgot to commit this
OhmV-IR Mar 23, 2026
67e3d7b
fix windows vcpkg dependency building
OhmV-IR Mar 23, 2026
a74b8cd
fix
OhmV-IR Mar 23, 2026
5495618
Forgot to commit this
OhmV-IR Mar 24, 2026
9a70d3f
Forgot to commit this
OhmV-IR Mar 24, 2026
dd00b81
Forgot to commit this
OhmV-IR Mar 24, 2026
645274a
add vcpkg baseline
OhmV-IR Mar 24, 2026
8abec0f
fix win build
OhmV-IR Mar 24, 2026
f466e00
again
OhmV-IR Mar 24, 2026
06b4e57
aaaa
OhmV-IR Mar 24, 2026
bef251c
aa
OhmV-IR Mar 24, 2026
0ad405d
yay
OhmV-IR Mar 24, 2026
250eb0e
Merge branch 'master' into add-friends-system
OhmV-IR Mar 24, 2026
c4744a1
build
OhmV-IR Mar 24, 2026
a3a9791
fix again
OhmV-IR Mar 24, 2026
02c63dc
fix
OhmV-IR Mar 24, 2026
2a894a4
fix
OhmV-IR Mar 24, 2026
51fff2d
fix
OhmV-IR Mar 24, 2026
2a699b6
fix
OhmV-IR Mar 25, 2026
5e851c2
fix windows failures
OhmV-IR Mar 25, 2026
4fe8f83
aaa
OhmV-IR Mar 25, 2026
d143f06
aaa
OhmV-IR Mar 25, 2026
3297fc2
build stupid thing
OhmV-IR Mar 25, 2026
88d7f7d
wait this is so much easier
OhmV-IR Mar 25, 2026
b0eed98
wait this is so much easier
OhmV-IR Mar 25, 2026
98ab537
wait this is so much easier
OhmV-IR Mar 26, 2026
7aed3d6
connection stuff
OhmV-IR Mar 26, 2026
fe6f836
windows can go back to self-hosted
OhmV-IR Mar 26, 2026
f3c41d7
fix
OhmV-IR Mar 26, 2026
7307929
fix
OhmV-IR Mar 26, 2026
5668bb5
again
OhmV-IR Mar 26, 2026
6b37066
Merge branch 'master' into add-friends-system
OhmV-IR Mar 29, 2026
d0ced60
tmp
OhmV-IR Mar 31, 2026
27ba6c6
restinio HTTP migration
OhmV-IR Mar 31, 2026
37d516b
add dockerfile
OhmV-IR Mar 31, 2026
bfa1cce
fix jfile
OhmV-IR Mar 31, 2026
5b355d8
cmt
OhmV-IR Mar 31, 2026
72f0088
cmt
OhmV-IR Mar 31, 2026
63d1e36
fix linux launcher build
OhmV-IR Mar 31, 2026
35c6546
fix linux launcher build
OhmV-IR Mar 31, 2026
f3cea5e
fix linux launcher build
OhmV-IR Apr 1, 2026
3375ed8
completed HTTP netstack rewrite
OhmV-IR Apr 1, 2026
86b8d91
stuff
OhmV-IR Apr 2, 2026
7f35347
stuff
OhmV-IR Apr 2, 2026
230bf26
more websocket refactoring
OhmV-IR Apr 2, 2026
20a04c0
complete netstack refactor(still some bugs I think todo)
OhmV-IR Apr 2, 2026
b6911de
websockets working
OhmV-IR Apr 3, 2026
cb7aa43
notification infra
OhmV-IR Apr 3, 2026
6560f0b
SetPlayerPresence notification working
OhmV-IR Apr 3, 2026
0476780
fix some basic bugs
OhmV-IR Apr 3, 2026
ce31837
DatabaseFieldData for notification sending
OhmV-IR Apr 3, 2026
6b2ed41
make gcc compatible
OhmV-IR Apr 3, 2026
2e887a1
fix run-clang-tidy workflow piece
OhmV-IR Apr 3, 2026
e68869b
aaaa
OhmV-IR Apr 6, 2026
e898747
fix jenkins syntax
OhmV-IR Apr 6, 2026
8054108
Expliciztly say which tests are expected to return no response
OhmV-IR Apr 6, 2026
ba7758c
remove launcher from pragmabackend repo
OhmV-IR Apr 6, 2026
bfc843c
remove qt from add-friends-system pr
OhmV-IR Apr 6, 2026
d47f44f
Merge branch 'master' into add-friends-system
OhmV-IR Apr 7, 2026
29333fc
fix clang-tidy patch upload
OhmV-IR Apr 8, 2026
3703692
apply clang-tidy.patch
OhmV-IR Apr 8, 2026
c67b7d3
apply clang-format
OhmV-IR Apr 8, 2026
35beada
clang-tidy
OhmV-IR Apr 8, 2026
275b18b
fix docker container build for backend
OhmV-IR Apr 8, 2026
bf4a428
add to readme
OhmV-IR Apr 8, 2026
d97f29d
fix
OhmV-IR Apr 8, 2026
c872317
fix jfile
OhmV-IR Apr 8, 2026
b54f90e
fix file
OhmV-IR Apr 8, 2026
76a5cf8
oops
OhmV-IR Apr 8, 2026
81d05f5
speed up stash for dockerfile step
OhmV-IR Apr 8, 2026
488af37
fix
OhmV-IR Apr 8, 2026
d93045c
fix using string interpolation for secrets (dw no leak, just best pra…
OhmV-IR Apr 8, 2026
53bc4cd
fix docker buildt
OhmV-IR Apr 8, 2026
2cbccaa
fix
OhmV-IR Apr 8, 2026
bdb8ed0
fix
OhmV-IR Apr 8, 2026
04ba082
fix
OhmV-IR Apr 8, 2026
a5ee897
fix
OhmV-IR Apr 8, 2026
5c1aa68
fix utests
OhmV-IR Apr 8, 2026
5d55d44
condense docker build into one stage
OhmV-IR Apr 8, 2026
6ef8f91
start
OhmV-IR Apr 20, 2026
8fbf4fe
net refactor should be done
OhmV-IR Apr 21, 2026
773161b
fix build tools loc
OhmV-IR Apr 21, 2026
a212d66
fix
OhmV-IR Apr 22, 2026
a56ed1a
fix docker server container build
OhmV-IR Apr 22, 2026
9ae5817
net fixes
OhmV-IR Apr 22, 2026
e153b30
fix tests
OhmV-IR Apr 22, 2026
3070d3a
try fix static initializer error
OhmV-IR Apr 22, 2026
06fcbdc
make parallel
OhmV-IR Apr 22, 2026
840176a
clang-format
OhmV-IR Apr 22, 2026
b42508b
tidy up
OhmV-IR Apr 22, 2026
0034652
fix
OhmV-IR Apr 22, 2026
978871a
clang-format and clang-tidy
OhmV-IR Apr 22, 2026
39e724e
again
OhmV-IR Apr 22, 2026
2b5ebde
tests runs server inside same process, much better stability
OhmV-IR Apr 23, 2026
97a8c3b
fix linux build
OhmV-IR Apr 23, 2026
3562f57
move drogon listeners to handlers stage
OhmV-IR Apr 23, 2026
f62bf6f
fix bug
OhmV-IR Apr 23, 2026
3c52709
just one server instance for all tests
OhmV-IR Apr 23, 2026
da76c50
tests :)
OhmV-IR Apr 23, 2026
8f27fda
tests :)
OhmV-IR Apr 23, 2026
17b5d34
fix
OhmV-IR Apr 25, 2026
633f88d
fix: add missing route and fix http response codes
astroval0 Apr 29, 2026
3335977
try to run CI
OhmV-IR Apr 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ Checks: >
performance-*,
portability-*,
readability-*,
-cppcoreguidelines-avoid-non-const-global-variables,
-misc-use-anonymous-namespace,
-readability-braces-around-statements,
-modernize-use-trailing-return-type,
-hicpp-braces-around-statements,
-misc-const-correctness,
-cert-err58-cpp,
-bugprone-easily-swappable-parameters,
-bugprone-narrowing-conversions,
-cppcoreguidelines-narrowing-conversions,
Expand All @@ -37,7 +35,9 @@ Checks: >
-readability-magic-numbers,
-readability-avoid-return-with-void-value,
-portability-avoid-pragma-once,
-bugprone-throwing-static-initialization
-bugprone-throwing-static-initialization,
-google-build-using-namespace,
-cppcoreguidelines-rvalue-reference-param-not-moved
CheckOptions:
- key: readability-identifier-naming.ClassCase
value: CamelCase
Expand Down
4 changes: 4 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[codespell]
skip = .git,out,vcpkg,__fiddler_captures,resources
count =
quiet-level = 1
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore

pragmabackend-docker.tar
# User-specific files
*.rsuser
*.suo
Expand Down Expand Up @@ -526,3 +526,5 @@ vcpkg_installed
/.idea/modules.xml
/.idea/pragmabackend.iml
/.idea/vcs.xml
Launcher/.qtcreator
Launcher/build
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 4.0)
project(pragmabackend_core)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(WIN32)
add_compile_definitions(_WIN32_WINNT=0x0A00) # target at least win10
add_compile_definitions(_WIN32=1)
Expand Down Expand Up @@ -40,6 +41,7 @@ find_package(Protobuf CONFIG REQUIRED)
find_program(PROTOC_COMPILER protoc REQUIRED)
find_package(nlohmann_json CONFIG REQUIRED)
find_package(stduuid CONFIG REQUIRED)
find_package(Drogon REQUIRED)
target_compile_definitions(pragmabackend_core PUBLIC BOOST_ERROR_CODE_HEADER_ONLY)
file(GLOB_RECURSE packetimplementors CMAKE_CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/Packets/Implementation/*.cpp")
target_sources(pragmabackend_core PRIVATE ${packetimplementors})
Expand All @@ -51,6 +53,8 @@ target_link_libraries(pragmabackend_core PUBLIC SQLiteCpp)
target_link_libraries(pragmabackend_core PUBLIC protobuf::libprotoc protobuf::libprotobuf)
target_link_libraries(pragmabackend_core PUBLIC nlohmann_json::nlohmann_json)
target_link_libraries(pragmabackend_core PUBLIC stduuid)
target_link_libraries(pragmabackend_core PUBLIC Drogon::Drogon)
target_compile_features(pragmabackend_core PUBLIC cxx_std_20)
target_include_directories(pragmabackend_core PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/Packets/Model")
target_include_directories(pragmabackend_core PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/Persistence/Model")

Expand Down Expand Up @@ -102,9 +106,8 @@ target_sources(pragmabackend_core PRIVATE ${GENERATED_PROTO_SRCS})
target_include_directories(pragmabackend_core PUBLIC ${CMAKE_CURRENT_BINARY_DIR})

add_subdirectory(tests)

if(MSVC)
add_compile_options(/W4 /WX /permissive-)
else ()
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
endif ()
endif ()
2 changes: 2 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "x64-windows",
"VCPKG_INSTALL_OPTIONS": "--x-buildtrees-root=C:/b;--x-packages-root=C:/p;--x-downloads-root=C:/d",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"CMAKE_C_COMPILER": "cl",
"CMAKE_CXX_COMPILER": "cl"
Expand All @@ -37,6 +38,7 @@
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "x64-windows",
"VCPKG_INSTALL_OPTIONS": "--x-buildtrees-root=C:/b;--x-packages-root=C:/p;--x-downloads-root=C:/d",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"CMAKE_C_COMPILER": "cl",
"CMAKE_CXX_COMPILER": "cl"
Expand Down
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM ubuntu:24.04

WORKDIR /server

COPY out/build/x64-release-linux/ .
RUN chmod +x ./pragmabackend
EXPOSE 8081
EXPOSE 8082
EXPOSE 80
CMD ["./pragmabackend"]
206 changes: 129 additions & 77 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ pipeline {
agent none

stages {
stage("Spell check") {
agent { label 'linux' }
steps {
checkout scm
sh 'codespell'
}
}

stage('Build Matrix') {
matrix {
axes {
Expand All @@ -16,6 +24,7 @@ pipeline {
}

agent { label "${OS}" }

options {
throttle(['RamIntensiveJob'])
}
Expand Down Expand Up @@ -57,7 +66,7 @@ pipeline {
]) {
script {
if (isUnix()) {
sh "echo \"{\\\"steamApiKey\\\": \\\"$STEAM_KEY\\\"}\" > auth.json"
sh "echo \"{\\\"steamApiKey\\\": \\\"\$STEAM_KEY\\\"}\" > auth.json"
} else {
powershell '''
$content = "{`"steamApiKey`": `"$env:STEAM_KEY`"}"
Expand All @@ -73,16 +82,12 @@ pipeline {
steps {
script {
if (env.OS == 'windows') {
bat "if exist out rmdir /s /q out"
bat """
call \"C:\\Program Files\\Microsoft Visual Studio\\18\\Community\\VC\\Auxiliary\\Build\\vcvarsall.bat\" x64
call "C:\\BuildTools\\VC\\Auxiliary\\Build\\vcvarsall.bat" x64
cmake --preset x64-${BUILD_TYPE}-win
"""
} else {
sh """
rm -rf out
cmake --preset x64-${BUILD_TYPE}-linux
"""
sh "cmake --preset x64-${BUILD_TYPE}-linux"
}
}
}
Expand All @@ -93,7 +98,7 @@ pipeline {
script {
if (env.OS == 'windows') {
bat """
call \"C:\\Program Files\\Microsoft Visual Studio\\18\\Community\\VC\\Auxiliary\\Build\\vcvarsall.bat\" x64
call "C:\\BuildTools\\VC\\Auxiliary\\Build\\vcvarsall.bat" x64
cmake --build out/build/x64-${BUILD_TYPE}-win
"""
} else {
Expand All @@ -116,104 +121,151 @@ pipeline {
}
}
}
}
}

stage("Stash") {
when {
expression { BUILD_TYPE == "release" }
}
steps {
script {
if (env.OS == 'windows') {
stash name: 'winbuild', includes: 'package-release-win/**'
} else {
stash name: 'linuxbuild', includes: 'package-release-linux/**'
}
}
}
}
}
}
}

stage("code analysis") {
stage("Post-matrix parallel tasks") {
parallel {
stage("Build docker server container") {
agent { label 'docker-linux' }
steps {
checkout scm
dir('out/build') {
sh "rm -rf x64-release-linux"
sh "rm -rf package-release-linux"
unstash 'linuxbuild'
sh "mv package-release-linux x64-release-linux"
}
sh "docker build -t pragmabackend:latest ."
sh "docker tag pragmabackend:latest ohmivr/pragmabackend:latest"
sh "docker push ohmivr/pragmabackend:latest"
sh "docker save pragmabackend:latest -o pragmabackend-docker.tar"
archiveArtifacts artifacts: 'pragmabackend-docker.tar', fingerprint: true
sh "rm pragmabackend-docker.tar"
}
}

stage("Code formatter") {
agent { label 'linux' }
steps {
script {
stage("Checkout") {
checkout scm
}
stage("Run formatter") {
sh """
FILES=\$(find . -type f -regex '\\./\\(Packets\\|Persistence\\|tests\\)/.*\\.\\(h\\|cpp\\)\$')
clang-format -i \$FILES main.cpp StaticHTTPPackets.cpp StaticWSPackets.cpp
"""
}
stage("Create diff") {
sh """
if ! git diff --quiet; then
git diff > clang-format.patch
echo \"Patch created, apply the patch from the artifacts section to fix\"
else
echo \"No changes required\"
fi
"""
}
stage("Upload diff if exists") {
if (fileExists('clang-format.patch')) {
archiveArtifacts artifacts: 'clang-format.patch', fingerprint: true
}
}
stage("Fail if diff exists") {
if (fileExists('clang-format.patch')) {
sh "exit 1"
}
checkout scm
sh """
FILES=\$(find . -type f -regex '\\./\\(Packets\\|Persistence\\|tests\\)/.*\\.\\(h\\|cpp\\)\$')
clang-format -i \$FILES main.cpp StaticHTTPPackets.cpp StaticWSPackets.cpp
"""
sh """
if ! git diff --quiet; then
git diff > clang-format.patch
echo "Patch created, apply the patch from the artifacts section to fix"
else
echo "No changes required"
fi
"""
if (fileExists('clang-format.patch')) {
archiveArtifacts artifacts: 'clang-format.patch', fingerprint: true
sh "rm clang-format.patch"
error("Formatting changes required")
}
}
}
}

stage("Code linter") {
agent { label 'linux' }
options {
throttle(['RamIntensiveJob'])
}
options { throttle(['RamIntensiveJob']) }
steps {
script {
stage("Checkout") {
checkout scm
sh "git submodule sync --recursive"
sh "git submodule update --init --recursive"
}
stage("Configure") {
sh "cmake --preset x64-debug-linux"
}
stage("Build protobuf files") {
sh "cmake --build out/build/x64-debug-linux --target generate_protos"
}
stage("Run linter") {
checkout scm
sh "git submodule sync --recursive"
sh "git submodule update --init --recursive"
sh "cmake --preset x64-debug-linux"
sh "cmake --build out/build/x64-debug-linux --target generate_protos"

catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
sh """
FILES=\$(find . -type f -regex '\\./\\(Packets\\|Persistence\\|tests\\)/.*\\.\\(h\\|cpp\\)\$')
run-clang-tidy \$FILES main.cpp StaticHTTPPackets.cpp StaticWSPackets.cpp -fix -p out/build/x64-debug-linux -extra-arg=-Werror
"""
}
stage("Create diff") {
sh """
if ! git diff --quiet; then
git diff > clang-tidy.patch
echo \"Patch created, apply the patch from the artifacts section to fix\"
else
echo \"No changes required\"
fi
"""
sh """
if ! git diff --quiet; then
git diff > clang-tidy.patch
echo "Patch created, apply the patch from the artifacts section to fix"
else
echo "No changes required"
fi
"""
if (fileExists('clang-tidy.patch')) {
archiveArtifacts artifacts: 'clang-tidy.patch', fingerprint: true
sh "rm clang-tidy.patch"
error("Linter changes required")
}
stage("Upload diff if exists") {
if (fileExists('clang-tidy.patch')) {
archiveArtifacts artifacts: 'clang-tidy.patch', fingerprint: true
}
}
}
}

stage("Unit tests - Linux") {
agent { label 'linux' }
steps {
script {
sh "mkdir -p testdir"
sh "rm -rf testdir/package-release-linux"
dir('testdir') {
unstash 'linuxbuild'
}
stage("Fail if diff exists") {
if (fileExists('clang-tidy.patch')) {
sh "exit 1"
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
sh "testdir/package-release-linux/tests/tests"
}
sh "pkill -9 pragmabackend || true"
}
}
}
}

stage("Unit tests - Windows") {
agent { label 'windows' }
steps {
script {
bat "if not exist testdir mkdir testdir"
dir('testdir') {
unstash 'winbuild'
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
bat "testdir\\package-release-win\\tests\\tests.exe"
}
bat "taskkill /f /im pragmabackend.exe || exit 0"
}
}
}
}
}
}
}

post {
always {
node('linux'){
step([$class: 'GitHubCommitStatusSetter', contextSource: [$class: 'ManuallyEnteredCommitContextSource', context: 'jenkins/build-status'], reposSource: [$class: 'ManuallyEnteredRepositorySource', url: 'https://github.com/SpectreRevival/pragmabackend']])
always {
node('linux') {
step([
$class: 'GitHubCommitStatusSetter',
contextSource: [$class: 'ManuallyEnteredCommitContextSource', context: 'jenkins/build-status'],
reposSource: [$class: 'ManuallyEnteredRepositorySource', url: 'https://github.com/SpectreRevival/pragmabackend']
])
}
}
}
}
}
Loading