-
Notifications
You must be signed in to change notification settings - Fork 23
/
.travis.yml
67 lines (59 loc) · 1.97 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
58
59
60
61
62
63
64
65
66
67
# 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:
- DIST=bionic
- COV=0
# Default beaver image names. May be overriden in specific stages
- BEAVER_DOCKER_IMG=builder
- BEAVER_DOCKER_CONTEXT=docker/builder
# 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
# Basic config is inherited from the global scope
jobs:
templates:
- &test-matrix
stage: Test
after_success: beaver dlang codecov
script:
- set -e # Do not continue on failure
- beaver dlang install
- beaver dlang make
- &package-matrix
stage: Build and upload packages
if: tag IS present
script:
- set -e # Do not continue on failure
- beaver dlang install
- beaver dlang make
- beaver dlang make pkg
- beaver bintray upload -d sociomantic-tsunami/nodes/dhtnode build/production/pkg/*.deb
include:
# Test matrix
- <<: *test-matrix
env: DMD=2.092.* F=production
- <<: *test-matrix
env: DMD=2.092.* F=devel
- <<: *test-matrix
env: DMD=2.093.* F=production COV=1
- <<: *test-matrix
env: DMD=2.093.* F=devel COV=1
# Test deployment docker image generation
- stage: Test
script:
- docker build --build-arg DMD=2.093.* --build-arg DIST=${DIST}
-t dhtnode -f docker/Dockerfile.dhtnode .
# Package matrix
- <<: *package-matrix
env: DMD=2.093.* F=production