From 0e7b4311a85c399d43a00197b28a9fae76ae0712 Mon Sep 17 00:00:00 2001 From: beat4ocean Date: Tue, 25 Mar 2025 19:53:21 +0800 Subject: [PATCH] [Improvement] update Centos and Mac CI --- .github/workflows/centos-ci.yml | 9 +++++---- .github/workflows/mac-ci.yml | 14 ++++++++++---- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/centos-ci.yml b/.github/workflows/centos-ci.yml index c1b2477e0..d47e2952d 100644 --- a/.github/workflows/centos-ci.yml +++ b/.github/workflows/centos-ci.yml @@ -11,7 +11,7 @@ jobs: build: runs-on: ubuntu-latest container: - image: quay.io/centos/centos:stream8 # 使用 CentOS Stream 8 容器 + image: almalinux:9 # maven >=3.6.3 strategy: matrix: @@ -28,9 +28,10 @@ jobs: - name: Reset DNF repositories run: | - cd /etc/yum.repos.d/ - 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-* + sed -e 's|^mirrorlist=|#mirrorlist=|g' \ + -e 's|^# baseurl=https://repo.almalinux.org|baseurl=https://mirrors.aliyun.com|g' \ + /etc/yum.repos.d/almalinux*.repo + - name: Update DNF package index run: dnf makecache diff --git a/.github/workflows/mac-ci.yml b/.github/workflows/mac-ci.yml index 5c0220f3c..30163a038 100644 --- a/.github/workflows/mac-ci.yml +++ b/.github/workflows/mac-ci.yml @@ -17,21 +17,27 @@ jobs: java-version: [21] # Define the JDK versions to test steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up JDK ${{ matrix.java-version }} - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: java-version: ${{ matrix.java-version }} - distribution: 'adopt' + distribution: 'temurin' - name: Cache Maven packages - uses: actions/cache@v4 + uses: actions/cache@v3 with: path: ~/Library/Caches/Maven # macOS Maven cache path key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 + - name: Install system dependencies + run: | + brew update + brew install cmake + brew install gcc + - name: Build with Maven run: mvn -B package --file pom.xml