Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix packages and deploy #63

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 6 additions & 36 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,41 +18,15 @@ script:
- make test-coverage

after_success:
- bash <(curl -s https://codecov.io/bash)
- make codecov

jobs:
include:
- stage: deploy
os: osx
go: 1.9
after_success:
- gzip -S .darwin_amd64.gz $GOPATH/bin/multitool
- tar -czf $GOPATH/bin/borges-indexer.darwin_amd64.tar.gz -C $GOPATH/bin borges-indexer set-forks
- gzip -S .darwin_amd64.gz $GOPATH/bin/pga
install:
- go get -v github.com/src-d/datasets/PublicGitArchive/multitool/...
- go get -v github.com/src-d/datasets/PublicGitArchive/borges-indexer/...
- go get -v github.com/src-d/datasets/PublicGitArchive/pga/...
script: skip
deploy:
provider: releases
api_key:
secure: $GITHUB_TOKEN
file:
- "$GOPATH/bin/multitool.darwin_amd64.gz"
- "$GOPATH/bin/borges-indexer.darwin_amd64.tar.gz"
- "$GOPATH/bin/pga.darwin_amd64.gz"
skip_cleanup: true
on:
tags: true
- stage: deploy
if: tag IS present
os: linux
go: 1.9
install:
- go get -v github.com/src-d/datasets/PublicGitArchive/multitool/...
- go get -v github.com/src-d/datasets/PublicGitArchive/borges-indexer/...
- go get -v github.com/src-d/datasets/PublicGitArchive/pga/...
script: skip
go: 1.10.x
script: make packages
after_success:
- gzip -S .linux_amd64.gz $GOPATH/bin/multitool
- tar -czf $GOPATH/bin/borges-indexer.linux_amd64.tar.gz -C $GOPATH/bin borges-indexer set-forks
Expand All @@ -61,13 +35,9 @@ jobs:
provider: releases
api_key:
secure: $GITHUB_TOKEN
file:
- "$GOPATH/bin/multitool.linux_amd64.gz"
- "$GOPATH/bin/borges-indexer.linux_amd64.tar.gz"
- "$GOPATH/bin/pga.linux_amd64.gz"
file_glob: true
file: build/*.tar.gz
skip_cleanup: true
on:
tags: true

notifications:
email: false
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Package configuration
PROJECT = datasets
COMMANDS = datasets/PublicGitArchive/borges-indexer/cmd/borges-indexer datasets/PublicGitArchive/multitool datasets/PublicGitArchive/pga
COMMANDS = PublicGitArchive/borges-indexer/cmd/borges-indexer PublicGitArchive/multitool PublicGitArchive/pga

# Including ci Makefile
CI_REPOSITORY ?= https://github.com/src-d/ci.git
CI_PATH ?= $(shell pwd)/.ci
CI_VERSION ?= v1
PKG_OS=linux darwin windows
PKG_OS = linux darwin windows
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was that really the problem?

(╯°□°)╯︵ ┻━┻)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really ;)
I think the problem is in the travis.yml commands. I updated the PR. make packages should be used to compile the binaries and create the tars, then a single file blob expression can be used in the deploy section for Travis to pick up everything.


MAKEFILE := $(CI_PATH)/Makefile.main
$(MAKEFILE):
git clone --quiet --branch $(CI_VERSION) --depth 1 $(CI_REPOSITORY) $(CI_PATH);

-include $(MAKEFILE)
-include $(MAKEFILE)