From 3eabe4204842e40b6aefc7a49db9d16e41d22b65 Mon Sep 17 00:00:00 2001 From: Lilith River Date: Tue, 21 Jan 2025 16:10:09 -0700 Subject: [PATCH] fix: update ci.yml to use environment variables for REL_BINARIES_DIR and LIBIMAGEFLOW_STATIC This commit refactors the CI workflow by replacing direct variable references with environment variable syntax in the ci.yml file. This change ensures better compatibility and clarity when checking for the existence of the static library and retrieving GLIBC version requirements. --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b5320f9a..ca9996f79 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -295,20 +295,20 @@ jobs: if: matrix.target == 'x86_64-unknown-linux-gnu' || matrix.target == 'aarch64-unknown-linux-gnu' run: | # list all files in the target directory - ls -l ${REL_BINARIES_DIR} + ls -l "${{ env.REL_BINARIES_DIR }}" # if libimageflow.so does not exist, fail - if [[ ! -f ${REL_BINARIES_DIR}${env.LIBIMAGEFLOW_STATIC} ]]; then - echo "Error: ${REL_BINARIES_DIR}${env.LIBIMAGEFLOW_STATIC} does not exist" + if [[ ! -f "${{ env.REL_BINARIES_DIR }}${{ env.LIBIMAGEFLOW_STATIC }}" ]]; then + echo "Error: ${{ env.REL_BINARIES_DIR }}${{ env.LIBIMAGEFLOW_STATIC }} does not exist" exit 1 fi # Use objdump to find all GLIBC version requirements echo "GLIBC version requirements:" - objdump -T ${REL_BINARIES_DIR}${env.LIBIMAGEFLOW_STATIC} | grep GLIBC_ | sed 's/.*GLIBC_\([0-9.]*\).*/\1/g' | sort -Vu + objdump -T "${{ env.REL_BINARIES_DIR }}${{ env.LIBIMAGEFLOW_STATIC }}" | grep GLIBC_ | sed 's/.*GLIBC_\([0-9.]*\).*/\1/g' | sort -Vu # Find the highest GLIBC version required - HIGHEST_GLIBC=$(objdump -T ${REL_BINARIES_DIR}${env.LIBIMAGEFLOW_STATIC} | grep GLIBC_ | sed 's/.*GLIBC_\([0-9.]*\).*/\1/g' | sort -V | tail -n1) + HIGHEST_GLIBC=$(objdump -T "${{ env.REL_BINARIES_DIR }}${{ env.LIBIMAGEFLOW_STATIC }}" | grep GLIBC_ | sed 's/.*GLIBC_\([0-9.]*\).*/\1/g' | sort -V | tail -n1) echo "Highest GLIBC version required: $HIGHEST_GLIBC" # Fail if version is above 2.17 and this is not a skipped build