From 4cf0fe7fe77caad636a5e07a10c9e732d2f3b963 Mon Sep 17 00:00:00 2001 From: Vitaly Chikunov Date: Tue, 3 Dec 2024 22:50:56 +0300 Subject: [PATCH] CI: Fix and move centos:7 to docker-cross Native GA container cannot handle `centos:7` anymore, and workarounds are ugly. Just use native docker, which we have in cross workflow. (Even though it will not be a cross build. Maybe it will be better renamed do docker build.) To support this `cross.yml` is reworked to run any command instead of getting a simple list of packages from matrix. Fixes: https://github.com/lkrg-org/lkrg/issues/359 Signed-off-by: Vitaly Chikunov --- .github/workflows/builds.yml | 7 ------- .github/workflows/cross.yml | 16 +++++++++++----- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index ff2d7857..c5ce297a 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -4,17 +4,10 @@ on: [push, pull_request] jobs: build: runs-on: ubuntu-22.04 - env: - ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true strategy: fail-fast: false matrix: include: - - image: centos:7 - run: | - sed -i 's,^mirrorlist=,#,; s,^#baseurl=http://mirror\.centos\.org/centos/$releasever,baseurl=https://vault.centos.org/7.9.2009,' /etc/yum.repos.d/CentOS-Base.repo - yum install -y kernel-devel kernel gcc make elfutils-libelf-devel - image: almalinux:8 run: yum install -y kernel-devel kernel gcc make elfutils-libelf-devel - image: rockylinux:8 diff --git a/.github/workflows/cross.yml b/.github/workflows/cross.yml index 73a73c5d..d296ac10 100644 --- a/.github/workflows/cross.yml +++ b/.github/workflows/cross.yml @@ -24,13 +24,20 @@ jobs: include: - image: arm64v8/ubuntu:jammy platform: linux/arm64 - packages: libelf-dev linux-headers-generic + run: apt-get -y update && apt-get install -y git file gcc make libelf-dev linux-headers-generic - image: arm32v7/alt:latest platform: linux/arm/v7 - packages: elfutils kernel-headers-modules-std-def + run: apt-get -y update && apt-get install -y git file gcc make elfutils kernel-headers-modules-std-def - image: i386/ubuntu:bionic platform: linux/386 - packages: libelf-dev linux-headers-generic + run: apt-get -y update && apt-get install -y git file gcc make libelf-dev linux-headers-generic + - image: centos:7 + platform: linux/amd64 + run: | + sed -i -e 's,^mirrorlist=,#,' \ + -e 's,^#baseurl=http://mirror\.centos\.org/centos/\$releasever,baseurl=https://vault.centos.org/7.9.2009,' \ + /etc/yum.repos.d/CentOS-Base.repo && \ + yum install -y git file gcc make kernel-devel kernel elfutils-libelf-devel steps: - uses: docker/setup-qemu-action@v2 - uses: actions/checkout@v3 @@ -38,8 +45,7 @@ jobs: run: | cat <Dockerfile FROM ${{ matrix.image }} - RUN apt-get -y update && \ - apt-get install -y git file gcc make ${{ matrix.packages }} + RUN ${{ matrix.run }} WORKDIR /src COPY . . RUN git clean -dxfq