英文:
could not parse as YAML: yaml: line 102: did not find expected key
问题
我正在尝试创建一个 GitHub 工作流 YAML 来构建 x86_64-pc-linux-gcc 工具链,但我一直遇到一个错误:“无法解析为 YAML:yaml: 第 102 行:未找到预期的键 yaml-syntax”,但我似乎找不到问题。
这是我的 YAML 链接:
https://github.com/7dog123/GCC-toolchain/blob/master/.github/workflows/cygwin.yml
英文:
I'm trying to create a github workflow yaml to build a x86_64-pc-linux-gcc toolchain but I keep getting an error "could not parse as YAML: yaml: line 102: did not find expected key yaml-syntax" but I can't seem to find the problem.
here's the link to my yaml:
https://github.com/7dog123/GCC-toolchain/blob/master/.github/workflows/cygwin.yml
答案1
得分: 1
你的YAML文件存在几个错误。
例如,在这里:
- name: configure GCC
run: |
cd gcc
mkdir gcc-${{ env.TARGET_ALIAS }}
## 在x86_64主机上,将64位库的默认目录名称设置为“lib”
case $(uname -m) in
x86_64)
...
以 #
开头的那一行与上面的缩进不匹配,这结束了文字块。
这个错误在文档的多个地方都发生,截止到当前写作时:
英文:
Your YAML has several errors.
For example, here:
- name: configure GCC
run: |
cd gcc
mkdir gcc-${{ env.TARGET_ALIAS }}
## On x86_64 hosts, set the default directory name for 64-bit libraries to “lib”
case $(uname -m) in
x86_64)
...
The line starting with #
doesn't match the indentation above, which ends the literal string block.
This same error occurs several times throughout the document, at time of writing:
- On line 107
- On lines 124-128
- On lines 169-170
- On lines 186-188
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论