Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
2ba02e3
ubuntu系统打包carla
jiandaoshou-aidehua Jun 5, 2026
9e66a46
修改对应文件
jiandaoshou-aidehua Jun 8, 2026
3964566
Merge branch 'OpenHUTB:hutb' into hutb
xiao-ma-gua Jun 8, 2026
3396b14
对齐缩进
jiandaoshou-aidehua Jun 8, 2026
4c36f87
Merge branch 'hutb' of github.com:xiao-ma-gua/hutb into hutb
jiandaoshou-aidehua Jun 8, 2026
1be6ed3
linux CI/CD 自动触发
jiandaoshou-aidehua Jun 8, 2026
93d63dc
与服务器的标签相同做的修改
jiandaoshou-aidehua Jun 8, 2026
e55b918
全局替换 Git 镜像源
jiandaoshou-aidehua Jun 8, 2026
3d2056d
不使用代理
jiandaoshou-aidehua Jun 9, 2026
fd2cd49
解决/wd4103问题
jiandaoshou-aidehua Jun 10, 2026
98e7dc1
解决LFS上传不了的问题
jiandaoshou-aidehua Jun 10, 2026
1276e9e
加快排错速度
jiandaoshou-aidehua Jun 10, 2026
ffb128e
运行不了该插件
jiandaoshou-aidehua Jun 11, 2026
74789ca
解决wd4301问题
jiandaoshou-aidehua Jun 11, 2026
4dcb45f
不使用新增插件
jiandaoshou-aidehua Jun 12, 2026
c70bdec
cpu核数过多,内存不够用
jiandaoshou-aidehua Jun 15, 2026
5a329c5
修改为原样
jiandaoshou-aidehua Jun 16, 2026
cba6f85
解决python版本过高问题
jiandaoshou-aidehua Jun 17, 2026
43c5c85
让打包机跳过扫描这批坏资产,成功完成主体打包
jiandaoshou-aidehua Jun 26, 2026
75a5f92
解决运行Checkout repository时间过长问题
jiandaoshou-aidehua Jul 1, 2026
b484dde
测试过后并非该问题
jiandaoshou-aidehua Jul 1, 2026
5a5267b
Merge branch 'OpenHUTB:hutb' into hutb
xiao-ma-gua Jul 7, 2026
0bd3706
动态跳过扫描这批坏资产
jiandaoshou-aidehua Jul 8, 2026
c76aacf
Merge branch 'hutb' of github.com:xiao-ma-gua/hutb into hutb
jiandaoshou-aidehua Jul 8, 2026
2929fe5
对LFS状态修复,先试试吧
jiandaoshou-aidehua Jul 9, 2026
179c147
回退LFS状态修复
jiandaoshou-aidehua Jul 10, 2026
89b824e
Cook 前自动修复 .uasset 中非法 /RoadRunnerMaterials/ 材质路径为 /Game/RoadRunnerMa…
jiandaoshou-aidehua Jul 12, 2026
b56b835
Merge branch 'hutb' into hutb
xiao-ma-gua Jul 12, 2026
d9d34a7
将新增的插件先改为false
jiandaoshou-aidehua Jul 13, 2026
c4459a9
将新增的插件先改为false
jiandaoshou-aidehua Jul 13, 2026
77c359a
将新增的插件先设置为false
jiandaoshou-aidehua Jul 13, 2026
f0c5d36
fix: register RoadRunnerCarlaContent plugin to resolve Cook mount poi…
jiandaoshou-aidehua Jul 14, 2026
7316845
启动最新的插件以及将依赖放在
jiandaoshou-aidehua Jul 16, 2026
33a1ad7
解压对应插件以及依赖
jiandaoshou-aidehua Jul 16, 2026
e4a3fab
只解压 插件相关 文件(RoadRunner、Cesium、MuJoCo、CoACD、libzmq)以及清理 Build/*-source…
jiandaoshou-aidehua Jul 17, 2026
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
96 changes: 86 additions & 10 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name: hubt Linux CI/CD

on:
pull_request:
workflow_dispatch:


jobs:
linux-dev:
name: Linux CI/CD
timeout-minutes: 1440
runs-on: self-hosted:ubuntu-hutb
runs-on: [self-hosted, ubuntu-hutb]

env:
UE4_ROOT: /home/ubuntu/UnrealEngine_4.26
Expand All @@ -18,18 +19,43 @@ jobs:
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Show files
run: |
pwd
ls -al

- name: setup
run: |
source ./setEnv64.sh
source ./setEnv64.sh
git update-index --skip-worktree Unreal/CarlaUE4/CarlaUE4.uproject

# Clone dependencies_u (only for UE4 plugins, not source pkgs)
echo "=== Cloning dependencies_u for plugins ==="
GIT_LFS_SKIP_SMUDGE=1 git clone \
"https://OpenHUTB:T8w6TYB_r71gGTP3A02B@git.code.tencent.com/OpenHUTB/dependencies_u.git" \
Build/dependencies 2>/dev/null || true
if [ -d Build/dependencies ]; then
cd Build/dependencies && git lfs pull && cd ../..
# Extract plugins
7z x Build/dependencies/Plugins/RoadRunner_Plugins.zip -o"Unreal/CarlaUE4/Plugins/" -y
7z x Build/dependencies/Plugins/CesiumForUnreal-426-v1.18.0-ue4.zip -o"Unreal/CarlaUE4/Plugins/" -y
# UnrealRoboticsLab third-party deps
mkdir -p Unreal/CarlaUE4/Plugins/UnrealRoboticsLab/third_party/install
mkdir -p Unreal/CarlaUE4/Plugins/UnrealRoboticsLab/third_party/install/MuJoCo
tar -xzf Build/dependencies/Plugins/mujoco-3.3.5-linux-x86_64.tar.gz -C Unreal/CarlaUE4/Plugins/UnrealRoboticsLab/third_party/install/MuJoCo --strip-components=1 2>/dev/null || true
mkdir -p Unreal/CarlaUE4/Plugins/UnrealRoboticsLab/third_party/install/CoACD
unzip -qo Build/dependencies/Plugins/CoACD.zip -d Unreal/CarlaUE4/Plugins/UnrealRoboticsLab/third_party/install/CoACD 2>/dev/null || true
mkdir -p Unreal/CarlaUE4/Plugins/UnrealRoboticsLab/third_party/install/libzmq
tar -xzf Build/dependencies/Plugins/libzmq-linux.tar.gz -C Unreal/CarlaUE4/Plugins/UnrealRoboticsLab/third_party/install/libzmq 2>/dev/null || true
echo "=== Plugins extracted ==="
fi

# Clean leftover source dirs from previous runs (avoid conflict with make setup)
rm -rf Build/*-source Build/*-src 2>/dev/null || true

make setup ARGS="--chrono"
shell: bash
shell: bash

- name: build
run: |
Expand All @@ -43,17 +69,67 @@ jobs:
source ./Update.sh
shell: bash

- name: Fix Windows Compiler Flags and Clean Cache
run: |
# 💡 在脚本中直接使用 $UE4_ROOT 变量
echo "=== 正在抹除 C# 脚本中的 Windows 专属忽略警告参数 (/wd4103) ==="
find $UE4_ROOT/Engine/Source/Programs/UnrealBuildTool -type f -name "*.cs" -exec sed -i 's#-wd4103##g' {} +
find $UE4_ROOT/Engine/Source/Programs/UnrealBuildTool -type f -name "*.cs" -exec sed -i 's#/wd4103##g' {} +

find ${{ github.workspace }} -type f -name "*.cs" -exec sed -i 's#-wd4103##g' {} +
find ${{ github.workspace }} -type f -name "*.cs" -exec sed -i 's#/wd4103##g' {} +

echo "=== 正在强制重新编译虚幻引擎构建工具 (UBT) ==="
rm -f $UE4_ROOT/Engine/Binaries/DotNET/UnrealBuildTool.exe
cd $UE4_ROOT
./GenerateProjectFiles.sh

echo "=== 正在物理清空被污染的 Intermediate 缓存 ==="
rm -rf $UE4_ROOT/Engine/Intermediate/Build/Linux/B4D820EA
rm -rf ${{ github.workspace }}/Unreal/CarlaUE4/Intermediate
shell: bash

- name: CarlaUE4Editor
run: |
source ./setEnv64.sh
make CarlaUE4Editor ARGS="--chrono -j$(nproc)"
make CarlaUE4Editor ARGS="--chrono -j$(( $(nproc) / 3 ))"
shell: bash

# - name: package
#run: |
# source ./setEnv64.sh
# make package ARGS="--chrono"
# shell: bash
# 在执行 make package 之前,动态注入 return 0
- name: Patch Package.sh to skip bad materials
run: |
echo "=== 正在动态修改 Package.sh,跳过 cook_tagged_materials ==="
sed -i 's/function cook_tagged_materials {/function cook_tagged_materials {\n return 0/g' Util/BuildTools/Package.sh
shell: bash

# 修复 Content 包中 .uasset 文件的非法材质路径(缺少 /Game/ 根前缀)
- name: Fix invalid material paths in RoadRunner assets
run: |
echo "=== 正在修复 .uasset 中的非法 RoadRunner 材质路径 ==="
for BAD_PATH in \
"/RoadRunnerMaterials/BaseMaterial:/Game/RoadRunnerMaterials/BaseMat" \
"/RoadRunnerMaterials/BaseCutoutMaterial:/Game/RoadRunnerMaterials/BaseCutoutMat" \
"/RoadRunnerCarlaContent/:/Game/RoadRunnerCarlaContent/" \
; do
FROM="${BAD_PATH%%:*}"
TO="${BAD_PATH##*:}"
find Unreal/CarlaUE4/Content -name "*.uasset" \
-exec grep -l "$FROM" {} \; \
-exec sed -i "s|$FROM|$TO|g" {} \; 2>/dev/null || true
done
echo "修复完成。"
shell: bash

- name: package
run: |
source /home/ubuntu/miniconda3/etc/profile.d/conda.sh
conda activate carla

source ./setEnv64.sh

export MaxProcessorCount=$(( $(nproc) / 3 ))
make package ARGS="--chrono"
shell: bash



14 changes: 9 additions & 5 deletions Unreal/CarlaUE4/CarlaUE4.uproject
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FileVersion": 3,
"EngineAssociation": "{E0A51DA7-4769-9458-687B-4680AAEBFD72}",
"EngineAssociation": "{FF5B26C3-46CF-C440-D9FB-F48D5F122826}",
"Category": "",
"Description": "",
"Modules": [
Expand Down Expand Up @@ -95,7 +95,7 @@
},
{
"Name": "SteamVR",
"Enabled": true,
"Enabled": false,
"WhitelistPlatforms": [
"Win32",
"Win64",
Expand Down Expand Up @@ -154,15 +154,15 @@
},
{
"Name": "UnrealRoboticsLab",
"Enabled": true
"Enabled": false
},
{
"Name": "GLTFImporter",
"Enabled": true
"Enabled": false
},
{
"Name": "FunctionalTestingEditor",
"Enabled": true
"Enabled": false
},
{
"Name": "RuntimeTests",
Expand All @@ -184,6 +184,10 @@
"IOS"
]
},
{
"Name": "RoadRunnerCarlaContent",
"Enabled": true
},
{
"Name": "RoadRunnerCarlaIntegration",
"Enabled": true
Expand Down
4 changes: 3 additions & 1 deletion Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Carla.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public Carla(ReadOnlyTargetRules Target) : base(Target)

bool HasCustomGBufferView = File.Exists(Path.Combine(EngineDirectory, "Source", "Runtime", "Renderer", "Public", "GBufferView.h"));

// 关键:强制开启 C++ 异常支持,以兼容 Boost 和 DReyeVR
bEnableExceptions = true;
if (IsWindows(Target))
{
bEnableExceptions = true;
Expand Down Expand Up @@ -357,4 +359,4 @@ private void AddCarlaServerDependency(ReadOnlyTargetRules Target)
PublicDefinitions.Add("BOOST_DISABLE_ABI_HEADERS");
PublicDefinitions.Add("BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"FileVersion": 3,
"Version": 1,
"VersionName": "1.0",
"FriendlyName": "RoadRunnerCarlaContent",
"Description": "Content-only plugin providing RoadRunner Carla content mount point for compatibility with assets that reference /RoadRunnerCarlaContent/ paths.",
"Category": "Other",
"CreatedBy": "HUTB Team",
"CanContainContent": true,
"IsBetaVersion": false,
"Installed": true,
"Modules": []
}
4 changes: 3 additions & 1 deletion Unreal/CarlaUE4/Source/CarlaUE4/CarlaUE4.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public CarlaUE4(ReadOnlyTargetRules Target) : base(Target)
PrivatePCHHeaderFile = "CarlaUE4.h";
ShadowVariableWarningLevel = WarningLevel.Off; // -Wno-shadow

// 关键:强制开启 C++ 异常支持,以兼容 Boost 和 DReyeVR
bEnableExceptions = true;
// include LibCarla so we can #include <carla/x/y/z> headers
string LibCarlaIncludePath =
Path.GetFullPath(Path.Combine(ModuleDirectory, "..", "..", "..", "..", "LibCarla", "source"));
Expand Down Expand Up @@ -95,4 +97,4 @@ public CarlaUE4(ReadOnlyTargetRules Target) : base(Target)

PrivateDependencyModuleNames.AddRange(new string[] { "ImageWriteQueue" });
}
}
}
10 changes: 9 additions & 1 deletion Unreal/CarlaUE4/Source/CarlaUE4/CarlaUE4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,13 @@
#include "CarlaUE4.h"

IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, CarlaUE4, "CarlaUE4" );

#ifdef __linux__
#include <stdexcept>
namespace std {
void __throw_out_of_range_fmt(const char* fmt, ...) {
// 直接调用底层终止函数,骗过链接器即可,绝不使用 throw
abort();
}
}
#endif
DEFINE_LOG_CATEGORY(LogDReyeVR);
44 changes: 22 additions & 22 deletions Util/BuildTools/BuildUE4Plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CARLA_STREETMAP_PLUGINS_PATH="$CARLA_PLUGINS_PATH/StreetMap"
AIR_PLUGIN_PATH="$CARLA_PLUGINS_PATH/AirSim"
AIR_BUILD_PATH="$ROOT_PATH/Build/AirSim"

#CONTENT_PATH="$ROOT_PATH/Unreal/CarlaUE4/Content"
CONTENT_PATH="$ROOT_PATH/Unreal/CarlaUE4/Content"

OPTS=`getopt -o h --long build,rebuild,clean,chrono,chrono-path: -n 'parse-options' -- "$@"`

Expand Down Expand Up @@ -96,26 +96,26 @@ fi

# download assets

#if [[ ! -d "$CONTENT_PATH" ]]; then
# echo "$FILE_N Content directory: \"$CONTENT_PATH\""

# if [[ -d "$CACHE_DIR/Content" ]]; then
# # <==> xcopy /q /Y /S /I
# cp -a "$CACHE_DIR/Content/." "$CONTENT_PATH/"
# else
# git clone https://OpenHUTB:T8w6TYB_r71gGTP3A02B@git.code.tencent.com/OpenHUTB/Content.git "$CONTENT_PATH"
# cd "$CONTENT_PATH"
# git lfs pull
# fi

#else
# echo "$FILE_N Content directory already exists: \"$CONTENT_PATH\", executing git pull."
# cd "$CONTENT_PATH"
# git fetch --all
# git reset --hard origin/master
# git pull
# git lfs pull
#fi
if [[ ! -d "$CONTENT_PATH" ]]; then
echo "$FILE_N Content directory: \"$CONTENT_PATH\""

if [[ -d "$CACHE_DIR/Content" ]]; then
# <==> xcopy /q /Y /S /I
cp -a "$CACHE_DIR/Content/." "$CONTENT_PATH/"
else
git clone https://OpenHUTB:T8w6TYB_r71gGTP3A02B@git.code.tencent.com/OpenHUTB/Content.git "$CONTENT_PATH"
cd "$CONTENT_PATH"
git lfs pull
fi

else
echo "$FILE_N Content directory already exists: \"$CONTENT_PATH\", executing git pull."
cd "$CONTENT_PATH"
git fetch --all
git reset --hard origin/master
git pull
git lfs pull
fi


if ${BUILD_STREETMAP} ; then
Expand Down Expand Up @@ -162,4 +162,4 @@ fi



log "StreetMap Success!"
log "StreetMap Success!"
3 changes: 2 additions & 1 deletion Util/BuildTools/Linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ run-examples:
@for D in ${CARLA_EXAMPLES_FOLDER}/*; do [ -d "$${D}" ] && make -C $${D} run.only; done

CarlaUE4Editor: LibCarla.server.release osm2odr downloadplugins
# CarlaUE4Editor:
@${CARLA_BUILD_TOOLS_FOLDER}/BuildUE4Plugins.sh --build $(ARGS)
@${CARLA_BUILD_TOOLS_FOLDER}/BuildCarlaUE4.sh --build $(ARGS)

.PHONY: PythonAPI
PythonAPI: LibCarla.client.release osm2odr
@${CARLA_BUILD_TOOLS_FOLDER}/BuildPythonAPI.sh $(ARGS)
Expand Down
16 changes: 16 additions & 0 deletions Util/BuildTools/Package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ function copy_dir_fast {
}

function cook_tagged_materials {
# return 0

# Measure duration of this function call
T_START_COOK_TAGGED_MATS=$(date +%s)

Expand Down Expand Up @@ -251,6 +253,20 @@ if ${DO_CARLA_RELEASE} ; then

log "Cooking CARLA project."

# 修复 Content 中 .uasset 的非法材质路径(缺少 /Game/ 根前缀导致 Cook 崩溃)
log "Fixing invalid RoadRunner material paths in .uasset files..."
for BAD_PATH in \
"/RoadRunnerMaterials/BaseMaterial:/Game/RoadRunnerMaterials/BaseMat" \
"/RoadRunnerMaterials/BaseCutoutMaterial:/Game/RoadRunnerMaterials/BaseCutoutMat" \
"/RoadRunnerCarlaContent/:/Game/RoadRunnerCarlaContent/" \
; do
FROM="${BAD_PATH%%:*}"
TO="${BAD_PATH##*:}"
find "${CARLAUE4_ROOT_FOLDER}/Content" -name "*.uasset" \
-exec grep -l "$FROM" {} \; \
-exec sed -i "s|$FROM|$TO|g" {} \; 2>/dev/null || true
done

rm -Rf ${RELEASE_BUILD_FOLDER}
mkdir -p ${RELEASE_BUILD_FOLDER}

Expand Down
Loading
Loading