Skip to content

Commit

Permalink
Merge pull request #65 from quorumcontrol/feature/arm-linux-binaries
Browse files Browse the repository at this point in the history
Build & release arm Linux binaries
  • Loading branch information
cap10morgan authored Apr 9, 2020
2 parents 9ae0bb8 + 9f758c9 commit f795266
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 3 deletions.
44 changes: 43 additions & 1 deletion .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,46 @@ jobs:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./dgit.tar.gz
asset_name: dgit-${{ runner.os }}-x86_64.tar.gz
asset_content_type: application/x-gtar
asset_content_type: application/x-gtar
release-linux-arm:
runs-on: ubuntu-18.04
steps:
- name: checkout code
uses: actions/checkout@v2
- name: setup Go
uses: actions/setup-go@v2-beta
with:
go-version: '^1.14.0'
- name: compile & make tarballs
run: make tarball-linux-arm
- name: upload armv6 release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./dist/armv6/dgit.tar.gz
asset_name: dgit-Linux-armv6.tar.gz
asset_content_type: application/x-gtar
- name: upload armv7 release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./dist/armv7/dgit.tar.gz
asset_name: dgit-Linux-armv7.tar.gz
asset_content_type: application/x-gtar
- name: upload arm64v8 release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./dist/arm64v8/dgit.tar.gz
asset_name: dgit-Linux-arm64v8.tar.gz
asset_content_type: application/x-gtar




3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ decentragit-remote
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
vendor/

dist/
20 changes: 19 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ dgit: go.mod go.sum $(gosources)

build: dgit

dist/armv%/dgit: go.mod go.sum $(gosources)
mkdir -p $(@D)
env GOOS=linux GOARCH=arm GOARM=$* go build -o $@

dist/arm64v%/dgit: go.mod go.sum $(gosources)
mkdir -p $(@D)
env GOOS=linux GOARCH=arm64 go build -o $@

build-linux-arm: dist/armv6/dgit dist/armv7/dgit dist/arm64v8/dgit

$(FIRSTGOPATH)/bin/dgit: dgit
cp dgit $(FIRSTGOPATH)/bin/

Expand All @@ -25,8 +35,16 @@ $(FIRSTGOPATH)/bin/git-remote-dgit:
dgit.tar.gz: dgit git-remote-dgit
tar -czvf dgit.tar.gz dgit git-remote-dgit

dist/armv%/dgit.tar.gz: dist/armv%/dgit git-remote-dgit
tar -czvf $@ $^

dist/arm64v%/dgit.tar.gz: dist/arm64v%/dgit git-remote-dgit
tar -czvf $@ $^

tarball: dgit.tar.gz

tarball-linux-arm: dist/armv6/dgit.tar.gz dist/armv7/dgit.tar.gz dist/arm64v8/dgit.tar.gz

install: $(FIRSTGOPATH)/bin/dgit $(FIRSTGOPATH)/bin/git-remote-dgit

uninstall:
Expand All @@ -39,4 +57,4 @@ test:
clean:
rm -f dgit dgit.tar.gz

.PHONY: all build tarball install uninstall test clean
.PHONY: all build build-linux-arm tarball tarball-linux-arm install uninstall test clean

0 comments on commit f795266

Please sign in to comment.