Skip to content

Commit

Permalink
CI: ubuntu multiarch & musl
Browse files Browse the repository at this point in the history
  • Loading branch information
ahihi committed Aug 2, 2024
1 parent a29b7b3 commit 279d124
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 279d124

Please sign in to comment.