Fix some CI workflow failures

This commit is contained in:
Alejandro González 2023-07-10 22:55:49 +02:00 committed by Josh Holmer
parent 0a17367857
commit b22b5b24e0

View file

@ -55,29 +55,30 @@ jobs:
persist-credentials: false persist-credentials: false
- name: Set up Ubuntu multiarch - name: Set up Ubuntu multiarch
if: matrix.target-apt-arch != 'amd64' if: startsWith(matrix.os, 'ubuntu') && matrix.target-apt-arch != 'amd64'
run: | run: |
. /etc/os-release . /etc/os-release
dpkg --add-architecture "${{ matrix.target-apt-arch }}" sudo dpkg --add-architecture "${{ matrix.target-apt-arch }}"
sed -i "s/^deb http/deb [arch=$(dpkg-architecture -q DEB_HOST_ARCH)] http/" /etc/apt/sources.list sudo sed -i "s/^deb http/deb [arch=$(dpkg-architecture -q DEB_HOST_ARCH)] http/" /etc/apt/sources.list
for suite in '' '-updates' '-backports' '-security'; do for suite in '' '-updates' '-backports' '-security'; do
echo "deb [arch=${{ matrix.target-apt-arch }}] http://ports.ubuntu.com/ $DISTRIB_CODENAME$suite main universe multiverse" >> /etc/apt/sources.list echo "deb [arch=${{ matrix.target-apt-arch }}] http://ports.ubuntu.com/ $DISTRIB_CODENAME$suite main universe multiverse" | \
sudo tee -a /etc/apt/sources.list >/dev/null
done done
- name: Install musl development files - name: Install musl development files
if: endsWith(matrix.target, '-musl') if: endsWith(matrix.target, '-musl')
run: | run: |
apt-get -yq update sudo apt-get -yq update
apt-get -yq install musl-dev:${{ matrix.target-apt-arch }} sudo apt-get -yq install musl-dev:${{ matrix.target-apt-arch }}
- name: Install QEMU and AArch64 cross compiler - name: Install QEMU and AArch64 cross compiler
if: startsWith(matrix.target, 'aarch64-unknown-linux') if: startsWith(matrix.target, 'aarch64-unknown-linux')
run: | run: |
apt-get -yq update sudo apt-get -yq update
# libc6 must be present to run executables dynamically linked # libc6 must be present to run executables dynamically linked
# against glibc for the target architecture # against glibc for the target architecture
apt-get -yq install qemu-user gcc-aarch64-linux-gnu libc6:arm64 sudo apt-get -yq install qemu-user gcc-aarch64-linux-gnu libc6:arm64
- name: Cache Cargo artifacts - name: Cache Cargo artifacts
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2