From 8086867055d101d602d8cfa80717714b8ab6fe29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Gonz=C3=A1lez?= Date: Sun, 21 Apr 2024 20:18:12 +0200 Subject: [PATCH] Do not install unnecessary cross-compilation toolchain for `cargo deb` --- .github/workflows/deploy.yml | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 534474fb..c1dfd28d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -76,25 +76,14 @@ jobs: tar -vczf "${ARCHIVE_NAME}.tar.gz" "$ARCHIVE_NAME"/*;; esac - - name: Set up Ubuntu multiarch - if: matrix.target == 'aarch64-unknown-linux-gnu' - run: | - readonly DISTRO_CODENAME=jammy - sudo dpkg --add-architecture arm64 - sudo sed -i "s/^deb http/deb [arch=$(dpkg-architecture -q DEB_HOST_ARCH)] http/" /etc/apt/sources.list - sudo sed -i "s/^deb mirror/deb [arch=$(dpkg-architecture -q DEB_HOST_ARCH)] mirror/" /etc/apt/sources.list - for suite in '' '-updates' '-backports' '-security'; do - echo "deb [arch=arm64] http://ports.ubuntu.com/ $DISTRO_CODENAME$suite main universe multiverse" | \ - sudo tee -a /etc/apt/sources.list >/dev/null - done - - name: Install QEMU and AArch64 cross compiler if: matrix.target == 'aarch64-unknown-linux-gnu' run: | sudo apt-get -yq update - # libc6 must be present to run executables dynamically linked - # against glibc for the target architecture - sudo apt-get -yq install qemu-user gcc-aarch64-linux-gnu libc6:arm64 + # The shared libc AArch64 libraries are needed for cargo deb below + # to be able to infer package requirements with dpkg-shlibdeps + # properly + sudo apt-get -yq install libc6-arm64-cross libgcc-s1-arm64-cross - name: Build deb archives if: endsWith(matrix.target, '-linux-gnu')