Skip to content

Commit

Permalink
fix: update ci.yml to use environment variables for REL_BINARIES_DIR …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
lilith committed Jan 21, 2025
1 parent 88bebb7 commit 3eabe42
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3eabe42

Please sign in to comment.