From a5edd9342e1092d5df7bb2d15819323a6c5e5362 Mon Sep 17 00:00:00 2001 From: Hongzhen Luo Date: Thu, 11 Jul 2024 15:53:39 +0800 Subject: [PATCH] Update build.sh and release.yml CentOS 7 has reached EOL (End of Life), thus mirrorlist.centos.org is no longer required. This commit excludes the release of centos_7 on arm64 platform. Signed-off-by: Hongzhen Luo --- .github/workflows/release.yml | 3 +++ .github/workflows/release/build.sh | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 95e7afe4..aea11270 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,9 @@ jobs: matrix: images: [ubuntu_18.04, ubuntu_20.04, ubuntu_22.04, centos_7, centos_8, mcr.microsoft.com/cbl-mariner/base/core_2.0] platforms: [linux/amd64, linux/arm64] + exclude: + - images: centos_7 + platforms: linux/arm64 steps: - name: Set Release Version if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') diff --git a/.github/workflows/release/build.sh b/.github/workflows/release/build.sh index b7be4901..b1548f73 100644 --- a/.github/workflows/release/build.sh +++ b/.github/workflows/release/build.sh @@ -39,9 +39,23 @@ if [[ ${OS} =~ "ubuntu" ]]; then PACKAGE_RELEASE="-DPACKAGE_RELEASE=${RELEASE_NO}.${DISTRO}" elif [[ ${OS} =~ "centos" ]]; then if [[ ${OS} == "centos:7" ]]; then + sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo + sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo + sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo + yum clean all + rm -rf /var/cache/yum + yum -y update + yum install -y centos-release-scl - yum install -y devtoolset-7-gcc-c++ + sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo + sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo + sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo + yum clean all + rm -rf /var/cache/yum + yum -y update + + yum install -y devtoolset-7-gcc-c++ export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" PACKAGE_RELEASE="-DPACKAGE_RELEASE=${RELEASE_NO}.el7" COMPILER="-DCMAKE_C_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/gcc -DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/g++"