Skip to content

Commit dd13384

Browse files
Copilotschollz
andauthored
Add RISC-V (riscv64) architecture support (#1008)
* Initial plan * Add RISC-V (riscv64) support to croc build and installer Co-authored-by: schollz <[email protected]> * Use GitHub Actions instead of goreleaser for RISC-V builds Co-authored-by: schollz <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: schollz <[email protected]>
1 parent 82cdeb1 commit dd13384

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -ldflags '-extldflags "-static"' -o croc-linux-arm
3737
GOARM=5 CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -ldflags '-extldflags "-static"' -o croc-linux-arm5
3838
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags '-extldflags "-static"' -o croc-linux-arm64
39+
CGO_ENABLED=0 GOOS=linux GOARCH=riscv64 go build -ldflags '-extldflags "-static"' -o croc-linux-riscv64
3940
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags '-s -extldflags "-sectcreate __TEXT __info_plist Info.plist"' -o croc-darwin-amd64
4041
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags '-s -extldflags "-sectcreate __TEXT __info_plist Info.plist"' -o croc-darwin-arm64
4142
CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 go build -ldflags '' -o croc-freebsd-amd64

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ jobs:
8686
name: Linux-ARM64
8787
ext: ""
8888
archive: tar.gz
89+
- goos: linux
90+
goarch: riscv64
91+
name: Linux-RISCV64
92+
ext: ""
93+
archive: tar.gz
8994

9095
# macOS builds
9196
- goos: darwin

src/install/default.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,7 @@ main() {
595595
"armv8l" ) croc_arch="ARM";;
596596
"armv9l" ) croc_arch="ARM";;
597597
"i686" ) croc_arch="32bit";;
598+
"riscv64" ) croc_arch="RISCV64";;
598599
* ) croc_arch="unknown";;
599600
esac
600601

0 commit comments

Comments
 (0)