Skip to content

Commit

Permalink
ci: fix pkg-config paths for cross targets
Browse files Browse the repository at this point in the history
- Add target-specific pkg-config paths for armv7 and aarch64
- Use correct system paths instead of matrix.target interpolation
- Reuse PKG_PATH variable to avoid duplication
  • Loading branch information
aljen committed Dec 1, 2024
1 parent 70432b1 commit 5aff0ef
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,13 @@ jobs:
cargo build --release --target ${{ matrix.target }}
else
# Cross compilation requires special paths
PKG_CONFIG_PATH="/usr/lib/${{ matrix.target }}/pkgconfig" \
if [ "${{ matrix.target }}" = "armv7-unknown-linux-gnueabihf" ]; then
PKG_PATH="/usr/lib/arm-linux-gnueabihf/pkgconfig"
elif [ "${{ matrix.target }}" = "aarch64-unknown-linux-gnu" ]; then
PKG_PATH="/usr/lib/aarch64-linux-gnu/pkgconfig"
fi
PKG_CONFIG_PATH="$PKG_PATH" \
PKG_CONFIG_SYSROOT_DIR="/usr" \
PKG_CONFIG_LIBDIR="/usr/lib/${{ matrix.target }}/pkgconfig" \
PKG_CONFIG_LIBDIR="$PKG_PATH" \
cross build --release --target ${{ matrix.target }}
fi

0 comments on commit 5aff0ef

Please sign in to comment.