Skip to content

fix: restore go.sum for generated CLI projects (#3589) #1

fix: restore go.sum for generated CLI projects (#3589)

fix: restore go.sum for generated CLI projects (#3589) #1

Workflow file for this run

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 ./...