Skip to content

Commit

Permalink
added circleci to build arm64 zipped binary
Browse files Browse the repository at this point in the history
  • Loading branch information
uosjead committed Feb 2, 2021
1 parent 022fbb4 commit c086ef0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
22 changes: 18 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,27 @@ jobs:
name: Run unit tests
command: gotestsum --junitfile ${TEST_RESULTS}/go-test-report.xml

- run: go build -ldflags "-X main.date=`date -u +%Y-%m-%dT%H:%M:%SZ` -X main.commit=${CIRCLE_SHA1}"
- run:
name: build amd64
environment:
GOOS: linux
GOARCH: amd64
command: |
go build -ldflags "-X main.date=`date -u +%Y-%m-%dT%H:%M:%SZ` -X main.commit=${CIRCLE_SHA1}" -o go-minipypi-Linux-amd64
gzip go-minipypi-Linux-amd64
- run:
name: Create build artifact
name: build arm64
environment:
GOOS: linux
GOARCH: arm64
command: |
gzip go-minipypi
mv -f go-minipypi.gz "$OUTPUT_BIN/go-minipypi-`uname -s`-`uname -m`.gz"
go build -ldflags "-X main.date=`date -u +%Y-%m-%dT%H:%M:%SZ` -X main.commit=${CIRCLE_SHA1}" -o go-minipypi-Linux-arm64
gzip go-minipypi-Linux-arm64
- run:
name: Create build artifacts
command: mv -f go-minipypi-*.gz "$OUTPUT_BIN"

- store_artifacts:
path: *test_results
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module github.com/citymapper/go-minipypi

go 1.15

require (
github.com/aws/aws-sdk-go v1.16.1
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8
Expand Down

0 comments on commit c086ef0

Please sign in to comment.