From a48385a1e8101ecb1a6849c095efd5fb3ce22f12 Mon Sep 17 00:00:00 2001 From: "Miguel A. Cabrera Minagorri" Date: Wed, 17 Jan 2024 18:12:02 +0100 Subject: [PATCH] fix(workflow): Add check before copying files Signed-off-by: Miguel A. Cabrera Minagorri --- .github/workflows/pipeless-build-and-release.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pipeless-build-and-release.yaml b/.github/workflows/pipeless-build-and-release.yaml index b1d2667..16f79e7 100644 --- a/.github/workflows/pipeless-build-and-release.yaml +++ b/.github/workflows/pipeless-build-and-release.yaml @@ -100,11 +100,16 @@ jobs: - name: Build run: | - cargo build --all --release --manifest-path pipeless/Cargo.toml && - mv pipeless/target/release/pipeless-ai pipeless/target/release/pipeless && - cp pipeless/target/release/libonnxruntime.so pipeless/target/release/libonnxruntime.so.1.16.3 && # This fixes some bugs for macOS - strip pipeless/target/release/pipeless && + cargo build --all --release --manifest-path pipeless/Cargo.toml + mv pipeless/target/release/pipeless-ai pipeless/target/release/pipeless + strip pipeless/target/release/pipeless mkdir pipeless-${{ steps.check_version.outputs.new_version }} + + if [[ ! -e pipeless/target/release/libonnxruntime.so.1.16.3 ]]; then + # The pipeless binary will be linked to libonnxruntime.so.1.16.3 so it must exist + cp pipeless/target/release/libonnxruntime.so pipeless/target/release/libonnxruntime.so.1.16.3 + fi + cp pipeless/target/release/{pipeless,libonnxruntime*} pipeless-${{ steps.check_version.outputs.new_version }}/ tar -czf pipeless-${{ steps.check_version.outputs.new_version }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz pipeless-${{ steps.check_version.outputs.new_version }}