From 76d179c64f54c75ef54a4113f3d2dc7bd0b54abe Mon Sep 17 00:00:00 2001 From: "debing.sun" Date: Tue, 2 Jul 2024 21:53:32 +0800 Subject: [PATCH] Update CentOS7 repo URL for EOL and macOS11 GitHub Action for deprecation (#13365) 1. Update macOS version in GitHub Actions due to deprecation of macOS 11 Because the macOS 11 runner image will be removed by 06/28/2024. 2. CentOS has arrived at EOL, we need to update the yum repo to new url. --- .github/workflows/ci.yml | 4 ++++ .github/workflows/daily.yml | 26 +++++++++++++++++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3778d03262..c7206ec80f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,6 +77,10 @@ jobs: container: centos:7 steps: - uses: actions/checkout@v3 + - name: fix centos7 EOL + run: | + sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* + sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* - name: make run: | yum -y install gcc make diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 8e382ec80a..d16dc2a7ec 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -676,6 +676,10 @@ jobs: with: repository: ${{ env.GITHUB_REPOSITORY }} ref: ${{ env.GITHUB_HEAD_REF }} + - name: fix centos7 EOL + run: | + sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* + sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* - name: make run: | yum -y install gcc make @@ -716,9 +720,17 @@ jobs: with: repository: ${{ env.GITHUB_REPOSITORY }} ref: ${{ env.GITHUB_HEAD_REF }} + - name: fix centos7 EOL + run: | + sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* + sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* + yum -y install centos-release-scl epel-release + yum clean all + rm -rf /var/cache/yum/* + sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-SCLo*.repo + sed -i -r 's|# ?baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-SCLo*.repo - name: make run: | - yum -y install centos-release-scl epel-release yum -y install devtoolset-7 openssl-devel openssl scl enable devtoolset-7 "make BUILD_TLS=module REDIS_CFLAGS='-Werror'" - name: testprep @@ -763,9 +775,17 @@ jobs: with: repository: ${{ env.GITHUB_REPOSITORY }} ref: ${{ env.GITHUB_HEAD_REF }} + - name: fix centos7 EOL + run: | + sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* + sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* + yum -y install centos-release-scl epel-release + yum clean all + rm -rf /var/cache/yum/* + sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-SCLo*.repo + sed -i -r 's|# ?baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-SCLo*.repo - name: make run: | - yum -y install centos-release-scl epel-release yum -y install devtoolset-7 openssl-devel openssl scl enable devtoolset-7 "make BUILD_TLS=module REDIS_CFLAGS='-Werror'" - name: testprep @@ -873,7 +893,7 @@ jobs: build-macos: strategy: matrix: - os: [macos-11, macos-13] + os: [macos-12, macos-14] runs-on: ${{ matrix.os }} if: | (github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&