-
Notifications
You must be signed in to change notification settings - Fork 80
/
.travis.yml
218 lines (218 loc) · 8.1 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# Tests:
# DUBTEST - dub build and test
# MAKE_BUILDONLY - make build-only, no tests. For platforms where unit tests might not succeed.
# MAKETEST - make test, plus -static on LDC
# CODECOV - Runs code coverage
# APPLTO=[default|off|thin|full] - make test with the setting
# ALLLTO=[default|thin|full] - make test LDC_BUILD_RUNTIME=1 and LTO value
# ALLLTO_V2=[default|thin|full] - make test LDC_LTO_RUNTIME=1 and LTO value (ldc 1.9+)
# LTOPGO=[default|thin|full] - Like ALLLTO, but adds LDC_PGO=2 flag
# LTOPGO_V2=[default|thin|full] - Like ALLLTO_V2, but adds LDC_PGO=2 flag
# LINUX_SPECIAL - Settings linux static build would use if docker wasn't needed.
# DOCKERSPECIAL=[1|2] - Special dockerized build to run LDC with LTO, PGO and -static
# 1 is the original. 2 was introduced Nov 2018 to use a docker image with an up-to-date LDC
# DEPLOY - Deploy if a tagged release.
# ALLOW_FAILURES=[true] - If true, don't fail the entire build if the job fails. Used to avoid
# build failures when there is a issue in a specific dmd or ldc version. Unfortunately, all
# the desired matching environment variables combos must be included in the 'allow_failures:'
# section. (A travis-ci thing.)
#
# Note: Dec 2020 - All macos builds are disabled except for tagged builds. This is to preserve
# macos build credits for releases until working with the new Travis-CI fee structure
# (non-free macos builds) can be addressed.
#
# Note: Feb 2021 - Drop all but essential builds in prep for moving to github actions. Keeping
# code coverage and release action builds.
#
# Note: April 2021 - Move codecov to github actions
#
matrix:
allow_failures:
- env: DUBTEST=1 MAKETEST=1 ALLOW_FAILURES=true
- env: MAKE_BUILDONLY=1 MAKETEST=1 ALLOW_FAILURES=true
include:
- os: linux
dist: bionic
group: travis_latest
language: d
d: ldc-1.27.0-beta1
env: LINUX_SPECIAL=1 DEPLOY=1
if: |
fork = false AND \
type IN (push) AND \
tag IS present
- os: osx
osx_image: xcode11.5
group: travis_latest
language: d
d: ldc-1.27.0-beta1
env: LTOPGO_V2=default DEPLOY=1
if: |
fork = false AND \
type IN (push) AND \
tag IS present
# - os: osx
# osx_image: xcode11.5
# group: travis_latest
# language: d
# d: ldc
# env: LTOPGO_V2=default
# if: |
# type IN (pull_request, cron)
# - os: linux
# dist: xenial
# group: travis_latest
# language: d
# d: ldc
# env: DUBTEST=1 MAKETEST=1
# if: type IN (pull_request)
# - os: linux
# dist: xenial
# group: travis_latest
# language: d
# d: ldc
# env: DUBTEST=1 MAKETEST=1 APPLTO=full
# if: type IN (cron)
# - os: linux
# dist: xenial
# group: travis_latest
# language: d
# d: ldc
# env: APPLTO=thin ALLLTO=default
# if: type IN (cron)
# - os: linux
# dist: xenial
# group: travis_latest
# language: d
# d: ldc
# env: LTOPGO=default
# if: type IN (cron)
# - os: linux
# arch: arm64
# language: d
# d: ldc
# env: MAKE_BUILDONLY=1 MAKETEST=1 ALLOW_FAILURES=true
# if: type IN (cron)
before_install:
- if [[ "$DOCKERSPECIAL" == "1" ]]; then
sudo apt-get -qq update
&& sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
&& docker pull dlanguage/ldc:1.7.0;
export UID=$(id -u);
export GID=$(id -g);
elif [[ "$DOCKERSPECIAL" == "2" ]]; then
sudo apt-get -qq update
&& sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
&& docker pull dlang2/ldc-ubuntu:1.12.0;
export UID=$(id -u);
export GID=$(id -g);
fi
script:
- if [[ "$MAKE_BUILDONLY" == "1" ]]; then
make DCOMPILER=$DC
&& make clean;
fi
- if [[ "$DUBTEST" == "1" ]]; then
dub run -- --compiler=$DC
&& make test-nobuild DCOMPILER=$DC
&& dub clean
&& make clean;
fi
- if [[ "$MAKETEST" == "1" ]]; then
make test DCOMPILER=$DC
&& make clean;
fi
- if [[ "$MAKETEST" == "1" && "$TRAVIS_OS_NAME" == "linux" && "$DC" == "ldc2" ]]; then
make test DCOMPILER=$DC DFLAGS=-static
&& make clean;
fi
- if [[ "$CODECOV" == "1" ]]; then
make test-codecov DCOMPILER=$DC;
fi
- if [[ ! -z "$APPLTO" ]]; then
make test DCOMPILER=$DC LDC_LTO=$APPLTO
&& make clean;
fi
- if [[ ! -z "$ALLLTO" ]]; then
if [[ "$ALLLTO" == "default" ]]; then
make test DCOMPILER=$DC LDC_BUILD_RUNTIME=1
&& make clean;
else
make test DCOMPILER=$DC LDC_BUILD_RUNTIME=1 LDC_LTO=$ALLLTO
&& make clean;
fi
fi
- if [[ ! -z "$ALLLTO_V2" ]]; then
if [[ "$ALLLTO_V2" == "default" ]]; then
make test DCOMPILER=$DC LDC_LTO_RUNTIME=1
&& make clean;
else
make test DCOMPILER=$DC LDC_LTO_RUNTIME=1 LDC_LTO=$ALLLTO_V2
&& make clean;
fi
fi
- if [[ ! -z "$LTOPGO" ]]; then
if [[ "$LTOPGO" == "default" ]]; then
make test DCOMPILER=$DC LDC_BUILD_RUNTIME=1 LDC_PGO=2
&& make clean;
else
make test DCOMPILER=$DC LDC_BUILD_RUNTIME=1 LDC_LTO=$LTOPGO LDC_PGO=2
&& make clean;
fi
fi
- if [[ ! -z "$LTOPGO_V2" ]]; then
if [[ "$LTOPGO_V2" == "default" ]]; then
make test DCOMPILER=$DC LDC_LTO_RUNTIME=1 LDC_PGO=2
&& make clean;
else
make test DCOMPILER=$DC LDC_LTO_RUNTIME=1 LDC_LTO=$LTOPGO_V2 LDC_PGO=2
&& make clean;
fi
fi
- if [[ ! -z "$LINUX_SPECIAL" ]]; then
make test DCOMPILER=$DC LDC_LTO_RUNTIME=1 LDC_PGO=2 DFLAGS=-static
&& make clean;
fi
- if [[ "$DOCKERSPECIAL" == "1" ]]; then
docker run --rm -ti -v $(pwd):/src dlanguage/ldc:1.7.0 make test DCOMPILER=ldc2 LDC_BUILD_RUNTIME=1 LDC_PGO=2 DFLAGS=-static
&& sudo chown -R $UID:$GID $(pwd)
&& make test-nobuild DCOMPILER=ldc2
&& make clean;
elif [[ "$DOCKERSPECIAL" == "2" ]]; then
docker run --rm -ti -v $(pwd):/src -w /src dlang2/ldc-ubuntu:1.12.0 make test DCOMPILER=ldc2 LDC_LTO_RUNTIME=1 LDC_PGO=2 DFLAGS=-static
&& sudo chown -R $UID:$GID $(pwd)
&& make test-nobuild DCOMPILER=ldc2
&& make clean;
fi
after_success:
- if [[ "$CODECOV" == "1" ]]; then
bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports";
fi
before_deploy:
- if [[ -z "$TRAVIS_TAG" || "$TRAVIS_TAG" == "" ]]; then
export USE_VERSION="v~dev";
else export
USE_VERSION="$TRAVIS_TAG";
fi
- if [[ "$DOCKERSPECIAL" == "1" ]]; then
docker run --rm -ti -v $(pwd):/src dlanguage/ldc:1.7.0 make package PKG_ROOT_DIR=tsv-utils DCOMPILER=$DC OS=$TRAVIS_OS_NAME APP_VERSION=$USE_VERSION LDC_BUILD_RUNTIME=1 LDC_PGO=2 DFLAGS=-static;
sudo chown -R $UID:$GID $(pwd);
elif [[ "$DOCKERSPECIAL" == "2" ]]; then
docker run --rm -ti -v $(pwd):/src -w /src dlang2/ldc-ubuntu:1.12.0 make package PKG_ROOT_DIR=tsv-utils DCOMPILER=$DC OS=$TRAVIS_OS_NAME APP_VERSION=$USE_VERSION LDC_LTO_RUNTIME=1 LDC_PGO=2 DFLAGS=-static;
sudo chown -R $UID:$GID $(pwd);
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
make package PKG_ROOT_DIR=tsv-utils DCOMPILER=$DC OS=$TRAVIS_OS_NAME APP_VERSION=$USE_VERSION LDC_LTO_RUNTIME=1 LDC_PGO=2;
else
make package PKG_ROOT_DIR=tsv-utils DCOMPILER=$DC OS=$TRAVIS_OS_NAME APP_VERSION=$USE_VERSION LDC_LTO_RUNTIME=1 LDC_PGO=2 DFLAGS=-static;
fi
deploy:
provider: releases
api_key:
secure: RQ4efkF5nDo27E9u+fYSOUAtL/6/wSCt7oX1CbJAvpwrPt5ZADmRKNyeiC6zNABoJjWEMvpueIshKIHN21VTGMu/L2b7wkm8tziCMnOytKfqWHENiCoaYmtoh9AI2lob5heaO7MQ3+zJGlo8jI2CW6h+BjETIjxthtw05CMYzXt0mCFEnYt3wog9zDsXwTFw9SEM6mmoBozEwIqSHZsFRD/d6/MUifa8LpZFe0ImJjsHeLAWCa2c26XhzmeZUTWDe5BUgoy4Kg+aRm/oGFHure2/SUV4oQzwIhtLF+dgOrk0px8RErvQaAzVE4J+moWc7cIQEjlQT7TxNIcwX5Z8xchEp0PNn4Z245sJyB0aNahZq0sfHQ2xkKa2xBLBZVI1dfHtJbUNc3ulcmmcFr/IXb9rmvYfkc//tvVnzLQlZSZP198S/56m4HramdS8VO5odszoJ2ns56bPVdGypzVVKKrrqFgWYHLkRBmD3Q7l9yamHtrZ0HB0gOClTxRS+ygHk9+y5mEQj2SgwCqjctyKV2RxmVWWI14YoLvgnmXD01hNwpp3aB/PI9GFeZpZuHnqdF7clc/ESGt5e2YJPPsEX5IT4sI4AMeoEfOGOXTdcxH2GB9tmJCwolmdBc6ql0KAZ+Uu3Iu/edbNyvoGTCymsk21eTdyVDNbR0nB17qhgbo=
file_glob: true
file: ./*.tar.gz
skip_cleanup: true
on:
tags: true
repo: eBay/tsv-utils
condition: "$DEPLOY = 1"