Skip to content

Commit

Permalink
ci: sync pkg-config paths in release workflow
Browse files Browse the repository at this point in the history
- Mirror CI workflow changes for pkg-config paths
- Add target-specific paths for armv7 and aarch64
- Add descriptive comments for build types
  • Loading branch information
aljen committed Dec 1, 2024
1 parent 5aff0ef commit 526418a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,20 @@ jobs:
- name: Build
env:
PKG_CONFIG_ALLOW_CROSS: "1"
PKG_CONFIG_PATH: "/usr/lib/${{ matrix.target }}/pkgconfig"
PKG_CONFIG_SYSROOT_DIR: "/usr"
PKG_CONFIG_LIBDIR: "/usr/lib/${{ matrix.target }}/pkgconfig"
run: |
if [ "${{ matrix.target }}" = "x86_64-unknown-linux-gnu" ]; then
# Native build uses standard system paths
cargo build --release --target ${{ matrix.target }}
else
# Cross compilation requires special paths
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="$PKG_PATH" \
cross build --release --target ${{ matrix.target }}
fi
Expand Down

0 comments on commit 526418a

Please sign in to comment.