From 45c1ed1d70dab98680096bdb42e2fd040905cb11 Mon Sep 17 00:00:00 2001 From: yeshanshan Date: Sun, 20 Sep 2026 14:04:14 +0800 Subject: [PATCH] ci: specify bash shell for deepin build step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Add explicit shell: bash to the "Build qt5platform-plugins deb packages" step in the Deepin build workflow 2. The step relies on bash-specific features such as PIPESTATUS and pipefail-style handling of the tee pipeline 3. Without an explicit shell, GitHub Actions may default to sh on some runners, causing PIPESTATUS to be unavailable and the build status check to fail or behave incorrectly 4. Ensures consistent behavior across runner environments when capturing the build exit status Influence: 1. Trigger the qt5platform-plugins-deepin-build workflow and confirm it starts successfully 2. Verify the build step runs with bash and that PIPESTATUS is correctly evaluated 3. Test the failure path by intentionally causing dpkg-buildpackage to fail and confirm /tmp/build.log is printed and the job fails 4. Verify the success path produces packages without spurious failure 5. Confirm no regressions on runners where sh was previously used ci: 为 deepin 构建步骤指定 bash shell 1. 在 Deepin 构建工作流的 "Build qt5platform-plugins deb packages" 步骤 中显式添加 shell: bash 2. 该步骤依赖 bash 特有的功能,例如 PIPESTATUS 以及 tee 管道的错误处理 3. 如果不显式指定 shell,GitHub Actions 在某些运行器上可能默认使用 sh, 导致 PIPESTATUS 不可用,从而使构建状态检查失败或行为异常 4. 确保在不同运行器环境下捕获构建退出状态时行为一致 Influence: 1. 触发 qt5platform-plugins-deepin-build 工作流,确认其能正常启动 2. 验证构建步骤使用 bash 运行,且 PIPESTATUS 能被正确求值 3. 通过故意让 dpkg-buildpackage 失败来测试失败路径,确认会打印 /tmp/ build.log 并使任务失败 4. 验证成功路径能正常产出软件包且不会误报失败 5. 确认在之前使用 sh 的运行器上不会出现回归问题 --- .github/workflows/qt5platform-plugins-deepin-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/qt5platform-plugins-deepin-build.yml b/.github/workflows/qt5platform-plugins-deepin-build.yml index 51d3ca03..999a3266 100644 --- a/.github/workflows/qt5platform-plugins-deepin-build.yml +++ b/.github/workflows/qt5platform-plugins-deepin-build.yml @@ -38,6 +38,7 @@ jobs: mk-build-deps --install --remove --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control - name: Build qt5platform-plugins deb packages + shell: bash run: | dpkg-buildpackage -uc -us -b 2>&1 | tee /tmp/build.log; BUILD_STATUS=${PIPESTATUS[0]} if [ $BUILD_STATUS -ne 0 ]; then