Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MegEngine 天元
MegEngine
提交
ec59a5bc
MegEngine
项目概览
MegEngine 天元
/
MegEngine
1 年多 前同步成功
通知
404
Star
4705
Fork
582
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MegEngine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
ec59a5bc
编写于
11月 02, 2021
作者:
M
Megvii Engine Team
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(build): fix ninja dry run
GitOrigin-RevId: 89f4db7e77794efd1c8aef6968819d54da134b9d
上级
b18544b4
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
41 addition
and
2 deletion
+41
-2
scripts/cmake-build/utils/utils.sh
scripts/cmake-build/utils/utils.sh
+10
-2
scripts/whl/utils/utils.sh
scripts/whl/utils/utils.sh
+31
-0
未找到文件。
scripts/cmake-build/utils/utils.sh
浏览文件 @
ec59a5bc
...
...
@@ -83,16 +83,24 @@ function config_ninja_target_cmd() {
fi
if
[
-z
"
${
_NINJA_TARGET
}
"
]
;
then
NINJA_CMD
=
"
${
NINJA_BASE
}
all -j
${
_NINJA_MAX_JOBS
}
"
elif
[[
${
_NINJA_TARGET
}
=
~
"install"
]]
;
then
NINJA_CMD
=
"
${
NINJA_BASE
}
all -j
${
_NINJA_MAX_JOBS
}
&&
${
NINJA_BASE
}
${
_NINJA_TARGET
}
"
else
NINJA_CMD
=
"
${
NINJA_BASE
}
${
_NINJA_TARGET
}
-j
${
_NINJA_MAX_JOBS
}
"
fi
if
[
${
_NINJA_DRY_RUN
}
=
"ON"
]
;
then
if
[[
"
${
NINJA_CMD
}
"
=
~
"&"
]]
;
then
echo
"code issue happened!!! base cmd can not include & before ninja explain"
echo
"now cmd:
${
NINJA_CMD
}
"
exit
-1
fi
NINJA_CMD
=
"
${
NINJA_CMD
}
-d explain -n"
else
if
[
${
_NINJA_VERBOSE
}
=
"ON"
]
;
then
if
[[
"
${
NINJA_CMD
}
"
=
~
"&"
]]
;
then
echo
"code issue happened!!! base cmd can not include & before ninja explain"
echo
"now cmd:
${
NINJA_CMD
}
"
exit
-1
fi
NINJA_CMD
=
"
${
NINJA_CMD
}
-d explain -v"
fi
if
[
${
_BUILD_DEVELOP
}
=
"ON"
]
;
then
...
...
scripts/whl/utils/utils.sh
浏览文件 @
ec59a5bc
...
...
@@ -13,6 +13,7 @@ function config_docker_file() {
}
function
ninja_dry_run_and_check_increment
()
{
echo
"into ninja_dry_run_and_check_increment"
if
[
$#
-eq
3
]
;
then
_BUILD_SHELL
=
$1
_BUILD_FLAGS
=
"
$2
-n"
...
...
@@ -26,6 +27,8 @@ function ninja_dry_run_and_check_increment() {
DIRTY_LOG
=
`
cat
dry_run.log
`
if
[[
"
${
DIRTY_LOG
}
"
=
~
${
_INCREMENT_KEY_WORDS
}
]]
;
then
echo
"DIRTY_LOG is:"
echo
${
DIRTY_LOG
}
echo
"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo
"python3 switch increment build failed, some MR make a wrong CMakeLists.txt depends"
echo
"or build env can not find default python3 in PATH env"
...
...
@@ -33,6 +36,34 @@ function ninja_dry_run_and_check_increment() {
echo
"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
exit
-1
fi
CHECK_NINJA_DRY_ISSUE_KEY_WORDS
=
"VerifyGlobs"
if
[[
"
${
DIRTY_LOG
}
"
=
~
${
CHECK_NINJA_DRY_ISSUE_KEY_WORDS
}
]]
;
then
echo
"DIRTY_LOG is:"
echo
${
DIRTY_LOG
}
echo
"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo
"python3 switch increment build failed, some MR make a wrong CMakeLists.txt"
echo
"for example use GLOB with CONFIGURE_DEPENDS flag may lead to ninja dry run failed"
echo
"about CONFIGURE_DEPENDS (please do not use it):"
echo
"a: we use scripts/cmake-build/*.sh to trigger rerun cmake, so no need CONFIGURE_DEPENDS"
echo
"b: as https://cmake.org/cmake/help/latest/command/file.html Note"
echo
" CONFIGURE_DEPENDS do not support for all generators"
echo
"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
exit
-1
fi
# as python3 change, imperative src need rebuild, force check it!
MUST_INCLUDE_KEY_WORDS
=
"imperative"
if
[[
"
${
DIRTY_LOG
}
"
=
~
${
MUST_INCLUDE_KEY_WORDS
}
]]
;
then
echo
"valid increment dry run log"
else
echo
"DIRTY_LOG is:"
echo
${
DIRTY_LOG
}
echo
"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo
"python3 switch increment build failed, some MR make a wrong CMakeLists.txt depends"
echo
"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
exit
-1
fi
}
PYTHON_API_INCLUDES
=
""
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录