Skip to content

Commit

Permalink
CI: Fix and move centos:7 to docker-cross
Browse files Browse the repository at this point in the history
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: #359
Signed-off-by: Vitaly Chikunov <[email protected]>
  • Loading branch information
vt-alt committed Dec 3, 2024
1 parent eb3126c commit 4cf0fe7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,28 @@ 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
- name: Create Dockerfile
run: |
cat <<EOF >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
Expand Down

0 comments on commit 4cf0fe7

Please sign in to comment.