Repository navigation
Conversation
- Add fetch-sdk.sh to download the pinned SDK with resume and digest checks - Probe the OpenWrt download mirrors and try the fastest first - Move to the next mirror when a transfer stalls or passes 240 seconds - Keep the attempts inside the job and docker build timeouts - Log each attempt, its curl status, duration and downloaded size - Cache the release toolchain SDK by matrix entry - Use fetch-sdk.sh in the SDK Docker image
- Let OpenWrt binary and package jobs fail without failing the release run - Publish release assets whenever the Linux builds succeed - Warn in the release job when OpenWrt assets are missing - Overwrite artifacts on re-runs
Contributor
Author
|
原因是 |
Contributor
Author
|
main 上的 cfe3866 已经修复了 SDK 下载问题,关闭本 PR。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
v2.1.26 和 v2.1.27 的
Build Release Binaries都卡在Install pinned OpenWrt musl toolchain,Release 和 Docker 镜像都没有发布:v2.1.26 的 armv7 和 v2.1.27 的 amd64 在同一步跑满 30 分钟,被任务超时取消。v2.1.27 的 armv7 下载成功并编译完成,但因为 Release 被跳过,也没有发出来。
原因有两个:
curl --retry 3 --max-time 600每次尝试最多 10 分钟,重试从 0 开始。downloads.openwrt.org 到 GitHub runner 经常只有不到 200 KB/s,还会中途断开,220 MB 的 SDK 一次下不完,重试几次就超过 30 分钟的任务上限。--http1.1避开了PROTOCOL_ERROR,但避不开断开(exit 18)和超时(exit 28)。docker-publish.yml只在整个 run 成功时才推镜像,所以一个 OpenWrt 下载失败,linux 二进制明明已经编译好,Release 和 Docker 镜像也都发不出来。修改
fix(ci): resume OpenWrt SDK downloads across official mirrorspackaging/openwrt/fetch-sdk.sh,binary-release.yml和Dockerfile.sdk都通过它下载 SDKcurl -C -接着已下载的部分继续;低于 10 KiB/s 持续 60 秒,或单次超过 240 秒,就换下一个下载源。默认最多 5 次,打包任务的 docker build 里最多 3 次,都在原有的超时之内https://downloads.openwrt.org/releases/*/openwrt-sdk-*.tar.zst,下载和重定向都限定 HTTPS;sha256 仍然用sdk-matrix.json里固定的值,脚本校验一次,解压前再校验一次fix(ci): publish the release and Docker image when OpenWrt builds failcontinue-on-error,失败不影响整个 run 的结论docker-publish.yml照原有逻辑推镜像overwrite: true,重跑时不会因为同名产物报错行为变化
overwrite_files: true补上验证
在 fork 上用
workflow_dispatch跑的:dev):https://github.com/BFNOC/hideck/actions/runs/37796483023curl exit 28 from downloads.openwrt.org after 240s)后换下载源续传完成v标签,按原有逻辑在解析标签时退出,没有走到推镜像Release published without openwrt_arm64 openwrt-packages (2/6); re-run the failed OpenWrt jobs to add them(之后改为re-run the failed jobs to add them),Docker 发布被触发overwrite: true、去掉一直超时的 mirror-03。这些在本地模拟过;完整一轮跑的是修改后的版本,但失败和重跑的情况没有再跑一次ci-sdk-test不是数字,25.12.5 的 APK 打包失败;dev会被转成 0.0.0,完整一轮正常python3 -B -m unittest discover -s packaging/tests:全部通过。原来的测试要求下载命令带--max-time 600,已改为检查新的下载方式,并新增脚本行为的测试已知限制
v标签上验证 OpenWrt 失败时的 Docker 推送,只验证到 run 结论为 success 和 Docker 发布被触发sdk-matrix.json,release 任务没有 checkout,读不到这个文件基于当前 main(8299cf5,即 v2.1.27),2 个提交,改 5 个文件。