This repository has been archived by the owner on Aug 13, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.travis.yml
57 lines (49 loc) · 1.64 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# We will use docker to set up out environment, so don't use any particular
# language in Travis itself
language: generic
# Enable docker
sudo: required
services:
- docker
# Disable automatic submodule fetching (it's done recursively)
git:
submodules: false
# Global environment variables
env:
global:
- ARTIFACTS_DIR=build/travis-artifacts
- DIST=xenial
# Make sure beaver is in the PATH
- PATH="$(git config -f .gitmodules submodule.beaver.path)/bin:$PATH"
# Do a shallow submodule fetch
before_install: git submodule update --init
# Create docker images and setup environment to build
install: beaver dlang install
# (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
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.078.* F=production
- stage: Upload Package
if: tag IS present
env: DMD=2.078.* F=production
script:
- beaver bintray upload -d sociomantic-tsunami/dlang/d1to2fix
"$ARTIFACTS_DIR"/*.deb