From 30b71b2c577bf43b2e7716bd6fee182325f0c16d Mon Sep 17 00:00:00 2001 From: Dame-time-0034 <812793632@qq.com> Date: Thu, 29 Oct 2026 16:08:40 +0800 Subject: [PATCH 1/3] Create test-runner.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 测试CICD --- .github/workflows/test-runner.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/test-runner.yml diff --git a/.github/workflows/test-runner.yml b/.github/workflows/test-runner.yml new file mode 100644 index 000000000..42dda6a9b --- /dev/null +++ b/.github/workflows/test-runner.yml @@ -0,0 +1,29 @@ +name: 测试自托管Runner连通性 + +on: + workflow_dispatch: # 支持手动触发 + +jobs: + test-self-hosted: + runs-on: self-hosted + steps: + - name: 打印Runner基础信息 + run: | + echo "Runner主机名: $(hostname)" + echo "系统内核: $(uname -r)" + echo "执行用户: $(whoami)" + echo "工作路径: $(pwd)" + + - name: 验证基础编译环境 + run: | + echo "=== Git版本 ===" + git --version + echo "=== GCC版本 ===" + gcc --version + echo "=== CMake版本 ===" + cmake --version + echo "=== Python版本 ===" + python3 --version + + - name: 测试完成 + run: echo "✅ 自托管Runner测试通过,任务调度与执行全链路正常" From 047bb8b8dce0ea0582c05133ad4a7fcbb274f029 Mon Sep 17 00:00:00 2001 From: Dame-time-0034 <812793632@qq.com> Date: Thu, 29 Oct 2026 20:05:34 +0800 Subject: [PATCH 2/3] Create build_self_hosted_linux.yml --- .github/workflows/build_self_hosted_linux.yml | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/build_self_hosted_linux.yml diff --git a/.github/workflows/build_self_hosted_linux.yml b/.github/workflows/build_self_hosted_linux.yml new file mode 100644 index 000000000..95db8076f --- /dev/null +++ b/.github/workflows/build_self_hosted_linux.yml @@ -0,0 +1,35 @@ +name: hutb Linux CI/CD +on: + pull_request: + workflow_dispatch: +jobs: + linux-dev: + name: Linux CI/CD + timeout-minutes: 1440 + runs-on: self-hosted + env: + UE4_ROOT: ${{ github.workspace }} + steps: + - name: Checkout repository + uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: build + run: | + chmod +x ./Build.sh + ./Build.sh --git-code T8w6TYB_r71gGTP3A02B + shell: bash + + - name: install + run: | + chmod +x ./RunUAT.sh + ./RunUAT.sh + shell: bash + + - uses: mickem/clean-after-action@v1 + + - name: Delete .git folder + run: | + rm -rf .git + shell: bash From 4e68d3ff9da418b64ec9aa46e8ab7fd6eb039e08 Mon Sep 17 00:00:00 2001 From: Dame-time-0034 <812793632@qq.com> Date: Thu, 29 Oct 2026 20:44:27 +0800 Subject: [PATCH 3/3] Update build_self_hosted_linux.yml --- .github/workflows/build_self_hosted_linux.yml | 49 +++++++++++++++++-- 1 file changed, 44 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_self_hosted_linux.yml b/.github/workflows/build_self_hosted_linux.yml index 95db8076f..ab589faf7 100644 --- a/.github/workflows/build_self_hosted_linux.yml +++ b/.github/workflows/build_self_hosted_linux.yml @@ -2,29 +2,68 @@ name: hutb Linux CI/CD on: pull_request: workflow_dispatch: + jobs: linux-dev: name: Linux CI/CD timeout-minutes: 1440 - runs-on: self-hosted + # 新服务器 runner 的标签(默认注册即 self-hosted / Linux / X64) + runs-on: [self-hosted, Linux, X64] env: UE4_ROOT: ${{ github.workspace }} + GIT_CODE: T8w6TYB_r71gGTP3A02B steps: - name: Checkout repository uses: actions/checkout@v5 with: fetch-depth: 0 + - name: Show files + run: | + pwd + ls -al + shell: bash + + # 对应 Build.bat:拉取 ue4-gitdeps 依赖(含 LFS 大文件),再执行 Setup 与工程文件生成 - name: build run: | - chmod +x ./Build.sh - ./Build.sh --git-code T8w6TYB_r71gGTP3A02B + if [ ! -d ".git/ue4-gitdeps" ]; then + git clone "https://OpenHUTB:${GIT_CODE}@git.code.tencent.com/OpenHUTB/ue4-gitdeps.git" .git/ue4-gitdeps + cd .git/ue4-gitdeps + git lfs pull + cd ../.. + fi + + chmod +x ./Setup.sh ./GenerateProjectFiles.sh + chmod +x ./Engine/Build/BatchFiles/Linux/Build.sh ./Engine/Build/BatchFiles/RunUAT.sh + + ./Setup.sh --force + ./GenerateProjectFiles.sh + + # Linux 下对应 Windows 的 MSBuild 编译,构建编辑器目标 + ./Engine/Build/BatchFiles/Linux/Build.sh UE4Editor Linux Development shell: bash + # 对应 RunUAT.bat:BuildGraph 产出 Linux Installed Build - name: install run: | - chmod +x ./RunUAT.sh - ./RunUAT.sh + ./Engine/Build/BatchFiles/RunUAT.sh BuildGraph \ + -script=Engine/Build/InstalledEngineBuild.xml \ + -target="Make Installed Build Linux" \ + -nosign \ + -set:GameConfigurations="Development;Shipping" \ + -set:WithLinux=true \ + -set:WithLinuxAArch64=false \ + -set:WithWin64=false \ + -set:WithWin32=false \ + -set:WithMac=false \ + -set:WithAndroid=false \ + -set:WithIOS=false \ + -set:WithTVOS=false \ + -set:WithDDC=false \ + -set:WithHoloLens=false \ + -set:WithLumin=false \ + -clean shell: bash - uses: mickem/clean-after-action@v1