Skip to content

Commit 6947b16

Browse files
authored
Windowsではcopy_strip_binary.shを使わない (VOICEVOX#32)
* Windowsではcopy_strip_binary.shを使わない * Privacy.mdの場所を訂正
1 parent a7747bb commit 6947b16

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

.github/workflows/build.yml

+22-7
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,28 @@ jobs:
296296
echo "Unknown target found : ${{ matrix.artifact_name }}"
297297
return 1
298298
fi
299-
./tools/ci_build/github/linux/copy_strip_binary.sh \
300-
-r ${{ matrix.result_dir }} \
301-
-a ${{ matrix.artifact_name }} \
302-
-l $ONNXRUNTIME_NAME \
303-
-c ${{ matrix.release_config }} \
304-
-s "$(pwd)" \
305-
-t "$(git rev-parse HEAD)"
299+
if [ ${{ runner.os }} = Windows ]; then
300+
# https://github.com/microsoft/onnxruntime/blob/v1.16.3/tools/ci_build/github/azure-pipelines/templates/c-api-artifacts-package-and-publish-steps-windows.yml#L34-L72
301+
# ただし、ortクレートには.pdbとinclude/は不要なので入れない。
302+
mkdir -p ./${{ matrix.result_dir }}/${{ matrix.artifact_name }}/lib
303+
git rev-parse HEAD > ./${{ matrix.result_dir }}/${{ matrix.artifact_name }}/GIT_COMMIT_ID
304+
cp ./{docs/Privacy.md,LICENSE,README.md,ThirdPartyNotices.txt,VERSION_NUMBER} \
305+
./${{ matrix.result_dir }}/${{ matrix.artifact_name }}/
306+
cp ./${{ matrix.result_dir }}/${{ matrix.release_config }}/onnxruntime.{dll,lib} \
307+
./${{ matrix.result_dir }}/${{ matrix.artifact_name }}/lib/
308+
if [ -f ./${{ matrix.result_dir }}/${{ matrix.release_config }}/onnxruntime_providers_cuda.dll ]; then
309+
cp ./${{ matrix.result_dir }}/${{ matrix.release_config }}//onnxruntime_providers_{cuda,shared}.{dll,lib} \
310+
./${{ matrix.result_dir }}/${{ matrix.artifact_name }}/lib/
311+
fi
312+
else
313+
./tools/ci_build/github/linux/copy_strip_binary.sh \
314+
-r ${{ matrix.result_dir }} \
315+
-a ${{ matrix.artifact_name }} \
316+
-l $ONNXRUNTIME_NAME \
317+
-c ${{ matrix.release_config }} \
318+
-s "$(pwd)" \
319+
-t "$(git rev-parse HEAD)"
320+
fi
306321
mv ${{ matrix.result_dir }}/${{ matrix.artifact_name }} ./artifact/
307322
308323
- name: Upload artifact

0 commit comments

Comments
 (0)