Skip to content

Commit

Permalink
Merge pull request #39 from smuzaffar/master
Browse files Browse the repository at this point in the history
Add binary build for RiscV64 architecture
  • Loading branch information
vkuznet authored Jul 25, 2024
2 parents 5059eda + 3be7a14 commit 3294c75
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,17 @@ jobs:
asset_name: dasgoclient_aarch64
asset_content_type: application/octet-stream

- name: Upload RISCV64 binary
id: upload-dasgoclient_riscv64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dasgoclient_riscv64
asset_name: dasgoclient_riscv64
asset_content_type: application/octet-stream

- name: Upload OSX/macOS binary
id: upload-dasgoclient_osx
uses: actions/upload-release-asset@v1
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ build:
go clean; rm -rf pkg dasgoclient*; CGO_ENABLED=0 go build ${flags}
sed -i -e "s,$(TAG),{{VERSION}},g" main.go

build_all: build_osx build_osx_arm64 build_linux build_power8 build_arm64 build_windows
build_all: build_osx build_osx_arm64 build_linux build_power8 build_arm64 build_riscv64 build_windows

build_osx:
sed -i -e "s,{{VERSION}},$(TAG),g" main.go
Expand Down Expand Up @@ -47,6 +47,12 @@ build_arm64:
sed -i -e "s,$(TAG),{{VERSION}},g" main.go
mv dasgoclient dasgoclient_aarch64

build_riscv64:
sed -i -e "s,{{VERSION}},$(TAG),g" main.go
go clean; rm -rf pkg dasgoclient_riscv64; GOARCH=riscv64 GOOS=linux CGO_ENABLED=0 go build ${flags}
sed -i -e "s,$(TAG),{{VERSION}},g" main.go
mv dasgoclient dasgoclient_riscv64

build_windows:
go clean; rm -rf pkg dasgoclient.exe; GOARCH=amd64 GOOS=windows CGO_ENABLED=0 go build ${flags}

Expand Down

0 comments on commit 3294c75

Please sign in to comment.