From 354d4012531cf22b0a747f441de5f7b63efc9954 Mon Sep 17 00:00:00 2001 From: Ihor Solodrai Date: Thu, 30 Jan 2025 16:34:24 -0800 Subject: [PATCH 1/3] Reorganize list of packages installed on runners Review and clean up the list of packages installed during runner image build: remove duplicates, use common list between main and s390x Dockerfiles. * remove linux-image-generic * replace python3 with python3-minimal. * install LLVM with an official automatic script. * set UBUNTU_VERSION to noble by default This addresses recent build failures: * https://github.com/kernel-patches/runner/actions/runs/13058686735 * https://github.com/kernel-patches/runner/actions/runs/13037837932 Signed-off-by: Ihor Solodrai --- Dockerfile | 26 ++++++++++++++++---------- s390x-native.Dockerfile | 24 ++++++++++++++++-------- 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index ec0be01..ac1b8e1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,23 @@ # hadolint ignore=DL3007 -ARG UBUNTU_VERSION=focal +ARG UBUNTU_VERSION=noble FROM myoung34/github-runner:ubuntu-${UBUNTU_VERSION} # Redefining UBUNTU_VERSION without a value inherits the global default ARG UBUNTU_VERSION LABEL maintainer="sunyucong@gmail.com" -RUN apt-get update \ - && apt-get install -y cmake flex bison build-essential libssl-dev ncurses-dev xz-utils bc rsync libguestfs-tools qemu-kvm qemu-utils linux-image-generic zstd binutils-dev elfutils libcap-dev libelf-dev libdw-dev python3-docutils \ - && apt-get install -y g++ libelf-dev \ - && apt-get install -y iproute2 iputils-ping \ - && apt-get install -y cpu-checker qemu-kvm qemu-utils qemu-system-x86 qemu-system-s390x qemu-system-arm qemu-guest-agent ethtool keyutils iptables gawk \ - && echo "deb https://apt.llvm.org/${UBUNTU_VERSION}/ llvm-toolchain-${UBUNTU_VERSION} main" > /etc/apt/sources.list.d/llvm.list \ - && wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \ - && apt-get update \ - && apt-get install -y clang lld llvm +RUN apt-get update -y && apt-get install -y \ + bc bison build-essential cmake cpu-checker curl dumb-init elfutils ethtool flex g++ gawk git \ + iproute2 iptables iputils-ping jq keyutils libguestfs-tools python3-minimal python3-docutils \ + rsync software-properties-common sudo tree wget xz-utils zstd + +RUN apt-get update -y && apt-get install -y \ + binutils-dev libcap-dev libdw-dev libelf-dev libssl-dev ncurses-dev + +RUN apt-get update -y && apt-get install -y \ + qemu-guest-agent qemu-kvm qemu-system-arm qemu-system-s390x qemu-system-x86 qemu-utils + +# Install LLVM with automatic script (https://apt.llvm.org) +RUN bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" + +RUN apt-get clean diff --git a/s390x-native.Dockerfile b/s390x-native.Dockerfile index a6d5678..188e712 100644 --- a/s390x-native.Dockerfile +++ b/s390x-native.Dockerfile @@ -3,15 +3,23 @@ ARG UBUNTU_VERSION=noble FROM --platform=linux/s390x ubuntu:${UBUNTU_VERSION} ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get -y install \ - bc bison cmake cpu-checker curl dumb-init ethtool flex gawk git \ - iproute2 iptables iputils-ping jq keyutils linux-image-generic \ - python3 rsync software-properties-common sudo tree wget zstd -RUN apt-get -y install \ - qemu-guest-agent qemu-kvm qemu-utils \ - qemu-system-arm qemu-system-s390x qemu-system-x86 -RUN apt-get install -y \ +RUN apt-get update -y && apt-get install -y \ + bc bison build-essential cmake cpu-checker curl dumb-init elfutils ethtool flex g++ gawk git \ + iproute2 iptables iputils-ping jq keyutils libguestfs-tools python3-minimal python3-docutils \ + rsync software-properties-common sudo tree wget xz-utils zstd + +RUN apt-get update -y && apt-get install -y \ + binutils-dev libcap-dev libdw-dev libelf-dev libssl-dev ncurses-dev + +RUN apt-get update -y && apt-get install -y \ + qemu-guest-agent qemu-kvm qemu-system-arm qemu-system-s390x qemu-system-x86 qemu-utils + +# Install LLVM with automatic script (https://apt.llvm.org) +RUN bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" + +RUN apt-get update -y && apt-get install -y \ aspnetcore-runtime-8.0 + RUN apt-get clean ARG version=2.321.0 From 57c403e69aea1f804b570eac32879c02629731b0 Mon Sep 17 00:00:00 2001 From: Ihor Solodrai Date: Thu, 30 Jan 2025 14:21:37 -0800 Subject: [PATCH 2/3] Bump versions of dependent actions Add theihor (Ihor Solodrai) to reviewers in version_bump workflow. Signed-off-by: Ihor Solodrai --- .github/workflows/publish.yml | 8 ++++---- .github/workflows/version_bump.yml | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c120aed..948f0ed 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -54,7 +54,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 # Install the cosign tool except on PR # https://github.com/sigstore/cosign-installer @@ -66,16 +66,16 @@ jobs: run: cosign version - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Setup Docker buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 # Login against a Docker registry except on PR # https://github.com/docker/login-action - name: Log into registry ${{ env.REGISTRY }} if: github.event_name != 'pull_request' - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} diff --git a/.github/workflows/version_bump.yml b/.github/workflows/version_bump.yml index d485249..05a4142 100644 --- a/.github/workflows/version_bump.yml +++ b/.github/workflows/version_bump.yml @@ -20,7 +20,7 @@ jobs: pull-requests: write steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Get latest runner release id: release @@ -38,11 +38,11 @@ jobs: run: sed -i 's#^ARG version=.*#ARG version=${{ steps.release.outputs.ACTIONS_VERSION}}#' s390x.Dockerfile - name: Create Pull Request - uses: peter-evans/create-pull-request@v4 + uses: peter-evans/create-pull-request@v7 with: title: "[automated] Bumping s390x containers to action-runners v${{ steps.release.outputs.ACTIONS_VERSION}}" commit-message: "[automated] Bumping s390x containers to action-runners v${{ steps.release.outputs.ACTIONS_VERSION}}" branch: "version-bump/${{ steps.release.outputs.ACTIONS_VERSION}}" delete-branch: true body: "" - reviewers: anakryiko, chantra, danielocfb, yurinnick + reviewers: anakryiko, chantra, danielocfb, yurinnick, theihor From 2fe66e97c7d0fd167db10f26648a2f53aad81fa1 Mon Sep 17 00:00:00 2001 From: Ihor Solodrai Date: Thu, 30 Jan 2025 17:14:08 -0800 Subject: [PATCH 3/3] publish: explicitly use qemu 8 See: https://github.com/docker/setup-qemu-action/issues/188#issuecomment-2604322104 Signed-off-by: Ihor Solodrai --- .github/workflows/publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 948f0ed..ab71796 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -67,6 +67,8 @@ jobs: - name: Set up QEMU uses: docker/setup-qemu-action@v3 + with: + image: tonistiigi/binfmt:qemu-v8.1.5 - name: Setup Docker buildx uses: docker/setup-buildx-action@v3