From 5e098d46bbff6dbe359574be79fe9a1595aa353c Mon Sep 17 00:00:00 2001 From: jiangyuanshu <317787106@qq.com> Date: Tue, 3 Mar 2026 13:00:16 +0800 Subject: [PATCH 1/2] test --- .github/workflows/pr-check.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 5944fea45a..858868aeaa 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -139,8 +139,8 @@ jobs: # - name: Build # run: ./gradlew clean build --no-daemon - docker-build-centos8: - name: Build centos8 (JDK 8 / x86_64) + docker-build-rockylinux: + name: Build rockylinux (JDK 8 / x86_64) needs: pr-lint runs-on: ubuntu-latest @@ -169,9 +169,9 @@ jobs: path: | /github/home/.gradle/caches /github/home/.gradle/wrapper - key: ${{ runner.os }}-centos8-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + key: ${{ runner.os }}-rockylinux-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} restore-keys: | - ${{ runner.os }}-centos8-gradle- + ${{ runner.os }}-rockylinux-gradle- - name: Prepare checkstyle config copy run: | @@ -185,10 +185,10 @@ jobs: run: ./gradlew --stop || true - name: Build - #run: ./gradlew clean build --no-daemon --no-build-cache - run: | - ./gradlew clean build -x test --no-daemon --no-build-cache - ./gradlew framework:test --tests org.tron.core.zksnark.ShieldedReceiveTest + run: ./gradlew clean build --no-daemon --no-build-cache + #run: | + # ./gradlew clean build -x test --no-daemon --no-build-cache + # ./gradlew framework:test --tests org.tron.core.zksnark.ShieldedReceiveTest - name: Generate JaCoCo report run: ./gradlew jacocoTestReport --no-daemon --no-build-cache @@ -196,7 +196,7 @@ jobs: - name: Upload JaCoCo artifacts uses: actions/upload-artifact@v4 with: - name: jacoco-centos8 + name: jacoco-rockylinux path: | **/build/reports/jacoco/test/jacocoTestReport.xml **/build/reports/** @@ -249,8 +249,8 @@ jobs: coverage-gate: - name: Coverage Gate (from centos8 build) - needs: docker-build-centos8 + name: Coverage Gate (from rockylinux build) + needs: docker-build-rockylinux runs-on: ubuntu-latest permissions: @@ -264,23 +264,23 @@ jobs: - name: Checkout code (needed by codecov-action for git context) uses: actions/checkout@v4 - - name: Download JaCoCo artifacts (centos8) + - name: Download JaCoCo artifacts (rockylinux) uses: actions/download-artifact@v4 with: - name: jacoco-centos8 - path: artifacts/jacoco-centos8 + name: jacoco-rockylinux + path: artifacts/jacoco-rockylinux - name: List downloaded reports run: | set -eux echo "JaCoCo XML reports found:" - find artifacts/jacoco-centos8 -name jacocoTestReport.xml + find artifacts/jacoco-rockylinux -name jacocoTestReport.xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} - directory: artifacts/jacoco-centos8 + directory: artifacts/jacoco-rockylinux override_commit: ${{ github.event.pull_request.head.sha }} override_branch: ${{ github.event.pull_request.head.ref }} override_pr: ${{ github.event.pull_request.number }} From cc36850673cde8f86f1def1e4e833f7d51d5c2cb Mon Sep 17 00:00:00 2001 From: jiangyuanshu <317787106@qq.com> Date: Tue, 3 Mar 2026 13:59:28 +0800 Subject: [PATCH 2/2] test --- .github/workflows/pr-check.yml | 180 +++++++++++++++++---------------- 1 file changed, 91 insertions(+), 89 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 858868aeaa..5b76470a5f 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -93,51 +93,51 @@ jobs: core.info('PR lint passed.'); } -# build: -# name: Build ${{ matrix.os-name }}(JDK ${{ matrix.java }} / ${{ matrix.arch }}) -# needs: pr-lint -# runs-on: ${{ matrix.runner }} -# strategy: -# fail-fast: false -# matrix: -# include: -# - java: '8' -# runner: ubuntu-latest -# os-name: ubuntu -# arch: x86_64 -# - java: '17' -# runner: ubuntu-24.04-arm -# os-name: ubuntu -# arch: aarch64 -# - java: '8' -# runner: macos-26-intel -# os-name: macos -# arch: x86_64 -# - java: '17' -# runner: macos-latest -# os-name: macos -# arch: aarch64 -# -# steps: -# - uses: actions/checkout@v4 -# -# - name: Set up JDK ${{ matrix.java }} -# uses: actions/setup-java@v4 -# with: -# java-version: ${{ matrix.java }} -# distribution: 'temurin' -# -# - name: Cache Gradle packages -# uses: actions/cache@v4 -# with: -# path: | -# ~/.gradle/caches -# ~/.gradle/wrapper -# key: ${{ runner.os }}-${{ matrix.arch }}-gradle-${{ hashFiles('**/*.gradle', '**/gradle-wrapper.properties') }} -# restore-keys: ${{ runner.os }}-${{ matrix.arch }}-gradle- -# -# - name: Build -# run: ./gradlew clean build --no-daemon + build: + name: Build ${{ matrix.os-name }}(JDK ${{ matrix.java }} / ${{ matrix.arch }}) + needs: pr-lint + runs-on: ${{ matrix.runner }} + strategy: + fail-fast: false + matrix: + include: + - java: '8' + runner: ubuntu-latest + os-name: ubuntu + arch: x86_64 + - java: '17' + runner: ubuntu-24.04-arm + os-name: ubuntu + arch: aarch64 + - java: '8' + runner: macos-26-intel + os-name: macos + arch: x86_64 + - java: '17' + runner: macos-latest + os-name: macos + arch: aarch64 + + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.java }} + distribution: 'temurin' + + - name: Cache Gradle packages + uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-${{ matrix.arch }}-gradle-${{ hashFiles('**/*.gradle', '**/gradle-wrapper.properties') }} + restore-keys: ${{ runner.os }}-${{ matrix.arch }}-gradle- + + - name: Build + run: ./gradlew clean build --no-daemon docker-build-rockylinux: name: Build rockylinux (JDK 8 / x86_64) @@ -149,6 +149,8 @@ jobs: env: GRADLE_USER_HOME: /github/home/.gradle + LANG: en_US.UTF-8 + LC_ALL: en_US.UTF-8 steps: - name: Checkout code @@ -157,7 +159,7 @@ jobs: - name: Install dependencies (Rocky 8 + JDK8) run: | set -euxo pipefail - dnf -y install java-1.8.0-openjdk-devel git wget unzip which jq bc curl + dnf -y install java-1.8.0-openjdk-devel git wget unzip which jq bc curl glibc-langpack-en dnf -y groupinstall "Development Tools" - name: Check Java version @@ -203,49 +205,49 @@ jobs: **/build/test-results/** if-no-files-found: error -# docker-build-debian11: -# name: Build debian11 (JDK 8 / x86_64) -# needs: pr-lint -# runs-on: ubuntu-latest -# -# container: -# image: eclipse-temurin:8-jdk -# -# defaults: -# run: -# shell: bash -# -# env: -# GRADLE_USER_HOME: /github/home/.gradle -# -# steps: -# - name: Checkout code -# uses: actions/checkout@v4 -# -# - name: Install dependencies (Debian + build tools) -# run: | -# set -euxo pipefail -# apt-get update -# apt-get install -y git wget unzip build-essential curl jq -# -# - name: Check Java version -# run: java -version -# -# - name: Cache Gradle -# uses: actions/cache@v4 -# with: -# path: | -# /github/home/.gradle/caches -# /github/home/.gradle/wrapper -# key: ${{ runner.os }}-debian11-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} -# restore-keys: | -# ${{ runner.os }}-debian11-gradle- -# -# - name: Grant execute permission -# run: chmod +x gradlew -# -# - name: Build -# run: ./gradlew clean build --no-daemon + docker-build-debian11: + name: Build debian11 (JDK 8 / x86_64) + needs: pr-lint + runs-on: ubuntu-latest + + container: + image: eclipse-temurin:8-jdk # base image is Debian 11 (Bullseye) + + defaults: + run: + shell: bash + + env: + GRADLE_USER_HOME: /github/home/.gradle + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install dependencies (Debian + build tools) + run: | + set -euxo pipefail + apt-get update + apt-get install -y git wget unzip build-essential curl jq + + - name: Check Java version + run: java -version + + - name: Cache Gradle + uses: actions/cache@v4 + with: + path: | + /github/home/.gradle/caches + /github/home/.gradle/wrapper + key: ${{ runner.os }}-debian11-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-debian11-gradle- + + - name: Grant execute permission + run: chmod +x gradlew + + - name: Build + run: ./gradlew clean build --no-daemon coverage-gate: