Skip to content

Commit 91e86a5

Browse files
committed
ci
1 parent fd27332 commit 91e86a5

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,24 +113,27 @@ jobs:
113113
# 1. 定义 hvisor-tool 应该被克隆到的目录
114114
VIRDISK_DIR="${{ github.workspace }}/platform/${{ matrix.arch }}/${{ matrix.board }}/image/virtdisk"
115115
116-
# 2. (修复No such file or directory) 克隆 hvisor-tool 仓库
117-
echo "Cloning hvisor-tool into ${VIRDISK_DIR}"
116+
# 2. (关键修复) 确保目标目录存在,再进入它
117+
echo "Ensuring directory exists: ${VIRDISK_DIR}"
118+
mkdir -p "${VIRDISK_DIR}"
118119
cd "${VIRDISK_DIR}"
120+
121+
# 3. 克隆 hvisor-tool 仓库
122+
echo "Cloning hvisor-tool into the current directory"
119123
git clone https://github.com/syswonder/hvisor-tool.git
120124
121-
# 3. 定义 hvisor-tool 内部的 'tools' 目录的完整路径
125+
# 4. 定义 hvisor-tool 内部的 'tools' 目录的完整路径
122126
HVISOR_TOOL_TOOLS_DIR="${VIRDISK_DIR}/hvisor-tool/tools"
123127
124-
# 4. 确定传递给 Makefile 的架构参数
128+
# 5. 确定传递给 Makefile 的架构参数
125129
MAKE_ARCH=""
126-
# (修复unexpected operator) 使用单等号'='以兼容所有POSIX shell
127130
if [ "${{ matrix.arch }}" = "aarch64" ]; then
128131
MAKE_ARCH="arm64"
129132
elif [ "${{ matrix.arch }}" = "riscv64" ]; then
130133
MAKE_ARCH="riscv"
131134
fi
132135
133-
# 5. 在隔离的环境中执行构建,确保在正确的目录中执行
136+
# 6. 在隔离的环境中执行构建
134137
echo "Running make in ${HVISOR_TOOL_TOOLS_DIR}"
135138
make -C "${HVISOR_TOOL_TOOLS_DIR}" all ARCH=${MAKE_ARCH} LIBC=gnu
136139

0 commit comments

Comments
 (0)