mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-11-24 17:07:22 +08:00
ci: 引入 ctest 门禁并接入全平台流水线 (#4833)
tests 目录下的程序此前仅被编译、从不执行,项目中也没有任何 add_test 注册, 测试因此会静默腐烂:master 上的 test_vp9_rtp 目前即为失败状态,却无人察觉。 改为以白名单注册可无人值守执行的用例,并在流水线构建之后执行 ctest, 失败即中断。该目录其余程序多为服务型或压测工具,运行后不会自行退出,全量 自动收录会使 ctest 挂起,故采用白名单。 首批收录 test_amf、test_sortor、test_ts_splitter、test_mp4_muxer_video_dimension 四个,均已本地实测通过,总耗时 0.05 秒;并为每个用例设置 120 秒超时,避免 个别用例卡住流水线。 test_vp9_rtp 当前为失败状态,本次不收录,留待单独修复后再并入白名单。 现在先搭好框架, 后续逐个添加单元测试/门禁
This commit is contained in:
7
.github/workflows/macos.yml
vendored
7
.github/workflows/macos.yml
vendored
@@ -35,6 +35,13 @@ jobs:
|
||||
cmakeAppendedArgs: ''
|
||||
cmakeBuildType: 'Release'
|
||||
|
||||
- name: 执行门禁用例
|
||||
working-directory: '${{github.workspace}}/build'
|
||||
# 门禁用例见 tests/CMakeLists.txt 的 GATING_TESTS。多配置生成器需以 -C 指定配置
|
||||
# Gating cases are listed in GATING_TESTS in tests/CMakeLists.txt.
|
||||
# Multi-config generators require the configuration to be given with -C
|
||||
run: ctest -C Release --output-on-failure
|
||||
|
||||
- name: 设置环境变量
|
||||
run: |
|
||||
echo "BRANCH=$(echo ${GITHUB_REF#refs/heads/} | tr -s "/\?%*:|\"<>" "_")" >> $GITHUB_ENV
|
||||
|
||||
Reference in New Issue
Block a user