Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
74 changes: 74 additions & 0 deletions .github/workflows/build_self_hosted_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: hutb Linux CI/CD
on:
pull_request:
workflow_dispatch:

jobs:
linux-dev:
name: Linux CI/CD
timeout-minutes: 1440
# 新服务器 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: |
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: |
./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

- name: Delete .git folder
run: |
rm -rf .git
shell: bash
29 changes: 29 additions & 0 deletions .github/workflows/test-runner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 测试自托管Runner连通性

on:
workflow_dispatch: # 支持手动触发

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

除了手动触发外,至少还需要在打开Pull Request时候进行触发 :


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测试通过,任务调度与执行全链路正常"
Loading