Skip to content

Commit c455d43

Browse files
committed
ci(workflow): esay test
1 parent b6bbf91 commit c455d43

1 file changed

Lines changed: 10 additions & 130 deletions

File tree

‎.github/workflows/pr-build.yml‎

Lines changed: 10 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -8,138 +8,14 @@ on:
88
'.gitattributes', 'docs/**', 'CHANGELOG', '.github/ISSUE_TEMPLATE/**',
99
'.github/PULL_REQUEST_TEMPLATE/**', '.github/CODEOWNERS' ]
1010
workflow_dispatch:
11-
inputs:
12-
job:
13-
description: 'Job to run: all / macos / ubuntu / rockylinux / debian11'
14-
required: false
15-
default: 'all'
1611

1712
concurrency:
1813
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1914
cancel-in-progress: true
2015

2116
jobs:
22-
23-
build-macos:
24-
name: Build macos26 (JDK ${{ matrix.java }} / ${{ matrix.arch }})
25-
if: ${{ github.event_name == 'pull_request' || inputs.job == 'all' || inputs.job == 'macos' }}
26-
runs-on: ${{ matrix.runner }}
27-
timeout-minutes: 60
28-
strategy:
29-
fail-fast: false
30-
matrix:
31-
include:
32-
- java: '8'
33-
runner: macos-26-intel
34-
arch: x86_64
35-
- java: '17'
36-
runner: macos-26
37-
arch: aarch64
38-
39-
steps:
40-
- uses: actions/checkout@v5
41-
42-
- name: Set up JDK ${{ matrix.java }}
43-
uses: actions/setup-java@v5
44-
with:
45-
java-version: ${{ matrix.java }}
46-
distribution: 'temurin'
47-
48-
- name: Cache Gradle packages
49-
uses: actions/cache@v4
50-
with:
51-
path: |
52-
~/.gradle/caches
53-
~/.gradle/wrapper
54-
key: macos26-${{ matrix.arch }}-gradle-${{ hashFiles('**/*.gradle', '**/gradle-wrapper.properties') }}
55-
restore-keys: macos26-${{ matrix.arch }}-gradle-
56-
57-
- name: Build
58-
run: ./gradlew clean build --no-daemon
59-
60-
- name: Test with RocksDB engine
61-
if: matrix.arch == 'x86_64'
62-
run: ./gradlew :framework:testWithRocksDb --no-daemon
63-
64-
build-ubuntu:
65-
name: Build ubuntu24 (JDK 17 / aarch64)
66-
if: ${{ github.event_name == 'pull_request' || inputs.job == 'all' || inputs.job == 'ubuntu' }}
67-
runs-on: ubuntu-24.04-arm
68-
timeout-minutes: 60
69-
70-
steps:
71-
- uses: actions/checkout@v5
72-
73-
- name: Set up JDK 17
74-
uses: actions/setup-java@v5
75-
with:
76-
java-version: '17'
77-
distribution: 'temurin'
78-
79-
- name: Check Java version
80-
run: java -version
81-
82-
- name: Cache Gradle packages
83-
uses: actions/cache@v4
84-
with:
85-
path: |
86-
~/.gradle/caches
87-
~/.gradle/wrapper
88-
key: ubuntu24-aarch64-gradle-${{ hashFiles('**/*.gradle', '**/gradle-wrapper.properties') }}
89-
restore-keys: ubuntu24-aarch64-gradle-
90-
91-
- name: Build
92-
run: ./gradlew clean build --no-daemon
93-
94-
docker-build-rockylinux:
95-
name: Build rockylinux (JDK 8 / x86_64)
96-
if: ${{ github.event_name == 'pull_request' || inputs.job == 'all' || inputs.job == 'rockylinux' }}
97-
runs-on: ubuntu-latest
98-
timeout-minutes: 60
99-
100-
container:
101-
image: rockylinux:8
102-
103-
env:
104-
GRADLE_USER_HOME: /github/home/.gradle
105-
LANG: en_US.UTF-8
106-
LC_ALL: en_US.UTF-8
107-
108-
steps:
109-
- name: Checkout code
110-
uses: actions/checkout@v5
111-
112-
- name: Install dependencies (Rocky 8 + JDK8)
113-
run: |
114-
set -euxo pipefail
115-
dnf -y install java-1.8.0-openjdk-devel git wget unzip which jq bc curl glibc-langpack-en
116-
dnf -y groupinstall "Development Tools"
117-
118-
- name: Check Java version
119-
run: java -version
120-
121-
- name: Cache Gradle
122-
uses: actions/cache@v4
123-
with:
124-
path: |
125-
/github/home/.gradle/caches
126-
/github/home/.gradle/wrapper
127-
key: rockylinux-x86_64-gradle-${{ hashFiles('**/*.gradle', '**/gradle-wrapper.properties') }}
128-
restore-keys: |
129-
rockylinux-x86_64-gradle-
130-
131-
- name: Stop Gradle daemon
132-
run: ./gradlew --stop || true
133-
134-
- name: Build
135-
run: ./gradlew clean build --no-daemon
136-
137-
- name: Test with RocksDB engine
138-
run: ./gradlew :framework:testWithRocksDb --no-daemon
139-
14017
docker-build-debian11:
14118
name: Build debian11 (JDK 8 / x86_64)
142-
if: ${{ github.event_name == 'pull_request' || inputs.job == 'all' || inputs.job == 'debian11' }}
14319
runs-on: ubuntu-latest
14420
timeout-minutes: 60
14521

@@ -176,11 +52,15 @@ jobs:
17652
restore-keys: |
17753
debian11-x86_64-gradle-
17854
179-
- name: Build
180-
run: ./gradlew clean build --no-daemon
55+
- name: Build (no tests)
56+
run: ./gradlew clean assemble --no-daemon
18157

182-
- name: Test with RocksDB engine
183-
run: ./gradlew :framework:testWithRocksDb --no-daemon
58+
- name: Run smoke unit tests
59+
run: |
60+
./gradlew \
61+
:framework:test --tests "org.tron.common.ParameterTest" --tests "org.tron.common.ComparatorTest" \
62+
:plugins:test --tests "org.tron.plugins.utils.ByteArrayTest" \
63+
--no-daemon
18464
18565
- name: Generate module coverage reports
18666
run: |
@@ -232,8 +112,8 @@ jobs:
232112
with:
233113
paths: ${{ steps.collect-xml.outputs.xmls }}
234114
token: ${{ secrets.GITHUB_TOKEN }}
235-
min-coverage-overall: 70
236-
min-coverage-changed-files: 70
115+
min-coverage-overall: 0
116+
min-coverage-changed-files: 0
237117
title: '## Code Coverage Report'
238118
update-comment: true
239119

0 commit comments

Comments
 (0)