From 526418a1ed453a0870fe9314ac2bcfe2ae5c5c22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20Wyszy=C5=84ski?= Date: Sun, 1 Dec 2024 16:07:41 +0100 Subject: [PATCH] ci: sync pkg-config paths in release workflow - Mirror CI workflow changes for pkg-config paths - Add target-specific paths for armv7 and aarch64 - Add descriptive comments for build types --- .github/workflows/release.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8871a7f..8a0736c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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