From c0edb8ff94b0ca529273ebe057a16a11fe22f1a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20Wyszy=C5=84ski?= Date: Sat, 30 Nov 2024 23:27:01 +0100 Subject: [PATCH] ci: simplify cross-compilation workflow - Remove redundant architecture-specific package installations - Rely on Cross.toml pre-build hooks for dependencies - Keep only pkg-config as common dependency - Remove unnecessary libudev.pc location check The cross-compilation setup is now properly separated between GitHub Actions workflow and Cross.toml configuration. --- .github/workflows/release.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a31173b..0257eb8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,13 +40,14 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install system dependencies - if: matrix.target == 'x86_64-unknown-linux-gnu' + - name: Install common dependencies run: | - sudo apt-get update && \ - sudo apt-get install -y libudev-dev && \ - find /usr -name libudev.pc - + sudo apt-get update + sudo apt-get install -y pkg-config + + - name: Install cross + uses: taiki-e/install-action@cross + - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable with: @@ -63,9 +64,6 @@ jobs: restore-keys: | ${{ runner.os }}-cargo-${{ matrix.target }}- - - name: Install cross - uses: taiki-e/install-action@cross - - name: Install cargo-deb run: cargo install cargo-deb @@ -144,7 +142,7 @@ jobs: mkdir -p pkg cd pkg mv ../modbus-relay.tar.gz . - cp /github/workspace/dist/arch/PKGBUILD . + cp /tmp/modbus-relay/dist/arch/PKGBUILD . CARCH=${{ matrix.arch }} makepkg -s --noconfirm - name: Upload artifacts