diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 76f4056..498f32f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,6 +58,25 @@ jobs: - name: checkout uses: actions/checkout@v4 + - name: set up Ubuntu multiarch + if: startsWith(matrix.os, 'ubuntu') && matrix.target-apt-arch != 'amd64' + run: | + readonly DISTRO_CODENAME=$(lsb_release -c | sed -E 's/Codename:\s*//') + sudo dpkg --add-architecture "${{ matrix.target-apt-arch }}" + 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=${{ matrix.target-apt-arch }}] http://ports.ubuntu.com/ $DISTRO_CODENAME$suite main universe multiverse" | \ + sudo tee -a /etc/apt/sources.list >/dev/null + done + + - name: cache musl development files + if: endsWith(matrix.target, '-musl') + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: musl-tools musl-dev:${{ matrix.target-apt-arch }} + version: 1.0 + - name: cache apt packages if: startsWith(matrix.os, 'ubuntu') uses: awalsh128/cache-apt-pkgs-action@latest