From c547d8348bc696e91232ab5b66c95f0527f5832e Mon Sep 17 00:00:00 2001 From: userdocs <16525024+userdocs@users.noreply.github.com> Date: Sun, 6 Oct 2024 00:51:36 +0100 Subject: [PATCH] Update zlib-ng-crossbuild.yml --- .github/workflows/zlib-ng-crossbuild.yml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/zlib-ng-crossbuild.yml b/.github/workflows/zlib-ng-crossbuild.yml index a14777a..3381a16 100644 --- a/.github/workflows/zlib-ng-crossbuild.yml +++ b/.github/workflows/zlib-ng-crossbuild.yml @@ -33,7 +33,7 @@ jobs: matrix: name: [zlib-ng] os_id: [debian, ubuntu] - os_codename: [bullseye, bookworm, focal, jammy, mantic] + os_codename: [bullseye, bookworm, focal, jammy, noble] arch: [amd64, armhf, arm64] zlib_compat: ["", "-D ZLIB_COMPAT=ON"] include: @@ -49,7 +49,7 @@ jobs: - os_id: debian os_codename: jammy - os_id: debian - os_codename: mantic + os_codename: noble - os_id: ubuntu os_codename: bullseye - os_id: ubuntu @@ -77,6 +77,23 @@ jobs: - name: Host - upgrade run: sudo apt-get -y upgrade + # No action or other method to bootstrap binfmt-support and qemu-user-static on the host runner + - name: Host - set up qemu-user-static binfmt-support + run: sudo apt install libpipeline1 qemu-user-static binfmt-support + + # Why are we doing it like this and not using a container setup? That's how you're supposed to do it, right? + # qemu-user-static and binfmt-support are not part of the runner images https://github.com/actions/runner-images?tab=readme-ov-file#available-images + # We would need to modify the runner to install these before the container starts. Which you cannot do as there is no way to bootstrap the host. + # So we install them on the host then create/pull a custom docker image that we use to build the multiarch targets. + # We are always on the host runner but can use any docker image we need with the access the qemu emulation when required. + # + # We are using these pre configured toolchain images that allows me to remove 50% of the code/time from this action. + # + # https://github.com/userdocs/dcb/blob/main/Dockerfile + # + # The image does not run as root and has password-less sudo. There are two users username:1000 /home/username and github:1001 /home/github + # In the action it runs as 1001 /home/github and files should be available to the host. For local use, you might need -u 1000 + - name: Host - Create docker multiarch ${{ matrix.arch }} container run: docker run --name multiarch -it -d -u 1001 -v ${{ github.workspace }}:/home/github ghcr.io/userdocs/dcb:${{ matrix.os_id }}-${{ matrix.os_codename }}-${{ matrix.arch }} @@ -192,7 +209,7 @@ jobs: replacesArtifacts: true tag: "${{ env.zlib_ng_version }}" name: "${{ matrix.name }} ${{ env.zlib_ng_version }}" - body: "${{ matrix.name }} built from github master on amd64 arm64 armhf for Debian Bullseye Bookworm and Ubuntu Focal Jammy Mantic" + body: "${{ matrix.name }} built from github master on amd64 arm64 armhf for Debian Bullseye Bookworm and Ubuntu Focal Jammy Noble" allowUpdates: true rerun-on-failure: