This is an automated email from the ASF dual-hosted git repository.
AlexStocks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git
The following commit(s) were added to refs/heads/develop by this push:
new ca069ff62 chore(CI-riscv): Add CI for RISC-V build (#3470)
ca069ff62 is described below
commit ca069ff629a5d4ef3688138f1c6baeb61e36c860
Author: Xuetao Li <[email protected]>
AuthorDate: Sat Jul 11 07:51:35 2026 +0000
chore(CI-riscv): Add CI for RISC-V build (#3470)
* add risc-v build ci
* update
* update
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI
<[email protected]>
* add tab
* delete space
---------
Co-authored-by: Copilot Autofix powered by AI
<[email protected]>
---
.github/release-drafter.yml | 44 +++++----
.github/workflows/codeql-analysis.yml | 74 ++++++++--------
.github/workflows/github-actions.yml | 162 ++++++++++++++++------------------
.github/workflows/release-drafter.yml | 7 +-
.github/workflows/riscv-build.yml | 48 ++++++++++
Makefile | 2 +-
6 files changed, 182 insertions(+), 155 deletions(-)
diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml
index 67042f512..a3625241f 100644
--- a/.github/release-drafter.yml
+++ b/.github/release-drafter.yml
@@ -2,39 +2,37 @@ name-template: '$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
categories:
- title: 'โ Breaking Changes:'
- labels:
- - 'โ Breaking Change'
+ semver-increment: major
+ when:
+ labels:
+ - 'โ Breaking Change'
- title: '๐ New Features:'
- labels:
- - 'โ๏ธ Feature'
+ semver-increment: minor
+ when:
+ labels:
+ - 'โ๏ธ Feature'
- title: '๐ Fixes:'
- labels:
- - 'โข๏ธ Bug'
+ semver-increment: patch
+ when:
+ labels:
+ - 'โข๏ธ Bug'
- title: '๐ Documentation:'
- labels:
- - '๐ Documentation'
+ semver-increment: patch
+ when:
+ labels:
+ - '๐ Documentation'
- title: '๐งน Updates:'
- labels:
- - '๐งน Updates'
- - '๐ค Dependencies'
+ semver-increment: patch
+ when:
+ labels:
+ - '๐งน Updates'
+ - '๐ค Dependencies'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&'
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
- major:
- labels:
- - 'โ Breaking Change'
- minor:
- labels:
- - 'โ๏ธ Feature'
- patch:
- labels:
- - '๐ Documentation'
- - 'โข๏ธ Bug'
- - '๐ค Dependencies'
- - '๐งน Updates'
default: patch
template: |
$CHANGES
diff --git a/.github/workflows/codeql-analysis.yml
b/.github/workflows/codeql-analysis.yml
index 27d8a156c..4c1d2e9ab 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -20,40 +20,40 @@ jobs:
runs-on: ubuntu-latest
steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- with:
- # We must fetch at least the immediate parents so that if this is
- # a pull request then we can checkout the head.
- fetch-depth: 2
-
- # If this run was triggered by a pull request event, then checkout
- # the head of the pull request instead of the merge commit.
- - run: git checkout HEAD^2
- if: ${{ github.event_name == 'pull_request' }}
-
- # Initializes the CodeQL tools for scanning.
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v3
- # Override language selection by uncommenting this and choosing your
languages
- # with:
- # languages: go, javascript, csharp, python, cpp, java
-
- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
- # If this step fails, then you should remove it and run the build manually
(see below)
- - name: Autobuild
- uses: github/codeql-action/autobuild@v3
-
- # โน๏ธ Command-line programs to run using the OS shell.
- # ๐ https://git.io/JvXDl
-
- # โ๏ธ If the Autobuild fails above, remove it and uncomment the following
three lines
- # and modify them (or add more) to build your code if your project
- # uses a compiled language
-
- #- run: |
- # make bootstrap
- # make release
-
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v3
+ - name: Checkout repository
+ uses: actions/checkout@v7
+ with:
+ # We must fetch at least the immediate parents so that if this is
+ # a pull request then we can checkout the head.
+ fetch-depth: 2
+
+ # If this run was triggered by a pull request event, then checkout
+ # the head of the pull request instead of the merge commit.
+ - run: git checkout HEAD^2
+ if: ${{ github.event_name == 'pull_request' }}
+
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v3
+ # Override language selection by uncommenting this and choosing your
languages
+ # with:
+ # languages: go, javascript, csharp, python, cpp, java
+
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or
Java).
+ # If this step fails, then you should remove it and run the build
manually (see below)
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v3
+
+ # โน๏ธ Command-line programs to run using the OS shell.
+ # ๐ https://git.io/JvXDl
+
+ # โ๏ธ If the Autobuild fails above, remove it and uncomment the following
three lines
+ # and modify them (or add more) to build your code if your project
+ # uses a compiled language
+
+ #- run: |
+ # make bootstrap
+ # make release
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v3
diff --git a/.github/workflows/github-actions.yml
b/.github/workflows/github-actions.yml
index 398255130..a8de57c2b 100644
--- a/.github/workflows/github-actions.yml
+++ b/.github/workflows/github-actions.yml
@@ -17,7 +17,7 @@ jobs:
name: Check License Header
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v7
- name: Check License Header
uses: apache/skywalking-eyes/header@main #NOSONAR
@@ -28,96 +28,82 @@ jobs:
mode: check
CI:
- name: CI (${{ matrix.os }} - Go ${{ matrix.go_version }})
- runs-on: ${{ matrix.os }}
- strategy:
- # If you want to matrix build , you can append the following list.
- matrix:
- go_version:
- - '1.23'
- os:
- - ubuntu-latest
+ name: CI
+ runs-on: ubuntu-latest
steps:
- - name: Setup Go ${{ matrix.go_version }}
- uses: actions/setup-go@v5
- with:
- go-version: ${{ matrix.go_version }}
-
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Cache dependencies
- # ref: https://github.com/actions/cache/blob/main/examples.md#go---module
- uses: actions/cache@v4
- with:
- # Cache, works only on Linux
- path: |
- ~/.cache/go-build
- ~/go/pkg/mod
- # Cache key
- key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- # An ordered list of keys to use for restoring the cache if no cache
hit occurred for key
- restore-keys: |
- ${{ runner.os }}-go-
-
- - name: Check Code Format
- run: make check-fmt
-
- - name: Unit Test
- run: make test
-
- - name: Lint
- run: make lint
-
- - name: Codecov
- uses: codecov/codecov-action@v7 #NOSONAR
- with:
- fail_ci_if_error: true # optional (default = false)
- token: ${{ secrets.CODECOV_TOKEN }}
- verbose: true # optional (default = false)
+ - name: Checkout
+ uses: actions/checkout@v7
+
+ - name: Setup Go
+ uses: actions/setup-go@v6
+ with:
+ go-version-file: go.mod
+
+ - name: Cache dependencies
+ # ref:
https://github.com/actions/cache/blob/main/examples.md#go---module
+ uses: actions/cache@v6
+ with:
+ # Cache, works only on Linux
+ path: |
+ ~/.cache/go-build
+ ~/go/pkg/mod
+ # Cache key
+ key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
+ # An ordered list of keys to use for restoring the cache if no cache
hit occurred for key
+ restore-keys: |
+ ${{ runner.os }}-go-
+
+ - name: Check Code Format
+ run: make check-fmt
+
+ - name: Unit Test
+ run: make test
+
+ - name: Lint
+ run: make lint
+
+ - name: Codecov
+ uses: codecov/codecov-action@v7 #NOSONAR
+ with:
+ fail_ci_if_error: true # optional (default = false)
+ token: ${{ secrets.CODECOV_TOKEN }}
+ verbose: true # optional (default = false)
Integration-Test:
- name: Integration Test (${{ matrix.os }} - Go ${{ matrix.go_version }})
- runs-on: ${{ matrix.os }}
- strategy:
- # If you want to matrix build , you can append the following list.
- matrix:
- go_version:
- - '1.23'
- os:
- - ubuntu-latest
+ name: Integration Test
+ runs-on: ubuntu-latest
steps:
- - name: Setup Go ${{ matrix.go_version }}
- uses: actions/setup-go@v5
- with:
- go-version: ${{ matrix.go_version }}
-
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Cache dependencies
- # ref: https://github.com/actions/cache/blob/main/examples.md#go---module
- uses: actions/cache@v4
- with:
- # Cache, works only on Linux
- path: |
- ~/.cache/go-build
- ~/go/pkg/mod
- # Cache key
- key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- # An ordered list of keys to use for restoring the cache if no cache
hit occurred for key
- restore-keys: |
- ${{ runner.os }}-go-
-
- - name: Integration Test
- run: |
- if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
- ./integrate_test.sh
${{github.event.pull_request.head.repo.full_name}}
${{github.event.pull_request.head.sha}} main
- elif [ "$GITHUB_EVENT_NAME" == "push" ]; then
- ./integrate_test.sh $GITHUB_REPOSITORY $GITHUB_SHA $GITHUB_REF_NAME
- else
- echo "$GITHUB_EVENT_NAME is an unsupported event type."
- exit 1
- fi
+ - name: Checkout
+ uses: actions/checkout@v7
+
+ - name: Setup Go
+ uses: actions/setup-go@v6
+ with:
+ go-version-file: go.mod
+
+ - name: Cache dependencies
+ # ref:
https://github.com/actions/cache/blob/main/examples.md#go---module
+ uses: actions/cache@v6
+ with:
+ # Cache, works only on Linux
+ path: |
+ ~/.cache/go-build
+ ~/go/pkg/mod
+ # Cache key
+ key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
+ # An ordered list of keys to use for restoring the cache if no cache
hit occurred for key
+ restore-keys: |
+ ${{ runner.os }}-go-
+
+ - name: Integration Test
+ run: |
+ if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
+ ./integrate_test.sh
${{github.event.pull_request.head.repo.full_name}}
${{github.event.pull_request.head.sha}} main
+ elif [ "$GITHUB_EVENT_NAME" == "push" ]; then
+ ./integrate_test.sh $GITHUB_REPOSITORY $GITHUB_SHA
$GITHUB_REF_NAME
+ else
+ echo "$GITHUB_EVENT_NAME is an unsupported event type."
+ exit 1
+ fi
diff --git a/.github/workflows/release-drafter.yml
b/.github/workflows/release-drafter.yml
index ac9263f54..42b2817a8 100644
--- a/.github/workflows/release-drafter.yml
+++ b/.github/workflows/release-drafter.yml
@@ -5,11 +5,6 @@ on:
branches:
- main
- develop
-
- pull_request:
- types: [opened, reopened, synchronize]
-
-
permissions:
contents: read
@@ -20,6 +15,6 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- - uses: release-drafter/release-drafter@v6 #NOSONAR
+ - uses: release-drafter/release-drafter@v7 #NOSONAR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/riscv-build.yml
b/.github/workflows/riscv-build.yml
new file mode 100644
index 000000000..27df86b46
--- /dev/null
+++ b/.github/workflows/riscv-build.yml
@@ -0,0 +1,48 @@
+name: RISC-V Build
+
+on:
+ push:
+ branches:
+ - main
+ - 'release-*'
+ - 'feature-*'
+ pull_request:
+ branches:
+ - '*'
+
+permissions:
+ contents: read
+
+jobs:
+ RISC-V-Build:
+ name: RISC-V Build (linux/riscv64)
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v7
+
+ - name: Setup Go
+ uses: actions/setup-go@v6
+ with:
+ go-version-file: go.mod
+
+ - name: Cache dependencies
+ # ref:
https://github.com/actions/cache/blob/main/examples.md#go---module
+ uses: actions/cache@v6
+ with:
+ # Cache, works only on Linux
+ path: |
+ ~/.cache/go-build
+ ~/go/pkg/mod
+ # Cache key
+ key: ${{ runner.os }}-riscv64-go-${{ hashFiles('**/go.sum') }}
+ # An ordered list of keys to use for restoring the cache if no cache
hit occurred for key
+ restore-keys: |
+ ${{ runner.os }}-riscv64-go-
+
+ - name: Build for linux/riscv64
+ run: |
+ GOOS=linux GOARCH=riscv64 CGO_ENABLED=0 go build ./...
+ cd tools/dubbogo-cli
+ GOOS=linux GOARCH=riscv64 CGO_ENABLED=0 go build ./...
diff --git a/Makefile b/Makefile
index e7e13d67c..3d517e31b 100644
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,7 @@ test: clean
fmt: install-imports-formatter
# replace interface{} with any
- go run
golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest
-any=true -fix -test ./...
+ go run
golang.org/x/tools/gopls/internal/analysis/modernize/cmd/[email protected]
-any=true -fix -test ./...
go fmt ./... && GOROOT=$(shell go env GOROOT) imports-formatter
cd $(CLI_DIR) && go fmt ./...