9 Commits

Author SHA1 Message Date
f533f8cd4d Merge pull request #121 from alterware/dependabot/submodules/deps/libtommath-839ae9e
build(deps): bump deps/libtommath from `e823b0c` to `839ae9e`
2025-07-01 16:46:26 +02:00
531e1d913d build(deps): bump deps/libtommath from e823b0c to 839ae9e
Bumps [deps/libtommath](https://github.com/libtom/libtommath) from `e823b0c` to `839ae9e`.
- [Release notes](https://github.com/libtom/libtommath/releases)
- [Commits](e823b0c34c...839ae9ea66)

---
updated-dependencies:
- dependency-name: deps/libtommath
  dependency-version: 839ae9ea66718705fba2b5773d1bdfb2b457cea4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 14:42:06 +00:00
701f4fa722 Merge pull request #118 from alterware/dependabot/submodules/deps/libtomcrypt-3905c28
build(deps): bump deps/libtomcrypt from `a6b9aff` to `3905c28`
2025-05-01 18:32:54 +02:00
7e3aa9facc build(deps): bump deps/libtomcrypt from a6b9aff to 3905c28
Bumps [deps/libtomcrypt](https://github.com/libtom/libtomcrypt) from `a6b9aff` to `3905c28`.
- [Release notes](https://github.com/libtom/libtomcrypt/releases)
- [Commits](a6b9aff7aa...3905c28913)

---
updated-dependencies:
- dependency-name: deps/libtomcrypt
  dependency-version: 3905c28913232d6e82a2a381cc2b71b0af7aa791
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-01 14:36:06 +00:00
62be40ebcc fix(build): typo issue 2025-04-14 11:39:54 +02:00
5457472f51 build: remove debug build matrix 2025-04-14 09:55:03 +02:00
75d6440776 feat: arm64 Linux Docker image 2025-04-13 13:46:57 +02:00
b927f4aa01 fix Docker 2025-04-12 20:10:44 +02:00
b5ab843ae1 chore: update deps (#117) 2025-04-12 18:55:56 +02:00
8 changed files with 143 additions and 47 deletions

View File

@ -16,18 +16,20 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
env: env:
PREMAKE_VERSION: "5.0.0-beta2" PREMAKE_VERSION: "5.0.0-beta6"
jobs: jobs:
build-win: build-windows:
name: Build Windows name: Build Windows
runs-on: windows-latest runs-on: windows-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
configuration: configuration:
- debug
- release - release
compiler:
- msvc
- clang
arch: arch:
- x86 - x86
- x64 - x64
@ -45,7 +47,6 @@ jobs:
with: with:
submodules: true submodules: true
fetch-depth: 0 fetch-depth: 0
# NOTE - If LFS ever starts getting used during builds, switch this to true!
lfs: false lfs: false
- name: Add msbuild to PATH - name: Add msbuild to PATH
@ -56,50 +57,63 @@ jobs:
with: with:
version: ${{ env.PREMAKE_VERSION }} version: ${{ env.PREMAKE_VERSION }}
- name: Generate project files - name: Generate project files (clang)
if: matrix.compiler == 'clang'
run: premake5 --cc=${{matrix.compiler}} vs2022
- name: Generate project files (msvc)
if: matrix.compiler == 'msvc'
run: premake5 vs2022 run: premake5 vs2022
- name: Set up problem matching - name: Set up problem matching
uses: ammaraskar/msvc-problem-matcher@master uses: ammaraskar/msvc-problem-matcher@master
- name: Build ${{matrix.arch}} ${{matrix.configuration}} binaries - name: Build ${{matrix.arch}} ${{matrix.configuration}} ${{matrix.compiler}} binaries
run: msbuild /m /v:minimal /p:Configuration=${{matrix.configuration}} /p:Platform=${{matrix.platform}} build/alterware-master.sln run: msbuild /m /p:Configuration=${{matrix.configuration}} /p:Platform=${{matrix.platform}} build/alterware-master.sln
- name: Upload ${{matrix.arch}} ${{matrix.configuration}} binaries - name: Upload ${{matrix.arch}} ${{matrix.configuration}} ${{matrix.compiler}} binaries
uses: actions/upload-artifact@main uses: actions/upload-artifact@main
with: with:
name: windows-${{matrix.arch}}-${{matrix.configuration}} name: windows-${{matrix.arch}}-${{matrix.configuration}}-${{matrix.compiler}}
path: | path: |
build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master.exe build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master.exe
build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master.pdb build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master.pdb
build-linux: build-linux:
name: Build Linux name: Build Linux
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
container: ubuntu:noble
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
configuration: configuration:
- debug
- release - release
arch: arch:
- x86 - x86
- x64 - amd64
steps: steps:
- name: Install g++ and multilib
run: |
apt-get update
apt-get install -y wget tar git make gcc-13 g++-13 gcc-13-multilib g++-13-multilib
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13
update-alternatives --set gcc /usr/bin/gcc-13
update-alternatives --set g++ /usr/bin/g++-13
- name: Check out files - name: Check out files
uses: actions/checkout@main uses: actions/checkout@main
with: with:
submodules: true submodules: true
fetch-depth: 0 fetch-depth: 0
# NOTE - If LFS ever starts getting used during builds, switch this to true!
lfs: false lfs: false
- name: Install dependencies (x86) - name: Install dependencies (x86)
if: matrix.arch == 'x86' if: matrix.arch == 'x86'
run: | run: |
sudo dpkg --add-architecture i386 dpkg --add-architecture i386
sudo apt-get update apt-get update
sudo apt-get install gcc-multilib g++-multilib -y apt-get install -y gcc-13-multilib g++-13-multilib
- name: Install Premake5 - name: Install Premake5
uses: diamante0018/setup-premake@master uses: diamante0018/setup-premake@master
@ -111,16 +125,88 @@ jobs:
- name: Generate project files - name: Generate project files
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: premake5 gmake2 run: premake5 gmake
- name: Set up problem matching - name: Set up problem matching
uses: ammaraskar/gcc-problem-matcher@master uses: ammaraskar/gcc-problem-matcher@master
- name: Build ${{matrix.arch}} ${{matrix.configuration}} binaries
working-directory: ${{ github.workspace }}
run: |
make -C build config=${{matrix.configuration}}_${{matrix.arch}} -j$(nproc)
- name: Upload ${{matrix.arch}} ${{matrix.configuration}} binaries
uses: actions/upload-artifact@main
with:
name: linux-${{matrix.arch}}-${{matrix.configuration}}
path: |
build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master
prebuild-linux-arm64:
name: Prebuild Linux
runs-on: ubuntu-latest
steps:
- name: Check out files
uses: actions/checkout@main
with:
submodules: true
fetch-depth: 0
lfs: false
- name: Install Premake5
uses: diamante0018/setup-premake@master
with:
version: ${{ env.PREMAKE_VERSION }}
- name: Generate project files
run: premake5 --cc=clang gmake
- name: Upload project files
uses: actions/upload-artifact@main
with:
name: linux-project-files
path: |
build/
build-linux-arm64:
name: Build Linux
runs-on: ${{ matrix.os }}
needs: prebuild-linux-arm64
strategy:
fail-fast: false
matrix:
configuration:
- release
arch:
- arm64
include:
- arch: arm64
os: ubuntu-24.04-arm
steps:
- name: Check out files
uses: actions/checkout@main
with:
submodules: true
fetch-depth: 0
lfs: false
- name: Create the build directory
run: mkdir -p build
- name: Download project files
uses: actions/download-artifact@main
with:
name: linux-project-files
path: build/
- name: Build ${{matrix.arch}} ${{matrix.configuration}} binaries - name: Build ${{matrix.arch}} ${{matrix.configuration}} binaries
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: | run: |
pushd build pushd build
make config=${{matrix.configuration}}_${{matrix.arch}} -j$(nproc) make config=${{matrix.configuration}}_${{matrix.arch}} -j$(nproc)
env:
CC: clang
CXX: clang++
- name: Upload ${{matrix.arch}} ${{matrix.configuration}} binaries - name: Upload ${{matrix.arch}} ${{matrix.configuration}} binaries
uses: actions/upload-artifact@main uses: actions/upload-artifact@main
@ -136,10 +222,9 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
configuration: configuration:
- debug
- release - release
arch: arch:
- x64 - amd64
- arm64 - arm64
steps: steps:
- name: Check out files - name: Check out files
@ -147,7 +232,6 @@ jobs:
with: with:
submodules: true submodules: true
fetch-depth: 0 fetch-depth: 0
# NOTE - If LFS ever starts getting used during builds, switch this to true!
lfs: false lfs: false
- name: Install Premake5 - name: Install Premake5
@ -156,7 +240,7 @@ jobs:
version: ${{ env.PREMAKE_VERSION }} version: ${{ env.PREMAKE_VERSION }}
- name: Generate project files - name: Generate project files
run: premake5 gmake2 run: premake5 gmake
- name: Set up problem matching - name: Set up problem matching
uses: ammaraskar/gcc-problem-matcher@master uses: ammaraskar/gcc-problem-matcher@master
@ -175,7 +259,7 @@ jobs:
deploy: deploy:
name: Deploy artifacts name: Deploy artifacts
needs: [build-win, build-linux, build-macos] needs: [build-windows, build-linux, build-linux-arm64, build-macos]
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.ref_type == 'tag' if: github.ref_type == 'tag'
steps: steps:
@ -185,7 +269,7 @@ jobs:
- name: Download Release binaries - name: Download Release binaries
uses: actions/download-artifact@main uses: actions/download-artifact@main
with: with:
name: linux-x64-release name: linux-amd64-release
- name: Install SSH key - name: Install SSH key
uses: shimataro/ssh-key-action@v2.7.0 uses: shimataro/ssh-key-action@v2.7.0
@ -204,7 +288,7 @@ jobs:
docker: docker:
name: Create Docker Image name: Create Docker Image
needs: [build-win, build-linux, build-macos] needs: [build-windows, build-linux, build-linux-arm64, build-macos]
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.ref_type == 'tag' if: github.ref_type == 'tag'
steps: steps:
@ -230,17 +314,20 @@ jobs:
done done
shell: bash shell: bash
- name: Setup QEMU
uses: docker/setup-qemu-action@v3.6.0
- name: Setup Docker Buildx - name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3.8.0 uses: docker/setup-buildx-action@v3.10.0
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@v3.3.0 uses: docker/login-action@v3.4.0
with: with:
username: ${{ secrets.DOCKERHUB_USER }} username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- id: meta - id: meta
uses: docker/metadata-action@v5.6.1 uses: docker/metadata-action@v5.7.0
with: with:
images: | images: |
alterware/master-server alterware/master-server
@ -250,10 +337,10 @@ jobs:
- name: Build and Push Docker Image - name: Build and Push Docker Image
id: build-and-push id: build-and-push
uses: docker/build-push-action@v6.13.0 uses: docker/build-push-action@v6.15.0
with: with:
context: . context: .
platforms: linux/amd64 platforms: linux/amd64,linux/arm64
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}

View File

@ -1,14 +1,20 @@
FROM alpine:latest FROM ubuntu:noble
ARG TARGETARCH
RUN apk add --no-cache gcompat libstdc++ WORKDIR /master-server
COPY --chmod=755 ./linux-x64-release/alterware-master /usr/local/bin/ RUN groupadd alterware-master && useradd -r -g alterware-master alterware-master
RUN mkdir -p /master-server && \
chown alterware-master:alterware-master /master-server && \
chmod 775 /master-server
COPY --chown=alterware-master:alterware-master --chmod=755 ./linux-${TARGETARCH}-release/alterware-master /master-server
RUN addgroup -S alterware-master && adduser -S alterware-master -G alterware-master
USER alterware-master USER alterware-master
EXPOSE 20810/udp EXPOSE 20810/udp
ENV AW_STATS_LOCATION="" ENV AW_STATS_LOCATION=""
ENTRYPOINT ["/usr/local/bin/alterware-master"] ENTRYPOINT ["/master-server/alterware-master"]

2
deps/GSL vendored

Submodule deps/GSL updated: 355982daf6...3325bbd33d

View File

@ -60,7 +60,7 @@ function libtomcrypt.project()
buildoptions "-mcpu=apple-m1" buildoptions "-mcpu=apple-m1"
filter {} filter {}
filter { "system:macosx", "platforms:x64" } filter { "system:macosx", "platforms:amd64" }
buildoptions "-mcpu=x86-64" buildoptions "-mcpu=x86-64"
filter {} filter {}

2
deps/zlib vendored

Submodule deps/zlib updated: ef24c4c750...5a82f71ed1

View File

@ -41,8 +41,10 @@ configurations {"debug", "release"}
language "C++" language "C++"
cppdialect "C++20" cppdialect "C++20"
if os.istarget("darwin") then if os.istarget("linux") then
platforms {"x64", "arm64"} platforms {"x86", "amd64", "arm64"}
elseif os.istarget("macosx") then
platforms {"amd64", "arm64"}
else else
platforms {"x86", "x64", "arm64"} platforms {"x86", "x64", "arm64"}
end end
@ -55,6 +57,10 @@ filter "platforms:x64"
architecture "x86_64" architecture "x86_64"
filter {} filter {}
filter "platforms:amd64"
architecture "x86_64"
filter {}
filter "platforms:arm64" filter "platforms:arm64"
architecture "ARM64" architecture "ARM64"
filter {} filter {}
@ -77,15 +83,12 @@ if os.istarget("linux") then
filter {} filter {}
filter { "toolset:clang*" } filter { "toolset:clang*" }
buildoptions "-stdlib=libc++"
linkoptions "-stdlib=libc++"
-- always try to use lld. LD or Gold will not work -- always try to use lld. LD or Gold will not work
linkoptions "-fuse-ld=lld" linkoptions "-fuse-ld=lld"
filter {} filter {}
end end
filter { "system:macosx", "platforms:x64" } filter { "system:macosx", "platforms:amd64" }
buildoptions "-arch x86_64" buildoptions "-arch x86_64"
linkoptions "-arch x86_64" linkoptions "-arch x86_64"
filter {} filter {}
@ -104,7 +107,7 @@ flags {"NoIncrementalLink", "NoMinimalRebuild", "MultiProcessorCompile", "No64Bi
filter "configurations:release" filter "configurations:release"
optimize "Size" optimize "Size"
defines "NDEBUG" defines "NDEBUG"
flags "FatalCompileWarnings" fatalwarnings {"All"}
filter {} filter {}
filter "configurations:debug" filter "configurations:debug"