name: Validate env: XMAKE_VERSION: 2.9.9 WINDOWS_SDK_VERSION: 22621 XMAKE_GLOBALDIR: ${{ github.workspace }}/../.xmake_shared concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ github.ref_name != 'main' }} on: pull_request: types: - 'opened' - 'reopened' - 'synchronize' branches: - 'main' paths-ignore: - '*.md' - 'LICENSE' - '.gitignore' - 'docs/**' - 'VERSION.txt' - '.github/workflows/create_release.yml' - '.github/workflows/mirror_releases.yml' - '.github/workflows/mirror.yml' push: branches: - 'main' paths-ignore: - '*.md' - 'LICENSE' - '.gitignore' - 'docs/**' - 'VERSION.txt' - '.github/workflows/create_release.yml' - '.github/workflows/mirror_releases.yml' - '.github/workflows/mirror.yml' jobs: clang-format: name: Check clang-format runs-on: [linux, x64, zen] steps: - uses: actions/checkout@v4 - name: clang-format uses: ue-foundation/clang-format-action@epic-batching-v1 with: clang-format-version: '13' check-path: 'src' windows-build: name: Build & Test Windows runs-on: [windows, x64, zen] timeout-minutes: 25 strategy: matrix: config: - 'debug' - 'release' arch: - 'x64' 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/github-action-setup-xmake@v1.1.1 with: xmake-version: ${{env.XMAKE_VERSION}} - name: Config run: | xmake config -vD -y -m ${{ matrix.config }} --arch=${{ matrix.arch }} --zensentry=yes - name: Clean reports if: ${{ matrix.config == 'debug' }} run: if (Test-Path build/reports) { Remove-Item -Recurse -Force build/reports } - name: Build & Test if: ${{ matrix.config == 'debug' }} run: | xmake test -v -y --junit - name: Upload report if: ${{ (failure() || success()) && (matrix.config == 'debug') }} uses: actions/upload-artifact@v3 with: name: reports-win64 path: build/reports/*.xml - name: Test Report if: ${{ (failure() || success()) && (matrix.config == 'debug') }} uses: ue-foundation/test-reporter@v2 with: name: Test Results (win64) path: build/reports/*.xml reporter: java-junit list-tests: 'failed' - name: Bundle if: ${{ matrix.config == 'release' }} run: | xmake bundle -v -y --codesignidentity="Epic Games" - name: Upload zenserver-win64 if: ${{ github.ref_name == 'main' && matrix.config == 'release' }} uses: actions/upload-artifact@v3 with: name: zenserver-win64 path: build/zenserver-win64.zip linux-build: name: Build & Test Linux runs-on: [linux, x64, zen] timeout-minutes: 25 strategy: matrix: config: - 'debug' - 'release' arch: - 'x86_64' 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/github-action-setup-xmake@v1.1.1 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 - name: Clean reports if: ${{ matrix.config == 'debug' }} shell: bash run: rm -rf build/reports - name: Build & Test if: ${{ matrix.config == 'debug' }} run: | ./scripts/ue_build_linux/ue_build.sh ./.tmp-ue-toolchain xmake test -v -y --junit - name: Upload report if: ${{ (failure() || success()) && (matrix.config == 'debug') }} uses: actions/upload-artifact@v3 with: name: reports-linux path: build/reports/*.xml - name: Test Report if: ${{ (failure() || success()) && (matrix.config == 'debug') }} uses: ue-foundation/test-reporter@v2 with: name: Test Results (linux) path: build/reports/*.xml reporter: java-junit list-tests: 'failed' - name: Bundle if: ${{ matrix.config == 'release' }} run: | ./scripts/ue_build_linux/ue_build.sh ./.tmp-ue-toolchain xmake bundle -v -y - name: Upload zenserver-linux if: ${{ github.ref_name == 'main' && matrix.config == 'release' }} uses: actions/upload-artifact@v3 with: name: zenserver-linux path: build/zenserver-linux.zip macos-build: name: Build & Test MacOS runs-on: [macos, x64, zen] timeout-minutes: 25 strategy: matrix: config: - 'debug' - 'release' arch: - 'x86_64' steps: - name: Checkout uses: actions/checkout@v4 - name: Setup xmake uses: ue-foundation/github-action-setup-xmake@v1.1.1 with: xmake-version: ${{env.XMAKE_VERSION}} - name: Config run: | xmake config -v -y -m ${{ matrix.config }} --arch=${{ matrix.arch }} --zensentry=yes - name: Clean reports if: ${{ matrix.config == 'debug' }} shell: bash run: rm -rf build/reports - name: Build & Test if: ${{ matrix.config == 'debug' }} run: | xmake test -v -y --junit - name: Upload report if: ${{ (failure() || success()) && (matrix.config == 'debug') }} uses: actions/upload-artifact@v3 with: name: reports-macos path: build/reports/*.xml - name: Test Report if: ${{ (failure() || success()) && (matrix.config == 'debug') }} uses: ue-foundation/test-reporter@v2 with: name: Test Results (macos) path: build/reports/*.xml reporter: java-junit list-tests: 'failed' - name: Bundle if: ${{ matrix.config == 'release' }} run: | xmake bundle -v -y --codesignidentity="Developer ID Application" - name: Upload zenserver-macos if: ${{ github.ref_name == 'main' && matrix.config == 'release' }} uses: actions/upload-artifact@v3 with: name: zenserver-macos path: build/zenserver-macos.zip