Skip to content

Commit

Permalink
Automatically deploy to bintray
Browse files Browse the repository at this point in the history
  • Loading branch information
mathias-baumann-sociomantic committed Jun 26, 2018
1 parent 8923659 commit 70d5c2d
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ before_install: git submodule update --init

env:
global:
- DIST=xenial
- ARTIFACTS_DIR=build/travis-artifacts
# Make sure beaver is in the PATH
- PATH="$(git config -f .gitmodules submodule.beaver.path)/bin:$PATH"
matrix:
Expand All @@ -24,10 +26,41 @@ env:
- DMD=2.076.1-0 DIST=xenial F=devel
- DMD=2.076.1-0 DIST=xenial F=production

# (Ab)use Travis cache to pass artifacts between stages.
# As long as the environment variables of different stages match, travis will
# pull the same "cache", so we can use this to actually pass artifacts between
# stages.
cache:
directories:
- $ARTIFACTS_DIR

install: beaver dlang install

# DMD can be very memory hungry, and beaver uses make
# -j2 by default, which means 2 DMD will run in parallel, which
# can exhaust Travis VM memory. Because of this we override
# this with -j1 to make sure only one DMD is ran at a time.
script: beaver dlang make -rj1 all test

jobs:
templates:
- &test-matrix
stage: Test
script:
- beaver dlang make
- beaver dlang make pkg
# If this is a tag, save the packages in the cache directory so
# it's accessible in the Upload Package stage
- if test -n "$TRAVIS_TAG"; then
cp -v build/last/pkg/*.deb "$ARTIFACTS_DIR/";
fi
include:
- <<: *test-matrix
env: DMD=2.076.* DIST=xenial F=production

- stage: Upload Package
if: tag IS present
env: DMD=2.076.* DIST=xenial F=production
script:
- beaver bintray upload -d sociomantic-tsunami/tools/neptune
"$ARTIFACTS_DIR"/*.deb

0 comments on commit 70d5c2d

Please sign in to comment.