gpt4 book ai didi

unity3d - CircleCI "Could not ensure that workspace directory exists"

转载 作者:行者123 更新时间:2023-12-05 04:53:00 26 4
gpt4 key购买 nike

我正在使用 CircleCIGameCI docker 镜像以构建 Unity 项目。构建有效,但我正在尝试使用 h-matsuo/github-release orb为了在 GitHub 上为构建创建一个版本。我为此创建了一个新的单独作业,因此我需要在作业之间共享数据。我正在使用 persist_to_workspace 来执行此操作,如文档中所述,但该解决方案似乎不起作用。我收到以下错误:

Could not ensure that workspace directory /root/project/Zipped exists

对于工作区持久逻辑,我在我的 config.yml 文件中添加了以下代码行:

  • working_directory:/root/project - 在主作业的执行器中
  • persist_to_workspace - 作为我主要工作步骤中的最后一个命令
  • attach_workspace - 作为我第二份工作步骤中的开始命令

这是我的完整 config.yml 文件:

version: 2.1
orbs:
github-release: h-matsuo/github-release@0.1.3

executors:
unity_exec:
docker:
- image: unityci/editor:ubuntu-2019.4.19f1-windows-mono-0.9.0
environment:
BUILD_NAME: speedrun-circleci-build
working_directory: /root/project

.build: &build
executor: unity_exec
steps:
- checkout
- run: mkdir -p /root/project/Zipped
- run:
name: Git submodule recursive
command: git submodule update --init --recursive
- run:
name: Remove editor folder in shared project
command: rm -rf ./Assets/Shared/Movement/Generic/Attributes/Editor/
- run:
name: Converting Unity license
command: chmod +x ./ci/unity_license.sh && ./ci/unity_license.sh
- run:
name: Building game binaries
command: chmod +x ./ci/build.sh && ./ci/build.sh
- run:
name: Zipping build
command: apt update && apt -y install zip && zip -r "/root/project/Zipped/build.zip" ./Builds/
- store_artifacts:
path: /root/project/Zipped/build.zip
- run:
name: Show all files
command: find "$(pwd)"
- persist_to_workspace:
root: Zipped
paths:
- build.zip
jobs:
build_windows:
<<: *build
environment:
BUILD_TARGET: StandaloneWindows64
release:
description: Build project and publish a new release tagged `v1.1.1`.
executor: github-release/default
steps:
- attach_workspace:
at: /root/project/Zipped
- run:
name: Show all files
command: sudo find "/root/project"
- github-release/create:
tag: v1.1.1
title: Version v1.1.1
description: This release is version v1.1.1.
file-path: ./build.zip

workflows:
version: 2
build:
jobs:
- build_windows
- release:
requires:
- build_windows

有人可以帮我解决这个问题吗?

最佳答案

如果有人遇到同样的问题,请尽量避免使用 /root 路径。我已将工件存储在 /tmp/ 中的某处,在存储工件之前,我使用 mkdir 手动创建了包含 chmod 777 的文件夹> 使用 -m 标志指定 chmod 权限。

关于unity3d - CircleCI "Could not ensure that workspace directory exists",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66262975/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com