mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
.gitea/workflows, build: build release binary for keeper
This commit is contained in:
parent
e48242bb69
commit
d8cdbde940
2 changed files with 48 additions and 1 deletions
31
.gitea/workflows/release-keeper-ziren.yml
Normal file
31
.gitea/workflows/release-keeper-ziren.yml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
tags:
|
||||
- "v*"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
keeper-ziren:
|
||||
name: Keeper ZKVM Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.25
|
||||
cache: false
|
||||
|
||||
- name: Install cross toolchain for MIPS
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get -yq --no-install-suggests --no-install-recommends install gcc-mipsel-linux-gnu libc6-dev-mipsel-cross
|
||||
|
||||
- name: Build keeper with ziren tag (mipsle)
|
||||
run: |
|
||||
go run build/ci.go install -static -arch mipsle -os linux -cc mipsel-linux-gnu-gcc -tags ziren -dlgo ./cmd/keeper
|
||||
env:
|
||||
GOMIPS: "softfloat"
|
||||
18
build/ci.go
18
build/ci.go
|
|
@ -183,14 +183,16 @@ func doInstall(cmdline []string) {
|
|||
var (
|
||||
dlgo = flag.Bool("dlgo", false, "Download Go and build with it")
|
||||
arch = flag.String("arch", "", "Architecture to cross build for")
|
||||
goos = flag.String("os", "", "Operating system to cross build for")
|
||||
cc = flag.String("cc", "", "C compiler to cross build with")
|
||||
staticlink = flag.Bool("static", false, "Create statically-linked executable")
|
||||
tags = flag.String("tags", "", "Additional build tags (comma-separated)")
|
||||
)
|
||||
flag.CommandLine.Parse(cmdline)
|
||||
env := build.Env()
|
||||
|
||||
// Configure the toolchain.
|
||||
tc := build.GoToolchain{GOARCH: *arch, CC: *cc}
|
||||
tc := build.GoToolchain{GOARCH: *arch, GOOS: *goos, CC: *cc}
|
||||
if *dlgo {
|
||||
csdb := download.MustLoadChecksums("build/checksums.txt")
|
||||
tc.Root = build.DownloadGo(csdb)
|
||||
|
|
@ -203,6 +205,20 @@ func doInstall(cmdline []string) {
|
|||
buildTags = append(buildTags, "ckzg")
|
||||
}
|
||||
|
||||
// Add custom tags if provided
|
||||
if *tags != "" {
|
||||
// Split by both comma and whitespace
|
||||
customTags := strings.FieldsFunc(*tags, func(r rune) bool {
|
||||
return r == ',' || r == ' ' || r == '\t'
|
||||
})
|
||||
for _, tag := range customTags {
|
||||
tag = strings.TrimSpace(tag)
|
||||
if tag != "" {
|
||||
buildTags = append(buildTags, tag)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Configure the build.
|
||||
gobuild := tc.Go("build", buildFlags(env, *staticlink, buildTags)...)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue