From 3be7a14029f90078ee83cb228eb6f8acfed6a18d Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Thu, 25 Jul 2024 12:57:37 +0200 Subject: [PATCH] Add binary build for RiscV64 architecture --- .github/workflows/build.yml | 11 +++++++++++ Makefile | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2c90fb0..861f644 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/Makefile b/Makefile index 1430b06..2e1f23b 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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}