Skip to content

Commit

Permalink
Update build.sh and release.yml
Browse files Browse the repository at this point in the history
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 <hongzhen@linux.alibaba.com>
  • Loading branch information
salvete committed Jul 11, 2024
1 parent f4456e9 commit a5edd93
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/release/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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++"
Expand Down

0 comments on commit a5edd93

Please sign in to comment.