From bb588068720c17e24f99402dc458bb45e5c79608 Mon Sep 17 00:00:00 2001 From: jignparm Date: Sun, 28 Apr 2019 22:44:49 -0700 Subject: [PATCH] Adding versioned dlls to tar/zip packages (#928) * Adding versioned dlls to tar/zip packages * fix syntax error * fix version name of dylib * minor fix in the target * update pattern for versioned dylib files --- .../github/azure-pipelines/c-api-packaging-pipelines.yml | 8 ++++---- tools/ci_build/github/linux/copy_strip_binary.sh | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/c-api-packaging-pipelines.yml b/tools/ci_build/github/azure-pipelines/c-api-packaging-pipelines.yml index 96e40b8c38..b4e874ade7 100644 --- a/tools/ci_build/github/azure-pipelines/c-api-packaging-pipelines.yml +++ b/tools/ci_build/github/azure-pipelines/c-api-packaging-pipelines.yml @@ -12,7 +12,7 @@ jobs: parameters: buildConfig: 'Release' artifactName: 'onnxruntime-linux-x64-$(OnnxRuntimeVersion)' - libraryName: 'libonnxruntime.so' + libraryName: 'libonnxruntime.so.$(OnnxRuntimeVersion)' commitId: $(OnnxRuntimeGitCommitHash) - template: templates/clean-agent-build-directory-step.yml @@ -28,7 +28,7 @@ jobs: parameters: buildConfig: 'Release' artifactName: 'onnxruntime-linux-x86-$(OnnxRuntimeVersion)' - libraryName: 'libonnxruntime.so' + libraryName: 'libonnxruntime.so.$(OnnxRuntimeVersion)' commitId: $(OnnxRuntimeGitCommitHash) - template: templates/clean-agent-build-directory-step.yml @@ -44,7 +44,7 @@ jobs: parameters: buildConfig: 'Release' artifactName: 'onnxruntime-linux-x64-gpu-$(OnnxRuntimeVersion)' - libraryName: 'libonnxruntime.so' + libraryName: 'libonnxruntime.so.$(OnnxRuntimeVersion)' commitId: $(OnnxRuntimeGitCommitHash) - template: templates/clean-agent-build-directory-step.yml @@ -65,7 +65,7 @@ jobs: parameters: buildConfig: 'RelWithDebInfo' artifactName: 'onnxruntime-osx-x64-$(OnnxRuntimeVersion)' - libraryName: 'libonnxruntime.dylib' + libraryName: 'libonnxruntime.$(OnnxRuntimeVersion).dylib' commitId: $(OnnxRuntimeGitCommitHash) - template: templates/clean-agent-build-directory-step.yml diff --git a/tools/ci_build/github/linux/copy_strip_binary.sh b/tools/ci_build/github/linux/copy_strip_binary.sh index 219e439584..8f15d9ba42 100644 --- a/tools/ci_build/github/linux/copy_strip_binary.sh +++ b/tools/ci_build/github/linux/copy_strip_binary.sh @@ -26,6 +26,10 @@ if [[ $LIB_NAME == *.dylib ]] then dsymutil $BINARY_DIR/$ARTIFACT_NAME/lib/$LIB_NAME -o $BINARY_DIR/$ARTIFACT_NAME/lib/$LIB_NAME.dSYM strip -S $BINARY_DIR/$ARTIFACT_NAME/lib/$LIB_NAME + ln -s $LIB_NAME $BINARY_DIR/$ARTIFACT_NAME/lib/libonnxruntime.dylib +elif [[ $LIB_NAME == *.so.* ]] +then + ln -s $LIB_NAME $BINARY_DIR/$ARTIFACT_NAME/lib/libonnxruntime.so fi cp $SOURCE_DIR/include/onnxruntime/core/session/onnxruntime_c_api.h $BINARY_DIR/$ARTIFACT_NAME/include # copy the README, licence and TPN @@ -34,6 +38,8 @@ cp $SOURCE_DIR/docs/C_API.md $BINARY_DIR/$ARTIFACT_NAME/C_API.md cp $SOURCE_DIR/LICENSE $BINARY_DIR/$ARTIFACT_NAME/LICENSE cp $SOURCE_DIR/ThirdPartyNotices.txt $BINARY_DIR/$ARTIFACT_NAME/ThirdPartyNotices.txt cp $SOURCE_DIR/VERSION_NUMBER $BINARY_DIR/$ARTIFACT_NAME/VERSION_NUMBER + + echo $COMMIT_ID > $BINARY_DIR/$ARTIFACT_NAME/GIT_COMMIT_ID EXIT_CODE=$?