Skip to content

Commit

Permalink
Added multi-arch build
Browse files Browse the repository at this point in the history
  • Loading branch information
racerxdl committed Aug 19, 2018
1 parent fa0e4ee commit 802f7d5
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ segdsp.prof
*.float32
*.cfile
*.bytes
out
bins
41 changes: 33 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,37 @@ sudo: required
services:
- docker

before_install:
- docker build -t racerxdl/segdsp .
script:
- docker images racerxdl/segdsp

after_success:
- echo $COMMIT
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
- docker push racerxdl/segdsp
jobs:
include:
# - stage: dockerBuilds
# before_install:
# - docker build -t racerxdl/segdsp .
# script:
# - docker images racerxdl/segdsp
# after_success:
# - echo $COMMIT
# - docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
# - docker push racerxdl/segdsp
- stage: tagBuilds
language: go
go:
"1.10.x"
script:
- git describe --exact-match --tags HEAD 2>> /dev/null && export TRAVIS_TAG="`git describe --exact-match --tags HEAD`"; echo ""
- ./travis-build.sh
deploy:
skip_cleanup: true
provider: releases
api_key:
secure: "cdifHn6ogMEdX7f0BLvowq5Jqr6fYQDFnNxTiBmL3KKZ9UvVpGtaNTaBFt++xE+P7RtVL7Ipxbg0TX15KdaC4eftSS4JnrCnFg8FjGO37114qL0xmA4rnhkdMBz/TtxXKGAks0KOeYP3VraNhqjjBb+9wnFDES56OIJwHPmtX+zP9rizXwGSvLvAtvcvG2+x5zvWtOJmm7t70iRgh4120ePdPHWU5DZak8WbVWlA0qpYgMTQS7o6vqO3nNLB/UqMmGChYXR2aVE5CovDttRnCDLsDPGVuwZURSuv10bWgTUZkSJkJX8gf10Pikh8N7XqYgC0hMjTjQR14AhlfjuPofrO2kbvQygHSkXsLqx8mVeUrkUjSm+g4DPCv9ClZRZh4J8nq4Gut50Ry6OJN7CR0pdcY+phEv+OtEBzeGoAqbQO6qJKMYDvTQwDWLHuDQ+w1LLg/ARUqctmDcU0Nk8YDUfEaiYsxtfKb04po9it8BhD5PTmmqOZefBb943OzRLnNDcm7yB7pexAtj5x0t21QrecM01R5nvmX+YtPQatAp4LepgZEXYXBM0stPr6YFNw7st6MZDeX23jq4HgdRKZrOB9li0oQ/FL9bMt4B71TlJGXdP6fuI6eYLBwAbtAQojKYClngjjBbgU3L19rqNUJMSrCsuirQOHl5eeiJJXWYs="
file:
- bins/segdsp-linux-386.zip
- bins/segdsp-linux-amd64.zip
- bins/segdsp-linux-arm64.zip
- bins/segdsp-linux-arm.zip
- bins/segdsp-windows-386.zip
- bins/segdsp-windows-amd64.zip
on:
tags: true
repo: racerxdl/segdsp
26 changes: 26 additions & 0 deletions travis-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

TAG=`git describe --exact-match --tags HEAD`

if [ $? -eq 0 ];
then
echo "Releasing for tag ${TAG}"
echo "Downloading deps"
go get -v
echo "Dowloading gox for multi-arch"
go get github.com/mitchellh/gox
mkdir out
mkdir bins
echo "Multi-arch build"
gox -output "out/{{.OS}}-{{.Arch}}/{{.Dir}}" -arch="arm arm64 386 amd64" -os="windows linux"
cd out
for i in *
do
echo "Zipping segdsp-${i}.zip"
zip ../bins/segdsp-$i.zip $i/*
done
cd ..
ls -la bins
else
echo "No tags for current commit. Skipping releases."
fi

0 comments on commit 802f7d5

Please sign in to comment.