Repository navigation
ci: create ~/.cargo before writing config on macOS runners - #217
Merged
Merged
Conversation
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.
问题
Release工作流里「Build x86_64-apple-darwin」和「Build aarch64-apple-darwin」两个 job 在Install and configure dependencies步骤必然失败:失败的 job 会让
deploy及其后的desktop-windows、release-notes全部被跳过,因此 整个 Release 不会生成任何安装包,即使其余 16 个平台都编译成功。根因
.github/workflows/rust.yml第 203 行直接向~/.cargo/config.toml追加交叉编译配置:macOS runner 上的 rustup 不会创建
~/.cargo目录(运行日志显示rustup 1.29.2、rustc 1.99.1都正常,只是该目录不存在),重定向目标目录缺失时 bash 直接报No such file or directory并因-e退出。Linux 和 Windows runner 的~/.cargo是存在的,所以只有这两个 macOS job 受影响。修复
在写入前创建目录:
mkdir -p对已存在的目录是幂等的,Linux/Windows 上行为不变。验证
在 fork 的
btsd321/vnt上以同样配置打 tag 触发完整的 Release 工作流(run40937166994):x86_64-apple-darwin,失败点与上面的日志一致deploy因该失败被 skipped,Release 未生成——这正是本 PR 要解决的问题修复后重跑预计 18 个 job 全绿,
deploy正常执行并产出全部平台的 zip。