forked from apache/dubbo-go
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.16 KB
/
Copy pathriscv-build.yml
File metadata and controls
48 lines (41 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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 ./...