aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/create_release.yml244
-rw-r--r--.github/workflows/create_release_impl.yml318
-rw-r--r--.github/workflows/test_manual.yml254
-rw-r--r--.github/workflows/validate.yml193
4 files changed, 776 insertions, 233 deletions
diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml
index 203588d24..6cf7f72fe 100644
--- a/.github/workflows/create_release.yml
+++ b/.github/workflows/create_release.yml
@@ -1,232 +1,34 @@
name: Create Release
-env:
- XMAKE_VERSION: 2.9.9
- WINDOWS_SDK_VERSION: 22621
- XMAKE_GLOBALDIR: ${{ github.workspace }}/../.xmake_shared
-
on:
push:
paths:
- 'VERSION.txt'
jobs:
- bundle-windows:
- runs-on: [windows, x64, zen]
- timeout-minutes: 25
-
- steps:
- - uses: actions/checkout@v4
-
- - name: Setup xmake
- uses: ue-foundation/[email protected]
- with:
- xmake-version: ${{env.XMAKE_VERSION}}
-
- - name: Config
- run: |
- xmake config -v -y -m release --zensentry=yes
-
- - name: Bundle
- run: |
- xmake bundle -v -y --codesignidentity="Epic Games"
-
- - name: Upload To Sentry
- run: |
- scripts\sentry-cli debug-files bundle-sources build/windows/x64/release/zenserver.pdb build/windows/x64/release/zen.pdb
- scripts\sentry-cli --auth-token ${{ secrets.SENTRY_API_KEY }} debug-files upload --org to --project zen-server build/windows/x64/release/zenserver.exe build/windows/x64/release/zen.exe build/windows/x64/release/zenserver.pdb build/windows/x64/release/zen.pdb build/windows/x64/release/zenserver.src.zip build/windows/x64/release/zen.src.zip
-
- - name: Upload zenserver-win64
- uses: actions/upload-artifact@v3
- with:
- name: zenserver-win64
- path: build/zenserver-win64.zip
-
- bundle-linux:
+ check-release:
runs-on: [linux, x64, zen]
- timeout-minutes: 25
-
- steps:
- - uses: actions/checkout@v4
-
- - name: Install UE Toolchain
- run: |
- rm -rf ./.tmp-ue-toolchain
- ./scripts/ue_build_linux/get_ue_toolchain.sh ./.tmp-ue-toolchain
-
- - name: Setup xmake
- uses: ue-foundation/[email protected]
- with:
- xmake-version: ${{env.XMAKE_VERSION}}
-
- - name: Config
- run: |
- ./scripts/ue_build_linux/ue_build.sh ./.tmp-ue-toolchain xmake config -v -y -m release --zensentry=yes
-
- - name: Bundle
- run: |
- ./scripts/ue_build_linux/ue_build.sh ./.tmp-ue-toolchain xmake bundle -v -y
-
- - name: Get Sentry CLI
- run: |
- curl -sL https://sentry.io/get-cli/ | bash
- ls -la ./scripts
- env:
- INSTALL_DIR: ./scripts
-
- - name: Upload To Sentry
- run: |
- scripts/sentry-cli debug-files bundle-sources build/linux/x86_64/release/zenserver.sym build/linux/x86_64/release/zen.sym
- scripts/sentry-cli --auth-token ${{ secrets.SENTRY_API_KEY }} debug-files upload --org to --project zen-server build/linux/x86_64/release/zenserver build/linux/x86_64/release/zen build/linux/x86_64/release/zenserver.sym build/linux/x86_64/release/zen.sym build/linux/x86_64/release/zenserver.src.zip build/linux/x86_64/release/zen.src.zip
-
- - name: Upload zenserver-linux
- uses: actions/upload-artifact@v3
- with:
- name: zenserver-linux
- path: build/zenserver-linux.zip
-
- bundle-macos:
- runs-on: [macos, x64, zen]
- timeout-minutes: 25
-
+ timeout-minutes: 2
+ outputs:
+ already_released: ${{ steps.check_tag.outputs.exists }}
steps:
- uses: actions/checkout@v4
-
- - name: Setup xmake
- uses: ue-foundation/[email protected]
with:
- xmake-version: ${{env.XMAKE_VERSION}}
-
- - name: Config
- run: |
- xmake config -v -y -m release --zensentry=yes
-
- - name: Bundle
- run: |
- xmake bundle -v -y --codesignidentity="Developer ID Application"
-
- - name: Get Sentry CLI
- run: |
- curl -sL https://sentry.io/get-cli/ | bash
- ls -la ./scripts
- env:
- INSTALL_DIR: ./scripts
-
- - name: Upload To Sentry arm64
- run: |
- scripts/sentry-cli debug-files bundle-sources build/macosx/arm64/release/zenserver.dSYM build/macosx/arm64/release/zen.dSYM
- scripts/sentry-cli --auth-token ${{ secrets.SENTRY_API_KEY }} debug-files upload --org to --project zen-server build/macosx/arm64/release/zenserver build/macosx/arm64/release/zen build/macosx/arm64/release/zenserver.dSYM build/macosx/arm64/release/zen.dSYM build/macosx/arm64/release/zenserver.src.zip build/macosx/arm64/release/zen.src.zip
-
- - name: Upload To Sentry x86_64
- run: |
- scripts/sentry-cli debug-files bundle-sources build/macosx/x86_64/release/zenserver.dSYM build/macosx/x86_64/release/zen.dSYM
- scripts/sentry-cli --auth-token ${{ secrets.SENTRY_API_KEY }} debug-files upload --org to --project zen-server build/macosx/x86_64/release/zenserver build/macosx/x86_64/release/zen build/macosx/x86_64/release/zenserver.dSYM build/macosx/x86_64/release/zen.dSYM build/macosx/x86_64/release/zenserver.src.zip build/macosx/x86_64/release/zen.src.zip
-
- - name: Upload zenserver-macos
- uses: actions/upload-artifact@v3
- with:
- name: zenserver-macos
- path: build/zenserver-macos.zip
-
- create-release:
- runs-on: [linux, x64, zen]
- timeout-minutes: 5
- needs: [bundle-linux, bundle-macos, bundle-windows]
-
- steps:
- - uses: actions/checkout@v4
-
- - name: Read VERSION.txt
- id: read_version
- uses: ue-foundation/[email protected]
- with:
- path: "./VERSION.txt"
-
- - name: Get Sentry CLI
- run: |
- curl -sL https://sentry.io/get-cli/ | bash
- ls -la ./scripts
- env:
- INSTALL_DIR: ./scripts
-
- - name: Create Release in Sentry
- run: |
- scripts/sentry-cli --auth-token ${{ secrets.SENTRY_API_KEY }} releases new --org to --project zen-server ${{steps.read_version.outputs.content}}
-
- - name: Download Linux artifacts
- uses: actions/download-artifact@v1
- with:
- name: zenserver-linux
- path: linux
-
- - name: Download MacOS artifacts
- uses: actions/download-artifact@v1
- with:
- name: zenserver-macos
- path: macos
-
- - name: Download Windows artifacts
- uses: actions/download-artifact@v1
- with:
- name: zenserver-win64
- path: win64
-
- - name: Extract Version Changes
- run: |
- sed '1,/^##/!d;/##/d' CHANGELOG.md > CHANGELOG.tmp
-
- - name: Read CHANGELOG.tmp
- id: read_changelog
- uses: ue-foundation/[email protected]
- with:
- path: "./CHANGELOG.tmp"
-
- - name: Check prerelease
- id: get-prerelease
- uses: ue-foundation/[email protected]
- with:
- cond: ${{contains(steps.read_version.outputs.content, '-pre')}}
- if_true: "true"
- if_false: "false"
-
- - name: Create Release
- id: create_release
- uses: ue-foundation/action-gh-release@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- tag_name: v${{steps.read_version.outputs.content}}
- body: |
- ${{steps.read_changelog.outputs.content}}
- draft: false
- prerelease: ${{steps.get-prerelease.outputs.value}}
- files: |
- linux/zenserver-linux.zip
- win64/zenserver-win64.zip
- macos/zenserver-macos.zip
-
- - name: Finalize Release in Sentry
- run: |
- scripts/sentry-cli --auth-token ${{ secrets.SENTRY_API_KEY }} releases finalize --org to --project zen-server ${{steps.read_version.outputs.content}}
-
- - name: Replicate release to public github
- uses: ue-foundation/[email protected]
- with:
- token: ${{ secrets.ZEN_RELEASE_GITHUB_EE_TOKEN }}
- src_repo: ue-foundation/zen
- src_repo_github_api_url: https://api.github.ol.epicgames.net
-
- dest_token: ${{ secrets.ZEN_RELEASE_GITHUB_TOKEN }}
- dest_repo: EpicGames/zen
- dest_repo_github_api_url: https://api.github.com
-
- copy_assets: true
-
- # we generally expect to be up to date so we only replicate a few releases which should be the current one (plus potentially a few more)
- limit: 3
-
- # Working around issues with releases 5.5.2 and earlier that it attempts to replicate even though they already exist
- min_version: v5.5.4
-
- # we skip replicating pre and draft releases to keep the public repo focused on the releases itself
- skip_prerelease: true
- skip_draft: true
+ fetch-depth: 0
+
+ - name: Check if release tag already exists
+ id: check_tag
+ run: |
+ VERSION=$(cat VERSION.txt | tr -d '[:space:]')
+ if git tag -l "v$VERSION" | grep -q .; then
+ echo "Tag v$VERSION already exists, skipping release"
+ echo "exists=true" >> "$GITHUB_OUTPUT"
+ else
+ echo "Tag v$VERSION does not exist, proceeding with release"
+ echo "exists=false" >> "$GITHUB_OUTPUT"
+ fi
+
+ release:
+ needs: [check-release]
+ if: needs.check-release.outputs.already_released != 'true'
+ uses: ./.github/workflows/create_release_impl.yml
+ secrets: inherit
diff --git a/.github/workflows/create_release_impl.yml b/.github/workflows/create_release_impl.yml
new file mode 100644
index 000000000..9a062a292
--- /dev/null
+++ b/.github/workflows/create_release_impl.yml
@@ -0,0 +1,318 @@
+name: Create Release (impl)
+env:
+ XMAKE_VERSION: 2.9.9
+ WINDOWS_SDK_VERSION: 22621
+ XMAKE_GLOBALDIR: ${{ github.workspace }}/../.xmake_shared
+
+on:
+ workflow_call:
+
+jobs:
+ bundle-windows:
+ runs-on: [windows, x64, zen]
+ timeout-minutes: 25
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Setup xmake
+ uses: ue-foundation/[email protected]
+ with:
+ xmake-version: ${{env.XMAKE_VERSION}}
+
+ - name: Config
+ run: |
+ xmake config -v -y -m release --zensentry=yes --zencompute=no --zenhorde=no --zennomad=no
+
+ - name: Build and Bundle
+ run: |
+ xmake bundle -v -y --codesignidentity="Epic Games"
+
+ - name: Upload To Sentry
+ run: |
+ scripts\sentry-cli debug-files bundle-sources build/windows/x64/release/zenserver.pdb build/windows/x64/release/zen.pdb
+ scripts\sentry-cli --auth-token ${{ secrets.SENTRY_API_KEY }} debug-files upload --org to --project zen-server build/windows/x64/release/zenserver.exe build/windows/x64/release/zen.exe build/windows/x64/release/zenserver.pdb build/windows/x64/release/zen.pdb build/windows/x64/release/zenserver.src.zip build/windows/x64/release/zen.src.zip
+
+ - name: Upload zenserver-win64
+ uses: actions/upload-artifact@v3-node20
+ with:
+ name: zenserver-win64
+ path: build/zenserver-win64.zip
+
+ bundle-linux:
+ runs-on: [linux, x64, zen]
+ timeout-minutes: 25
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install UE Toolchain
+ run: |
+ rm -rf ./.tmp-ue-toolchain
+ ./scripts/ue_build_linux/get_ue_toolchain.sh ./.tmp-ue-toolchain
+
+ - name: Setup xmake
+ uses: ue-foundation/[email protected]
+ with:
+ xmake-version: ${{env.XMAKE_VERSION}}
+
+ - name: Config
+ run: |
+ xmake config -v -y -m release --zensentry=yes --zencompute=no --zenhorde=no --zennomad=no --toolchain=ue-clang --sdk=${{ github.workspace }}/.tmp-ue-toolchain
+
+ - name: Build and Bundle
+ run: |
+ xmake bundle -v -y
+
+ - name: Get Sentry CLI
+ run: |
+ curl -sL https://sentry.io/get-cli/ | SENTRY_CLI_VERSION="3.2.0" bash
+ ls -la ./scripts
+ env:
+ INSTALL_DIR: ./scripts
+
+ - name: Upload To Sentry
+ run: |
+ scripts/sentry-cli debug-files bundle-sources build/linux/x86_64/release/zenserver.sym build/linux/x86_64/release/zen.sym
+ scripts/sentry-cli --auth-token ${{ secrets.SENTRY_API_KEY }} debug-files upload --org to --project zen-server build/linux/x86_64/release/zenserver build/linux/x86_64/release/zen build/linux/x86_64/release/zenserver.sym build/linux/x86_64/release/zen.sym build/linux/x86_64/release/zenserver.src.zip build/linux/x86_64/release/zen.src.zip
+
+ - name: Upload zenserver-linux
+ uses: actions/upload-artifact@v3-node20
+ with:
+ name: zenserver-linux
+ path: build/zenserver-linux.zip
+
+ bundle-macos:
+ runs-on: [macos, x64, zen]
+ timeout-minutes: 25
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Setup xmake
+ uses: ue-foundation/[email protected]
+ with:
+ xmake-version: ${{env.XMAKE_VERSION}}
+
+ - name: Config
+ run: |
+ xmake config -v -y -m release --zensentry=yes --zencompute=no --zenhorde=no --zennomad=no
+
+ - name: Build and Bundle
+ run: |
+ xmake bundle -v -y --codesignidentity="Developer ID Application"
+
+ - name: Get Sentry CLI
+ run: |
+ curl -sL https://sentry.io/get-cli/ | SENTRY_CLI_VERSION="3.2.0" bash
+ ls -la ./scripts
+ env:
+ INSTALL_DIR: ./scripts
+
+ - name: Upload To Sentry arm64
+ run: |
+ scripts/sentry-cli debug-files bundle-sources build/macosx/arm64/release/zenserver.dSYM build/macosx/arm64/release/zen.dSYM
+ scripts/sentry-cli --auth-token ${{ secrets.SENTRY_API_KEY }} debug-files upload --org to --project zen-server build/macosx/arm64/release/zenserver build/macosx/arm64/release/zen build/macosx/arm64/release/zenserver.dSYM build/macosx/arm64/release/zen.dSYM build/macosx/arm64/release/zenserver.src.zip build/macosx/arm64/release/zen.src.zip
+
+ - name: Upload To Sentry x86_64
+ run: |
+ scripts/sentry-cli debug-files bundle-sources build/macosx/x86_64/release/zenserver.dSYM build/macosx/x86_64/release/zen.dSYM
+ scripts/sentry-cli --auth-token ${{ secrets.SENTRY_API_KEY }} debug-files upload --org to --project zen-server build/macosx/x86_64/release/zenserver build/macosx/x86_64/release/zen build/macosx/x86_64/release/zenserver.dSYM build/macosx/x86_64/release/zen.dSYM build/macosx/x86_64/release/zenserver.src.zip build/macosx/x86_64/release/zen.src.zip
+
+ - name: Upload zenserver-macos
+ uses: actions/upload-artifact@v3-node20
+ with:
+ name: zenserver-macos
+ path: build/zenserver-macos.zip
+
+ docker-build:
+ name: Build Docker Images
+ runs-on: [linux, x64, zen]
+ timeout-minutes: 15
+ needs: [bundle-linux, bundle-windows]
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Read VERSION.txt
+ id: read_version
+ run: echo "content=$(cat VERSION.txt)" >> "$GITHUB_OUTPUT"
+
+ - name: Download Linux bundle
+ uses: actions/download-artifact@v3-node20
+ with:
+ name: zenserver-linux
+ path: artifacts/linux
+
+ - name: Download Windows bundle
+ uses: actions/download-artifact@v3-node20
+ with:
+ name: zenserver-win64
+ path: artifacts/win64
+
+ - name: Extract binaries
+ run: |
+ mkdir -p build/linux/x86_64/release
+ unzip artifacts/linux/zenserver-linux.zip -d artifacts/linux-extracted
+ cp artifacts/linux-extracted/zenserver build/linux/x86_64/release/
+ mkdir -p build/win-binary-staging
+ unzip artifacts/win64/zenserver-win64.zip -d artifacts/win-extracted
+ cp artifacts/win-extracted/zenserver.exe build/win-binary-staging/
+
+ - name: Login to Amazon ECR
+ run: |
+ aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 728559092788.dkr.ecr.us-east-1.amazonaws.com
+
+ - name: Docker network diagnostics
+ run: |
+ echo "--- Runner: $(hostname) ---"
+ echo "--- DNS resolution ---"
+ dig +short us-east-1.ec2.archive.ubuntu.com || true
+ dig +short dl.winehq.org || true
+ echo "--- Download speed test (us-east-1.ec2.archive.ubuntu.com) ---"
+ curl -so /dev/null -w "HTTP %{http_code} | %{size_download} bytes | %{speed_download} bytes/sec | connect=%{time_connect}s total=%{time_total}s\n" \
+ http://us-east-1.ec2.archive.ubuntu.com/ubuntu/dists/noble/Release || true
+ echo "--- Download speed test (dl.winehq.org) ---"
+ curl -so /dev/null -w "HTTP %{http_code} | %{size_download} bytes | %{speed_download} bytes/sec | connect=%{time_connect}s total=%{time_total}s\n" \
+ https://dl.winehq.org/wine-builds/winehq.key || true
+
+ - name: Build and push Docker image (with Wine + Windows binary)
+ run: |
+ ECR=728559092788.dkr.ecr.us-east-1.amazonaws.com/zenserver
+ VERSION=${{ steps.read_version.outputs.content }}
+ docker pull $ECR:latest-wine || true
+ docker build \
+ --progress=plain \
+ --build-arg BUILDKIT_INLINE_CACHE=1 \
+ --cache-from $ECR:latest-wine \
+ -t $ECR:${VERSION}-wine \
+ -t $ECR:latest-wine \
+ --build-arg WIN_BINARY_DIR=build/win-binary-staging \
+ -f docker/Dockerfile .
+ docker push $ECR:${VERSION}-wine
+ docker push $ECR:latest-wine
+ env:
+ DOCKER_BUILDKIT: 1
+
+ - name: Build and push Docker image (Linux only, no Wine)
+ run: |
+ ECR=728559092788.dkr.ecr.us-east-1.amazonaws.com/zenserver
+ VERSION=${{ steps.read_version.outputs.content }}
+ docker pull $ECR:latest-linux || true
+ docker build \
+ --progress=plain \
+ --build-arg BUILDKIT_INLINE_CACHE=1 \
+ --cache-from $ECR:latest-linux \
+ --build-arg INSTALL_WINE=false \
+ -t $ECR:${VERSION}-linux \
+ -t $ECR:latest-linux \
+ -f docker/Dockerfile .
+ docker push $ECR:${VERSION}-linux
+ docker push $ECR:latest-linux
+ env:
+ DOCKER_BUILDKIT: 1
+
+ create-release:
+ runs-on: [linux, x64, zen]
+ timeout-minutes: 5
+ needs: [bundle-linux, bundle-macos, bundle-windows]
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Read VERSION.txt
+ id: read_version
+ uses: ue-foundation/[email protected]
+ with:
+ path: "./VERSION.txt"
+
+ - name: Get Sentry CLI
+ run: |
+ curl -sL https://sentry.io/get-cli/ | bash
+ ls -la ./scripts
+ env:
+ INSTALL_DIR: ./scripts
+
+ - name: Create Release in Sentry
+ run: |
+ scripts/sentry-cli --auth-token ${{ secrets.SENTRY_API_KEY }} releases new --org to --project zen-server ${{steps.read_version.outputs.content}}
+
+ - name: Download Linux artifacts
+ uses: actions/download-artifact@v3-node20
+ with:
+ name: zenserver-linux
+ path: linux
+
+ - name: Download MacOS artifacts
+ uses: actions/download-artifact@v3-node20
+ with:
+ name: zenserver-macos
+ path: macos
+
+ - name: Download Windows artifacts
+ uses: actions/download-artifact@v3-node20
+ with:
+ name: zenserver-win64
+ path: win64
+
+ - name: Extract Version Changes
+ run: |
+ sed '1,/^##/!d;/##/d' CHANGELOG.md > CHANGELOG.tmp
+
+ - name: Read CHANGELOG.tmp
+ id: read_changelog
+ uses: ue-foundation/[email protected]
+ with:
+ path: "./CHANGELOG.tmp"
+
+ - name: Check prerelease
+ id: get-prerelease
+ uses: ue-foundation/[email protected]
+ with:
+ cond: ${{contains(steps.read_version.outputs.content, '-pre')}}
+ if_true: "true"
+ if_false: "false"
+
+ - name: Create Release
+ id: create_release
+ uses: ue-foundation/action-gh-release@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ tag_name: v${{steps.read_version.outputs.content}}
+ target_commitish: ${{ github.sha }}
+ body: |
+ ${{steps.read_changelog.outputs.content}}
+ draft: false
+ prerelease: ${{steps.get-prerelease.outputs.value}}
+ files: |
+ linux/zenserver-linux.zip
+ win64/zenserver-win64.zip
+ macos/zenserver-macos.zip
+
+ - name: Finalize Release in Sentry
+ run: |
+ scripts/sentry-cli --auth-token ${{ secrets.SENTRY_API_KEY }} releases finalize --org to --project zen-server ${{steps.read_version.outputs.content}}
+
+ - name: Replicate release to public github
+ uses: ue-foundation/[email protected]
+ with:
+ token: ${{ secrets.ZEN_RELEASE_GITHUB_EE_TOKEN }}
+ src_repo: ue-foundation/zen
+ src_repo_github_api_url: https://api.github.ol.epicgames.net
+
+ dest_token: ${{ secrets.ZEN_RELEASE_GITHUB_TOKEN }}
+ dest_repo: EpicGames/zen
+ dest_repo_github_api_url: https://api.github.com
+
+ copy_assets: true
+
+ # we generally expect to be up to date so we only replicate a few releases which should be the current one (plus potentially a few more)
+ limit: 3
+
+ # Working around issues with releases 5.5.2 and earlier that it attempts to replicate even though they already exist
+ min_version: v5.5.4
+
+ # we skip replicating pre and draft releases to keep the public repo focused on the releases itself
+ skip_prerelease: true
+ skip_draft: true
diff --git a/.github/workflows/test_manual.yml b/.github/workflows/test_manual.yml
new file mode 100644
index 000000000..dd27f0260
--- /dev/null
+++ b/.github/workflows/test_manual.yml
@@ -0,0 +1,254 @@
+name: Manual Test Run
+env:
+ XMAKE_VERSION: 2.9.9
+ WINDOWS_SDK_VERSION: 22621
+ XMAKE_GLOBALDIR: ${{ github.workspace }}/../.xmake_shared
+
+on:
+ workflow_dispatch:
+ inputs:
+ platform:
+ description: 'Platform to test on'
+ required: true
+ type: choice
+ options:
+ - windows
+ - linux
+ - macos
+ - all
+ default: 'windows'
+ malloc:
+ description: 'Memory allocator override (runtime --malloc flag passed to test binaries)'
+ type: choice
+ options:
+ - default
+ - stomp
+ - mimalloc
+ - rpmalloc
+ default: 'default'
+ sanitizer:
+ description: 'Sanitizer to enable (triggers full rebuild)'
+ type: choice
+ options:
+ - none
+ - asan
+ - tsan
+ - msan
+ default: 'none'
+ test_suite:
+ description: 'Test suite to run (core, store, server, integration, http, util, remotestore, all)'
+ type: string
+ default: 'all'
+ extra_args:
+ description: 'Extra arguments passed to test runners (after --)'
+ type: string
+ default: ''
+
+jobs:
+ windows-test:
+ name: Test Windows
+ if: ${{ inputs.platform == 'windows' || inputs.platform == 'all' }}
+ runs-on: [windows, x64, zen]
+ timeout-minutes: 40
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Trust workspace
+ run: git config --global --add safe.directory "${{ github.workspace }}"
+
+ - name: Setup xmake
+ uses: ue-foundation/[email protected]
+ with:
+ xmake-version: ${{ env.XMAKE_VERSION }}
+
+ - name: Config
+ run: |
+ $SanitizerFlag = ""
+ if ("${{ inputs.sanitizer }}" -ne "none") {
+ $SanitizerFlag = "--${{ inputs.sanitizer }}=y"
+ }
+ xmake config -vD -y -m debug --arch=x64 --zensentry=no $SanitizerFlag
+
+ - name: Clean reports
+ run: if (Test-Path build/reports) { Remove-Item -Recurse -Force build/reports }
+
+ - name: Kill stale test processes
+ shell: powershell
+ run: |
+ scripts\test_scripts\kill-test-processes.ps1 -Label stale -BuildDir "${{ github.workspace }}\build"
+
+ - name: Build & Test
+ run: |
+ $ExtraArgs = @()
+ if ("${{ inputs.malloc }}" -ne "default") {
+ $ExtraArgs += "--malloc=${{ inputs.malloc }}"
+ }
+ $UserArgs = "${{ inputs.extra_args }}"
+ if ($UserArgs) {
+ $ExtraArgs += $UserArgs -split ' '
+ }
+ $Cmd = "xmake test -v -y --run=${{ inputs.test_suite }} --junit"
+ if ($ExtraArgs.Count -gt 0) {
+ $Cmd += " -- " + ($ExtraArgs -join ' ')
+ }
+ Write-Host "Running: $Cmd"
+ Invoke-Expression $Cmd
+
+ - name: Kill test processes
+ if: always()
+ shell: powershell
+ run: |
+ scripts\test_scripts\kill-test-processes.ps1 -Label leftover -BuildDir "${{ github.workspace }}\build"
+
+ - name: Upload report
+ if: failure() || success()
+ uses: actions/upload-artifact@v3-node20
+ with:
+ name: reports-win64-${{ inputs.sanitizer }}-${{ inputs.malloc }}
+ path: build/reports/*.xml
+
+ - name: Test Report
+ if: failure() || success()
+ uses: ue-foundation/test-reporter@v2
+ with:
+ name: Test Results (win64, ${{ inputs.sanitizer }}, malloc=${{ inputs.malloc }})
+ path: build/reports/*.xml
+ reporter: java-junit
+ list-tests: 'failed'
+
+ linux-test:
+ name: Test Linux
+ if: ${{ inputs.platform == 'linux' || inputs.platform == 'all' }}
+ runs-on: [linux, x64, zen]
+ timeout-minutes: 40
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Install UE Toolchain
+ run: |
+ rm -rf ./.tmp-ue-toolchain
+ ./scripts/ue_build_linux/get_ue_toolchain.sh ./.tmp-ue-toolchain
+
+ - name: Setup xmake
+ uses: ue-foundation/[email protected]
+ with:
+ xmake-version: ${{ env.XMAKE_VERSION }}
+
+ - name: Config
+ run: |
+ SANITIZER_FLAG=""
+ if [ "${{ inputs.sanitizer }}" != "none" ]; then
+ SANITIZER_FLAG="--${{ inputs.sanitizer }}=y"
+ fi
+ xmake config -v -y -m debug --arch=x86_64 --zensentry=no --toolchain=ue-clang --sdk=${{ github.workspace }}/.tmp-ue-toolchain $SANITIZER_FLAG
+
+ - name: Clean reports
+ run: rm -rf build/reports
+
+ - name: Kill stale test processes
+ run: |
+ bash scripts/test_scripts/kill-test-processes.sh stale "${{ github.workspace }}/build"
+
+ - name: Build & Test
+ run: |
+ set -x
+ EXTRA_ARGS=""
+ MALLOC_ARG=""
+ if [ "${{ inputs.malloc }}" != "default" ]; then
+ MALLOC_ARG="--malloc=${{ inputs.malloc }}"
+ fi
+ USER_ARGS="${{ inputs.extra_args }}"
+ if [ -n "$MALLOC_ARG" ] || [ -n "$USER_ARGS" ]; then
+ EXTRA_ARGS="-- $MALLOC_ARG $USER_ARGS"
+ fi
+ xmake test -v -y --run=${{ inputs.test_suite }} --junit $EXTRA_ARGS
+
+ - name: Kill test processes
+ if: always()
+ run: |
+ bash scripts/test_scripts/kill-test-processes.sh leftover "${{ github.workspace }}/build"
+
+ - name: Upload report
+ if: failure() || success()
+ uses: actions/upload-artifact@v3-node20
+ with:
+ name: reports-linux-${{ inputs.sanitizer }}-${{ inputs.malloc }}
+ path: build/reports/*.xml
+
+ - name: Test Report
+ if: failure() || success()
+ uses: ue-foundation/test-reporter@v2
+ with:
+ name: Test Results (linux, ${{ inputs.sanitizer }}, malloc=${{ inputs.malloc }})
+ path: build/reports/*.xml
+ reporter: java-junit
+ list-tests: 'failed'
+
+ macos-test:
+ name: Test macOS
+ if: ${{ inputs.platform == 'macos' || inputs.platform == 'all' }}
+ runs-on: [macos, x64, zen]
+ timeout-minutes: 40
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup xmake
+ uses: ue-foundation/[email protected]
+ with:
+ xmake-version: ${{ env.XMAKE_VERSION }}
+
+ - name: Config
+ run: |
+ SANITIZER_FLAG=""
+ if [ "${{ inputs.sanitizer }}" != "none" ]; then
+ SANITIZER_FLAG="--${{ inputs.sanitizer }}=y"
+ fi
+ xmake config -v -y -m debug --arch=x86_64 --zensentry=no $SANITIZER_FLAG
+
+ - name: Clean reports
+ run: rm -rf build/reports
+
+ - name: Kill stale test processes
+ run: |
+ bash scripts/test_scripts/kill-test-processes.sh stale "${{ github.workspace }}/build"
+
+ - name: Build & Test
+ run: |
+ set -x
+ EXTRA_ARGS=""
+ MALLOC_ARG=""
+ if [ "${{ inputs.malloc }}" != "default" ]; then
+ MALLOC_ARG="--malloc=${{ inputs.malloc }}"
+ fi
+ USER_ARGS="${{ inputs.extra_args }}"
+ if [ -n "$MALLOC_ARG" ] || [ -n "$USER_ARGS" ]; then
+ EXTRA_ARGS="-- $MALLOC_ARG $USER_ARGS"
+ fi
+ xmake test -v -y --run=${{ inputs.test_suite }} --junit $EXTRA_ARGS
+
+ - name: Kill test processes
+ if: always()
+ run: |
+ bash scripts/test_scripts/kill-test-processes.sh leftover "${{ github.workspace }}/build"
+
+ - name: Upload report
+ if: failure() || success()
+ uses: actions/upload-artifact@v3-node20
+ with:
+ name: reports-macos-${{ inputs.sanitizer }}-${{ inputs.malloc }}
+ path: build/reports/*.xml
+
+ - name: Test Report
+ if: failure() || success()
+ uses: ue-foundation/test-reporter@v2
+ with:
+ name: Test Results (macos, ${{ inputs.sanitizer }}, malloc=${{ inputs.malloc }})
+ path: build/reports/*.xml
+ reporter: java-junit
+ list-tests: 'failed'
diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
index bf7b1c853..fb87ecb6b 100644
--- a/.github/workflows/validate.yml
+++ b/.github/workflows/validate.yml
@@ -71,8 +71,33 @@ jobs:
- name: Trust workspace
run: git config --global --add safe.directory "${{ github.workspace }}"
+ - name: Runner info
+ shell: powershell
+ run: |
+ Write-Host "=== Host ==="
+ Write-Host "Hostname: $env:COMPUTERNAME"
+ Write-Host ""
+ Write-Host "=== CPU ==="
+ Get-CimInstance Win32_Processor |
+ Select-Object Name, NumberOfCores, NumberOfLogicalProcessors, MaxClockSpeed |
+ Format-List
+ Write-Host "=== Memory (MB) ==="
+ $os = Get-CimInstance Win32_OperatingSystem
+ "{0,-20} {1,10:N0}" -f "TotalVisible:", ($os.TotalVisibleMemorySize / 1KB)
+ "{0,-20} {1,10:N0}" -f "FreePhysical:", ($os.FreePhysicalMemory / 1KB)
+ Write-Host ""
+ Write-Host "=== Disks (GB) ==="
+ Get-PSDrive -PSProvider FileSystem |
+ Where-Object { $_.Used -ne $null -or $_.Free -ne $null } |
+ Select-Object Name,
+ @{N='UsedGB'; E={[math]::Round($_.Used/1GB,2)}},
+ @{N='FreeGB'; E={[math]::Round($_.Free/1GB,2)}},
+ @{N='TotalGB'; E={[math]::Round(($_.Used + $_.Free)/1GB,2)}},
+ Root |
+ Format-Table -AutoSize
+
- name: Setup xmake
- uses: ue-foundation/[email protected]
+ uses: ue-foundation/[email protected]
with:
xmake-version: ${{env.XMAKE_VERSION}}
@@ -84,14 +109,29 @@ jobs:
if: ${{ matrix.config == 'debug' }}
run: if (Test-Path build/reports) { Remove-Item -Recurse -Force build/reports }
+ - name: Kill stale test processes
+ if: ${{ matrix.config == 'debug' }}
+ shell: powershell
+ run: |
+ scripts\test_scripts\kill-test-processes.ps1 -Label stale -BuildDir "${{ github.workspace }}\build"
+
- name: Build & Test
if: ${{ matrix.config == 'debug' }}
+ env:
+ ZEN_TEST_ARTIFACTS_S3: ${{ vars.ZEN_TEST_ARTIFACTS_S3 }}
+ AWS_DEFAULT_REGION: ${{ vars.AWS_DEFAULT_REGION }}
run: |
xmake test -v -y --junit
+ - name: Kill test processes
+ if: ${{ always() && matrix.config == 'debug' }}
+ shell: powershell
+ run: |
+ scripts\test_scripts\kill-test-processes.ps1 -Label leftover -BuildDir "${{ github.workspace }}\build"
+
- name: Upload report
if: ${{ (failure() || success()) && (matrix.config == 'debug') }}
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v3-node20
with:
name: reports-win64
path: build/reports/*.xml
@@ -112,7 +152,7 @@ jobs:
- name: Upload zenserver-win64
if: ${{ github.ref_name == 'main' && matrix.config == 'release' }}
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v3-node20
with:
name: zenserver-win64
path: build/zenserver-win64.zip
@@ -133,33 +173,69 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
+ - name: Runner info
+ shell: bash
+ run: |
+ echo "=== Host ==="
+ echo "Hostname: $(hostname)"
+ echo "Kernel: $(uname -srm)"
+ echo
+ echo "=== CPU ==="
+ if command -v lscpu >/dev/null; then
+ lscpu | grep -E 'Model name|Socket|Core|Thread|CPU\(s\):'
+ else
+ grep -m1 'model name' /proc/cpuinfo
+ echo "CPUs: $(nproc)"
+ fi
+ echo
+ echo "=== Memory ==="
+ free -h
+ echo
+ echo "=== Disks ==="
+ df -h -x tmpfs -x devtmpfs -x squashfs 2>/dev/null || df -h
+
- name: Install UE Toolchain
run: |
rm -rf ./.tmp-ue-toolchain
./scripts/ue_build_linux/get_ue_toolchain.sh ./.tmp-ue-toolchain
- name: Setup xmake
- uses: ue-foundation/[email protected]
+ uses: ue-foundation/[email protected]
with:
xmake-version: ${{env.XMAKE_VERSION}}
- name: Config
run: |
- ./scripts/ue_build_linux/ue_build.sh ./.tmp-ue-toolchain xmake config -v -y -m ${{ matrix.config }} --arch=${{ matrix.arch }} --zensentry=yes
+ xmake config -v -y -m ${{ matrix.config }} --arch=${{ matrix.arch }} --zensentry=yes --toolchain=ue-clang --sdk=${{ github.workspace }}/.tmp-ue-toolchain
- name: Clean reports
if: ${{ matrix.config == 'debug' }}
shell: bash
run: rm -rf build/reports
+ - name: Kill stale test processes
+ if: ${{ matrix.config == 'debug' }}
+ shell: bash
+ run: |
+ bash scripts/test_scripts/kill-test-processes.sh stale "${{ github.workspace }}/build"
+
- name: Build & Test
if: ${{ matrix.config == 'debug' }}
+ env:
+ ZEN_TEST_ARTIFACTS_S3: ${{ vars.ZEN_TEST_ARTIFACTS_S3 }}
+ AWS_DEFAULT_REGION: ${{ vars.AWS_DEFAULT_REGION }}
+ run: |
+ xmake test -v -y --junit
+
+ - name: Kill test processes
+ if: ${{ always() && matrix.config == 'debug' }}
+ shell: bash
run: |
- ./scripts/ue_build_linux/ue_build.sh ./.tmp-ue-toolchain xmake test -v -y --junit
+ bash scripts/test_scripts/kill-test-processes.sh leftover "${{ github.workspace }}/build"
- name: Upload report
if: ${{ (failure() || success()) && (matrix.config == 'debug') }}
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v3-node20
with:
name: reports-linux
path: build/reports/*.xml
@@ -176,11 +252,17 @@ jobs:
- name: Bundle
if: ${{ matrix.config == 'release' }}
run: |
- ./scripts/ue_build_linux/ue_build.sh ./.tmp-ue-toolchain xmake bundle -v -y
+ xmake bundle -v -y
+
+ - name: Crashpad Check
+ if: ${{ matrix.config == 'release' }}
+ shell: bash
+ run: |
+ ./scripts/test_linux/crashpad-test.sh build/linux/${{ matrix.arch }}/release/zenserver
- name: Upload zenserver-linux
if: ${{ github.ref_name == 'main' && matrix.config == 'release' }}
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v3-node20
with:
name: zenserver-linux
path: build/zenserver-linux.zip
@@ -201,8 +283,29 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
+ - name: Runner info
+ shell: bash
+ run: |
+ echo "=== Host ==="
+ echo "Hostname: $(hostname)"
+ echo "Kernel: $(uname -srm)"
+ echo
+ echo "=== CPU ==="
+ echo "Brand: $(sysctl -n machdep.cpu.brand_string 2>/dev/null || echo unknown)"
+ echo "Cores: $(sysctl -n hw.physicalcpu 2>/dev/null || echo ?) physical / $(sysctl -n hw.logicalcpu 2>/dev/null || echo ?) logical"
+ echo
+ echo "=== Memory ==="
+ mem_bytes=$(sysctl -n hw.memsize 2>/dev/null || echo 0)
+ echo "Total: $(awk -v b="$mem_bytes" 'BEGIN{printf "%.2f GB\n", b/1024/1024/1024}')"
+ if command -v vm_stat >/dev/null; then
+ vm_stat | head -5
+ fi
+ echo
+ echo "=== Disks ==="
+ df -h
+
- name: Setup xmake
- uses: ue-foundation/[email protected]
+ uses: ue-foundation/[email protected]
with:
xmake-version: ${{env.XMAKE_VERSION}}
@@ -215,14 +318,29 @@ jobs:
shell: bash
run: rm -rf build/reports
+ - name: Kill stale test processes
+ if: ${{ matrix.config == 'debug' }}
+ shell: bash
+ run: |
+ bash scripts/test_scripts/kill-test-processes.sh stale "${{ github.workspace }}/build"
+
- name: Build & Test
if: ${{ matrix.config == 'debug' }}
+ env:
+ ZEN_TEST_ARTIFACTS_S3: ${{ vars.ZEN_TEST_ARTIFACTS_S3 }}
+ AWS_DEFAULT_REGION: ${{ vars.AWS_DEFAULT_REGION }}
run: |
xmake test -v -y --junit
+ - name: Kill test processes
+ if: ${{ always() && matrix.config == 'debug' }}
+ shell: bash
+ run: |
+ bash scripts/test_scripts/kill-test-processes.sh leftover "${{ github.workspace }}/build"
+
- name: Upload report
if: ${{ (failure() || success()) && (matrix.config == 'debug') }}
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v3-node20
with:
name: reports-macos
path: build/reports/*.xml
@@ -243,7 +361,58 @@ jobs:
- name: Upload zenserver-macos
if: ${{ github.ref_name == 'main' && matrix.config == 'release' }}
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v3-node20
with:
name: zenserver-macos
path: build/zenserver-macos.zip
+
+ docker-build:
+ name: Build Docker Images
+ if: github.ref_name == 'main'
+ runs-on: [linux, x64, zen]
+ timeout-minutes: 15
+ needs: [linux-build, windows-build]
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Download Linux bundle
+ uses: actions/download-artifact@v3-node20
+ with:
+ name: zenserver-linux
+ path: artifacts/linux
+
+ - name: Download Windows bundle
+ uses: actions/download-artifact@v3-node20
+ with:
+ name: zenserver-win64
+ path: artifacts/win64
+
+ - name: Extract binaries
+ run: |
+ mkdir -p build/linux/x86_64/release
+ unzip artifacts/linux/zenserver-linux.zip -d artifacts/linux-extracted
+ cp artifacts/linux-extracted/zenserver build/linux/x86_64/release/
+ mkdir -p build/win-binary-staging
+ unzip artifacts/win64/zenserver-win64.zip -d artifacts/win-extracted
+ cp artifacts/win-extracted/zenserver.exe build/win-binary-staging/
+
+ - name: Login to Amazon ECR
+ run: |
+ aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 728559092788.dkr.ecr.us-east-1.amazonaws.com
+
+ - name: Build and push Docker image (with Wine + Windows binary)
+ run: |
+ docker build \
+ -t 728559092788.dkr.ecr.us-east-1.amazonaws.com/zenserver:latest-wine \
+ --build-arg WIN_BINARY_DIR=build/win-binary-staging \
+ -f docker/Dockerfile .
+ docker push 728559092788.dkr.ecr.us-east-1.amazonaws.com/zenserver:latest-wine
+
+ - name: Build and push Docker image (Linux only, no Wine)
+ run: |
+ docker build \
+ -t 728559092788.dkr.ecr.us-east-1.amazonaws.com/zenserver:latest-linux \
+ --build-arg INSTALL_WINE=false \
+ -f docker/Dockerfile .
+ docker push 728559092788.dkr.ecr.us-east-1.amazonaws.com/zenserver:latest-linux