Skip to content

Commit

Permalink
ci: sync CI workflow with release configuration
Browse files Browse the repository at this point in the history
- Add pkg-config environment variables for cross-compilation
- Set proper library paths for x86_64 native build
- Install dpkg-dev for x86_64 build
- Rename step for consistency with release workflow
  • Loading branch information
aljen committed Dec 1, 2024
1 parent 5830312 commit 0850106
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,23 @@ jobs:
restore-keys: |
${{ runner.os }}-cross-${{ matrix.target }}-
- name: Install system dependencies
- name: Install target specific dependencies
if: matrix.target == 'x86_64-unknown-linux-gnu'
run: |
sudo apt-get update && \
sudo apt-get install -y libudev-dev
sudo apt-get update
sudo apt-get install -y libudev-dev dpkg-dev
- name: Set library path
if: matrix.target == 'x86_64-unknown-linux-gnu'
run: |
echo "LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LIBRARY_PATH" >> $GITHUB_ENV
- name: Build
env:
PKG_CONFIG_ALLOW_CROSS: "1"
PKG_CONFIG_PATH: "/usr/lib/${{ matrix.target }}/pkgconfig"
PKG_CONFIG_SYSROOT_DIR: "/usr"
run: |
if [ "${{ matrix.target }}" = "x86_64-unknown-linux-gnu" ]; then
cargo build --release --target ${{ matrix.target }}
Expand Down

0 comments on commit 0850106

Please sign in to comment.