forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
1016 lines (894 loc) · 33 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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# GENERATED, DO NOT EDIT!
# To change, edit build-support/travis/travis.yml.mustache and run
# ./pants --quiet run build-support/travis:generate_travis_yml > .travis.yml
#
# Tip: Copy the generated `.travis.yml` into https://yamlvalidator.com to validate the YAML
# and see how the entries resolve to normalized JSON (helpful to debug anchors).
# Conditions are documented here: https://docs.travis-ci.com/user/conditions-v1
conditions: v1
# -------------------------------------------------------------------------
# Global setup
# -------------------------------------------------------------------------
env:
global:
- PANTS_CONFIG_FILES="${TRAVIS_BUILD_DIR}/pants.travis-ci.ini"
- PYTEST_PASSTHRU_ARGS="-v --duration=3"
- LC_ALL="en_US.UTF-8"
- BOOTSTRAPPED_PEX_BUCKET=ci-public.pantsbuild.org
- BOOTSTRAPPED_PEX_KEY_PREFIX=${TRAVIS_BUILD_NUMBER}/${TRAVIS_BUILD_ID}/pants.pex
- BOOTSTRAPPED_PEX_URL_PREFIX=s3://${BOOTSTRAPPED_PEX_BUCKET}/${BOOTSTRAPPED_PEX_KEY_PREFIX}
# Stages are documented here: https://docs.travis-ci.com/user/build-stages
stages:
- &bootstrap Bootstrap Pants
- name: &test Test Pants
if: type != cron
- name: &cron Cron
if: type = cron
- name: &build_stable Deploy Pants Pex
if: tag IS present AND tag =~ ^release_.*$
- name: &build_unstable Deploy Pants Pex Unstable
if: tag IS NOT present AND type NOT IN (pull_request, cron)
# -------------------------------------------------------------------------
# Cache config
# -------------------------------------------------------------------------
# Travis cache config for jobs that build the native engine.
native_engine_cache_config: &native_engine_cache_config
before_cache:
# Ensure permissions to do the below removals, which happen with or without caching enabled.
- sudo chown -R travis:travis "${HOME}" "${TRAVIS_BUILD_DIR}"
# Kill all python bytecode in our cached venvs. Some files appear to
# get bytecode compiled in non-yet-understood circumstances leading to
# a full cache re-pack due to new bytecode files.
- find build-support -name "*.py[co]" -delete
cache:
# The default timeout is 180 seconds, and our larger cache uploads exceed this.
# TODO: Figure out why we have such large caches (2-7GB) and try to trim them.
timeout: 500
directories:
- ${HOME}/.cache/pants/rust/cargo
- build-support/pants_dev_deps.py27.venv
- build-support/pants_dev_deps.py36.venv
- build-support/pants_dev_deps.py37.venv
- src/rust/engine/target
# Travis cache config for jobs that run a bootstrapped pants.pex.
pants_run_cache_config: &pants_run_cache_config
before_cache:
# Ensure permissions to do the below removals, which happen with or without caching enabled.
- sudo chown -R travis:travis "${HOME}" "${TRAVIS_BUILD_DIR}"
# The `ivydata-*.properties` & root level `*.{properties,xml}` files'
# effect on resolution time is in the noise, but they are
# re-timestamped in internal comments and fields on each run and this
# leads to travis-ci cache thrash. Kill these files before the cache
# check to avoid un-needed cache re-packing and re-upload (a ~100s
# operation).
- find ${HOME}/.ivy2/pants -type f -name "ivydata-*.properties" -delete
- rm -f ${HOME}/.ivy2/pants/*.{css,properties,xml,xsl}
# We have several tests that do local file:// url resolves for
# com.example artifacts, these disrupt the cache but are fast since
# they're resolved from local files when omitted from the cache.
- rm -rf ${HOME}/.ivy2/pants/com.example
# Render a summary to assist with further tuning the cache.
- du -m -d2 ${HOME}/.cache/pants | sort -r -n
cache:
# The default timeout is 180 seconds, and our larger cache uploads exceed this.
# TODO: Figure out why we have such large caches (2-7GB) and try to trim them.
timeout: 500
directories:
- ${HOME}/.cache/pants/tools
- ${HOME}/.cache/pants/zinc
- ${HOME}/.ivy2/pants
# TODO(John Sirois): Update this to ~/.npm/pants when pants starts
# using its own isolated cache:
# https://github.com/pantsbuild/pants/issues/2485
- ${HOME}/.npm
# -------------------------------------------------------------------------
# Generic shard setups
# -------------------------------------------------------------------------
base_linux_config: &base_linux_config
os: linux
dist: xenial
sudo: required
addons:
apt:
packages:
- lib32stdc++6
- lib32z1
- lib32z1-dev
- gcc-multilib
- python-dev
- openssl
- libssl-dev
- jq
- unzip
language: python
before_install:
- ./build-support/bin/install_aws_cli_for_ci.sh
after_failure:
- ./build-support/bin/ci-failure.sh
py27_linux_config: &py27_linux_config
<<: *base_linux_config
python: &python2_version "2.7"
py36_linux_config: &py36_linux_config
<<: *base_linux_config
python: &python3_version "3.6"
base_linux_test_config: &base_linux_test_config
<<: *base_linux_config
<<: *pants_run_cache_config
before_install:
- PATH="/usr/lib/jvm/java-8-openjdk-amd64/jre/bin":$PATH
- JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
# Increase the max number of user watches to ensure that watchman is able to watch all
# files in the working copy.
- sudo sysctl fs.inotify.max_user_watches=524288
- ./build-support/bin/install_aws_cli_for_ci.sh
before_script:
- ./build-support/bin/get_ci_bootstrapped_pants_pex.sh ${BOOTSTRAPPED_PEX_BUCKET} ${BOOTSTRAPPED_PEX_KEY_PREFIX}.${BOOTSTRAPPED_PEX_KEY_SUFFIX}
py27_linux_test_config: &py27_linux_test_config
<<: *py27_linux_config
<<: *base_linux_test_config
stage: *cron
env:
- &py27_linux_test_config_env BOOTSTRAPPED_PEX_KEY_SUFFIX=py27.linux
py36_linux_test_config: &py36_linux_test_config
<<: *py36_linux_config
<<: *base_linux_test_config
stage: *test
env:
- &py36_linux_test_config_env BOOTSTRAPPED_PEX_KEY_SUFFIX=py36.linux
base_osx_config: &base_osx_config
os: osx
language: generic
before_install:
- curl -L https://github.com/stedolan/jq/releases/download/jq-1.5/jq-osx-amd64 -o /usr/local/bin/jq
- chmod 755 /usr/local/bin/jq
- ./build-support/bin/install_aws_cli_for_ci.sh
py27_osx_config: &py27_osx_config
<<: *base_osx_config
py36_osx_config: &py36_osx_config
<<: *base_osx_config
addons:
brew:
packages: &py36_osx_config_brew_packages
- openssl
env:
# Fix Python 3 issue linking to OpenSSL
- &py36_osx_config_env >
PATH="/usr/local/opt/openssl/bin:$PATH"
LDFLAGS="-L/usr/local/opt/openssl/lib"
CPPFLAGS="-I/usr/local/opt/openssl/include"
PYENV_ROOT="${HOME}/.pyenv"
PATH="${PYENV_ROOT}/shims:${PATH}"
before_install:
- curl -L https://github.com/stedolan/jq/releases/download/jq-1.5/jq-osx-amd64 -o /usr/local/bin/jq
- chmod 755 /usr/local/bin/jq
- ./build-support/bin/install_aws_cli_for_ci.sh
# Clone pyenv directly from GitHub. For multiple osx images, brew's version of pyenv is too old to get
# modern Python 3.6. Pulling from GitHub instead allows us to use the same Python 3 version accross every OSX shard.
- git clone https://github.com/pyenv/pyenv ${PYENV_ROOT}
- ${PYENV_ROOT}/bin/pyenv install 3.6.8
- ${PYENV_ROOT}/bin/pyenv global 3.6.8
base_osx_test_config: &base_osx_test_config
<<: *pants_run_cache_config
before_script:
- ulimit -c unlimited
- ulimit -n 8192
- ./build-support/bin/get_ci_bootstrapped_pants_pex.sh ${BOOTSTRAPPED_PEX_BUCKET} ${BOOTSTRAPPED_PEX_KEY_PREFIX}.${BOOTSTRAPPED_PEX_KEY_SUFFIX}
py27_osx_test_config: &py27_osx_test_config
<<: *py27_osx_config
<<: *base_osx_test_config
stage: *cron
env:
- &py27_osx_test_config_env BOOTSTRAPPED_PEX_KEY_SUFFIX=py27.osx
py36_osx_test_config: &py36_osx_test_config
<<: *py36_osx_config
<<: *base_osx_test_config
stage: *test
env:
# Must duplicate py36_osx_config's env because it cannot be merged into a new anchor
- &py36_osx_test_config_env >
PATH="/usr/local/opt/openssl/bin:$PATH"
LDFLAGS="-L/usr/local/opt/openssl/lib"
CPPFLAGS="-I/usr/local/opt/openssl/include"
PYENV_ROOT="${HOME}/.pyenv"
PATH="${PYENV_ROOT}/shims:${PATH}"
BOOTSTRAPPED_PEX_KEY_SUFFIX=py36.osx
linux_with_fuse: &linux_with_fuse
before_install:
- PATH="/usr/lib/jvm/java-8-openjdk-amd64/jre/bin":$PATH
- JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
# Increase the max number of user watches to ensure that watchman is able to watch all
# files in the working copy.
- sudo sysctl fs.inotify.max_user_watches=524288
- ./build-support/bin/install_aws_cli_for_ci.sh
- sudo apt-get install -y pkg-config fuse libfuse-dev
- sudo modprobe fuse
- sudo chmod 666 /dev/fuse
- sudo chown root:$USER /etc/fuse.conf
travis_docker_image: &travis_docker_image
services:
- docker
before_script:
- ulimit -c unlimited
script:
# NB: This script definition is very likely to be overridden in a consumer, so we alias it
# for re-inclusion.
- &travis_docker_image_launch docker build --rm -t travis_ci
--build-arg "TRAVIS_USER=$(id -un)"
--build-arg "TRAVIS_UID=$(id -u)"
--build-arg "TRAVIS_GROUP=$(id -gn)"
--build-arg "TRAVIS_GID=$(id -g)"
build-support/docker/travis_ci/
# -------------------------------------------------------------------------
# Bootstrap engine shards
# -------------------------------------------------------------------------
base_linux_build_engine: &base_linux_build_engine
<<: *native_engine_cache_config
<<: *travis_docker_image
stage: *bootstrap
script:
- *travis_docker_image_launch
# Note that:
# * We mount ${HOME} to cache the ${HOME}/.cache/pants/rust-toolchain.
# * We also build fs_util, to take advantage of the rust code built during bootstrapping.
- docker run --rm -t
-v "${HOME}:/travis/home"
-v "${TRAVIS_BUILD_DIR}:/travis/workdir"
travis_ci:latest
sh -c "./build-support/bin/ci.sh ${BOOTSTRAP_ARGS} && ./build-support/bin/release.sh -f"
- aws --no-sign-request --region us-east-1 s3 cp ${TRAVIS_BUILD_DIR}/pants.pex ${BOOTSTRAPPED_PEX_URL_PREFIX}.${BOOTSTRAPPED_PEX_KEY_SUFFIX}
py27_linux_build_engine: &py27_linux_build_engine
<<: *py27_linux_config
<<: *base_linux_build_engine
name: "Build Linux native engine and pants.pex (Py2.7 PEX)"
env:
# NB: Only the Py2.7 shard sets PREPARE_DEPLOY to cause the fs_util binary to be uploaded to S3:
# either linux shard could upload this binary, since it does not depend on python at all.
- PREPARE_DEPLOY=1
- CACHE_NAME=linuxpexbuild.py27
- BOOTSTRAPPED_PEX_KEY_SUFFIX=py27.linux
- BOOTSTRAP_ARGS='-2b'
py36_linux_build_engine: &py36_linux_build_engine
<<: *py36_linux_config
<<: *base_linux_build_engine
name: "Build Linux native engine and pants.pex (Py3.6 PEX)"
env:
- CACHE_NAME=linuxpexbuild.py36
- BOOTSTRAPPED_PEX_KEY_SUFFIX=py36.linux
- BOOTSTRAP_ARGS='-b'
base_osx_build_engine: &base_osx_build_engine
<<: *native_engine_cache_config
stage: *bootstrap
# We request the oldest image we can (corresponding to OSX 10.11) for maximum compatibility.
# We use 10.11 as a minimum to avoid https://github.com/rust-lang/regex/issues/489.
# See: https://docs.travis-ci.com/user/reference/osx/#OS-X-Version
osx_image: xcode8
env:
- &base_osx_build_engine_env PREPARE_DEPLOY=1 # To deploy fs_util.
script:
# We also build fs_util, to take advantage of the rust code built during bootstrapping.
- ./build-support/bin/ci.sh ${BOOTSTRAP_ARGS} && ./build-support/bin/release.sh -f
- aws --no-sign-request --region us-east-1 s3 cp ${TRAVIS_BUILD_DIR}/pants.pex ${BOOTSTRAPPED_PEX_URL_PREFIX}.${BOOTSTRAPPED_PEX_KEY_SUFFIX}
after_failure:
- ./build-support/bin/ci-failure.sh
py27_osx_build_engine: &py27_osx_build_engine
<<: *py27_osx_config
<<: *base_osx_build_engine
name: "Build OSX native engine and pants.pex (Py2.7 PEX)"
env:
- *base_osx_build_engine_env
- CACHE_NAME=osxpexbuild.py27
- BOOTSTRAPPED_PEX_KEY_SUFFIX=py27.osx
- BOOTSTRAP_ARGS='-2b'
py36_osx_build_engine: &py36_osx_build_engine
<<: *py36_osx_config
<<: *base_osx_build_engine
name: "Build OSX native engine and pants.pex (Py3.6 PEX)"
env:
- *base_osx_build_engine_env
- *py36_osx_config_env
- CACHE_NAME=osxpexbuild.py36
- BOOTSTRAPPED_PEX_KEY_SUFFIX=py36.osx
- BOOTSTRAP_ARGS='-b'
# -------------------------------------------------------------------------
# Lint
# -------------------------------------------------------------------------
py27_lint: &py27_lint
<<: *py27_linux_test_config
name: "Self-checks and lint (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=linuxselfchecks.py27
script:
- ./build-support/bin/travis-ci.sh -fmrt2
py36_lint: &py36_lint
<<: *py36_linux_test_config
name: "Self-checks and lint (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=linuxselfchecks.py36
script:
- ./build-support/bin/travis-ci.sh -fmrt
# -------------------------------------------------------------------------
# Rust lints
# -------------------------------------------------------------------------
linux_rust_clippy: &linux_rust_clippy
<<: *linux_with_fuse
<<: *native_engine_cache_config
name: "Linux Rust Clippy (No PEX)"
env:
- CACHE_NAME=linuxclippy
os: linux
dist: xenial
sudo: required
stage: *test
language: python
python: *python3_version
before_script:
- ulimit -c unlimited
- ulimit -n 8192
script:
- ./build-support/bin/travis-ci.sh -s
cargo_audit: &cargo_audit
<<: *linux_with_fuse
name: "Cargo audit (No PEX)"
env:
- CACHE_NAME=linuxcargoaudit
os: linux
dist: xenial
sudo: required
stage: *cron
script:
- ./build-support/bin/travis-ci.sh -a
# -------------------------------------------------------------------------
# Build wheels
# -------------------------------------------------------------------------
base_build_wheels: &base_build_wheels
stage: *test
env:
- &base_build_wheels_env RUN_PANTS_FROM_PEX=1 PREPARE_DEPLOY=1
linux_build_wheels: &linux_build_wheels
# Similar to the bootstrap shard, we build Linux wheels in a docker image to maximize
# compatibility. This is a Py2.7 shard, so it is not subject to #6985.
<<: *travis_docker_image
<<: *py27_linux_test_config
<<: *base_build_wheels
name: "Build Linux wheels (No PEX)"
env:
- *py27_linux_test_config_env
- *base_build_wheels_env
- CACHE_NAME=linuxwheelsbuild
script:
- *travis_docker_image_launch
- docker run --rm -t
-v "${HOME}:/travis/home"
-v "${TRAVIS_BUILD_DIR}:/travis/workdir"
travis_ci:latest
sh -c "RUN_PANTS_FROM_PEX=1 ./build-support/bin/release.sh -n"
osx_build_wheels: &osx_build_wheels
<<: *py27_osx_test_config
<<: *base_build_wheels
name: "Build OSX wheels (No PEX)"
osx_image: xcode8
env:
- *py27_osx_test_config_env
- *base_build_wheels_env
- CACHE_NAME=osxwheelsbuild
script:
- ./build-support/bin/release.sh -n
# -------------------------------------------------------------------------
# Rust tests
# -------------------------------------------------------------------------
base_rust_tests: &base_rust_tests
<<: *native_engine_cache_config
stage: *test
before_script:
- ulimit -c unlimited
- ulimit -n 8192
linux_rust_tests: &linux_rust_tests
<<: *base_rust_tests
<<: *linux_with_fuse
name: "Linux Rust tests (No PEX)"
env:
- CACHE_NAME=linuxrusttests
os: linux
dist: xenial
sudo: required
language: python
python: *python3_version
script:
- ./build-support/bin/travis-ci.sh -e
osx_rust_tests: &osx_rust_tests
<<: *base_rust_tests
name: "OSX Rust tests (No PEX)"
env:
- CACHE_NAME=macosrusttests
os: osx
# Fuse actually works on this image. It hangs on many others.
osx_image: xcode8.3
addons:
homebrew:
casks:
- osxfuse
script:
# N.B. We run this with Python 2 because this osx_image does not have
# Python 3.6 in its environment. We do not care which Python version
# we use and do not want to incur the cost of using pyenv to get 3.6.
- ./build-support/bin/travis-ci.sh -e2
# -------------------------------------------------------------------------
# OSX sanity checks
# -------------------------------------------------------------------------
base_osx_sanity_check: &base_osx_sanity_check
script:
- MODE=debug ./build-support/bin/travis-ci.sh -m
# TODO: Update this to use 10.14 once it is available
base_osx_10_12_sanity_check: &base_osx_10_12_sanity_check
<<: *base_osx_sanity_check
osx_image: xcode9.2
py27_osx_10_12_sanity_check: &py27_osx_10_12_sanity_check
<<: *py27_osx_test_config
<<: *base_osx_10_12_sanity_check
name: "OSX 10.12 sanity check (Py2.7 PEX)"
env:
- *py27_osx_test_config_env
- CACHE_NAME=macos10.12sanity.py27
py36_osx_10_12_sanity_check: &py36_osx_10_12_sanity_check
<<: *py36_osx_test_config
<<: *base_osx_10_12_sanity_check
name: "OSX 10.12 sanity check (Py3.6 PEX)"
env:
- *py36_osx_test_config_env
- CACHE_NAME=macos10.12sanity.py36
base_osx_10_13_sanity_check: &base_osx_10_13_sanity_check
<<: *base_osx_sanity_check
osx_image: xcode10.1
py27_osx_10_13_sanity_check: &py27_osx_10_13_sanity_check
<<: *py27_osx_test_config
<<: *base_osx_10_13_sanity_check
name: "OSX 10.13 sanity check (Py2.7 PEX)"
env:
- *py27_osx_test_config_env
- CACHE_NAME=macos10.13sanity.py27
py36_osx_10_13_sanity_check: &py36_osx_10_13_sanity_check
<<: *py36_osx_test_config
<<: *base_osx_10_13_sanity_check
name: "OSX 10.13 sanity check (Py3.6 PEX)"
env:
- *py36_osx_test_config_env
- CACHE_NAME=macos10.13sanity.py36
# -------------------------------------------------------------------------
# Platform specific tests
# -------------------------------------------------------------------------
py27_osx_platform_tests: &py27_osx_platform_tests
<<: *py27_osx_test_config
name: "OSX platform-specific tests (Py2.7 PEX)"
env:
- *py27_osx_test_config_env
- CACHE_NAME=macosplatformtests.py27
script:
- ./build-support/bin/travis-ci.sh -z2
py36_osx_platform_tests: &py36_osx_platform_tests
<<: *py36_osx_test_config
name: "OSX platform-specific tests (Py3.6 PEX)"
env:
- *py36_osx_test_config_env
- CACHE_NAME=macosplatformtests.py36
script:
- ./build-support/bin/travis-ci.sh -z
# -------------------------------------------------------------------------
# JVM tests
# -------------------------------------------------------------------------
base_jvm_tests: &base_jvm_tests
<<: *linux_with_fuse
py27_jvm_tests: &py27_jvm_tests
<<: *py27_linux_test_config
<<: *base_jvm_tests
name: "JVM tests (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=linuxjvmtests.py27
script:
- ./build-support/bin/travis-ci.sh -j2
py36_jvm_tests: &py36_jvm_tests
<<: *py36_linux_test_config
<<: *base_jvm_tests
name: "JVM tests (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=linuxjvmtests.py36
script:
- ./build-support/bin/travis-ci.sh -j
# -------------------------------------------------------------------------
# Deploy
# -------------------------------------------------------------------------
deploy_stable_multiplatform_pex: &deploy_stable_multiplatform_pex
name: "Deploy stable multiplatform pants.pex"
os: linux
language: python
stage: *build_stable
env:
- CACHE_NAME=linuxpexdeploystable
- RUN_PANTS_FROM_PEX=1
- PANTS_PEX_RELEASE=stable
script:
- ./build-support/bin/release.sh -p
deploy:
# See https://docs.travis-ci.com/user/deployment/releases/
provider: releases
# The pantsbuild-ci-bot OAuth token, see the pantsbuild vault for details.
api_key:
secure: "u0aCsiuVGOg28YxG0sQUovuUm29kKwQfFgHbNz2TT5L+cGoHxGl4aoVOCtuwWYEtbNGmYc8/3WRS3C/jOiqQj6JEgHUzWOsnfKUObEqNhisAmXbzBbKc0wPQTL8WNK+DKFh32sD3yPYcw+a5PTLO56+o7rqlI25LK7A17WesHC4="
file_glob: true
file: dist/deploy/pex/*
skip_cleanup: true
on:
# We only release a pex for Pants releases, which are tagged.
tags: true
repo: pantsbuild/pants
deploy_unstable_multiplatform_pex: &deploy_unstable_multiplatform_pex
name: "Deploy unstable multiplatform pants.pex"
os: linux
language: python
stage: *build_unstable
env:
- CACHE_NAME=linuxpexdeployunstable
- RUN_PANTS_FROM_PEX=1
- PREPARE_DEPLOY=1
script:
- ./build-support/bin/release.sh -p && mkdir -p dist/deploy/pex/ && mv dist/pants*.pex dist/deploy/pex/
# -------------------------------------------------------------------------
# Test matrix
# -------------------------------------------------------------------------
matrix:
include:
- <<: *py27_linux_build_engine
- <<: *py36_linux_build_engine
- <<: *py27_osx_build_engine
- <<: *py36_osx_build_engine
- <<: *py27_lint
- <<: *py36_lint
- <<: *linux_rust_clippy
- <<: *cargo_audit
- <<: *linux_build_wheels
- <<: *osx_build_wheels
- <<: *py27_linux_test_config
name: "Unit tests for pants and pants-plugins (Py2.7 PEX)"
stage: *test
env:
- *py27_linux_test_config_env
- CACHE_NAME=linuxunittests.py27
script:
- ./build-support/bin/travis-ci.sh -2lp
- <<: *py36_linux_test_config
name: "Unit tests for pants and pants-plugins (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=linuxunittests.py36
script:
- ./build-support/bin/travis-ci.sh -lp
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 0 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard0
script:
- ./build-support/bin/travis-ci.sh -c -i 0/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 1 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard1
script:
- ./build-support/bin/travis-ci.sh -c -i 1/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 2 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard2
script:
- ./build-support/bin/travis-ci.sh -c -i 2/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 3 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard3
script:
- ./build-support/bin/travis-ci.sh -c -i 3/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 4 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard4
script:
- ./build-support/bin/travis-ci.sh -c -i 4/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 5 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard5
script:
- ./build-support/bin/travis-ci.sh -c -i 5/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 6 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard6
script:
- ./build-support/bin/travis-ci.sh -c -i 6/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 7 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard7
script:
- ./build-support/bin/travis-ci.sh -c -i 7/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 8 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard8
script:
- ./build-support/bin/travis-ci.sh -c -i 8/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 9 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard9
script:
- ./build-support/bin/travis-ci.sh -c -i 9/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 10 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard10
script:
- ./build-support/bin/travis-ci.sh -c -i 10/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 11 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard11
script:
- ./build-support/bin/travis-ci.sh -c -i 11/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 12 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard12
script:
- ./build-support/bin/travis-ci.sh -c -i 12/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 13 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard13
script:
- ./build-support/bin/travis-ci.sh -c -i 13/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 14 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard14
script:
- ./build-support/bin/travis-ci.sh -c -i 14/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 15 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard15
script:
- ./build-support/bin/travis-ci.sh -c -i 15/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 16 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard16
script:
- ./build-support/bin/travis-ci.sh -c -i 16/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 17 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard17
script:
- ./build-support/bin/travis-ci.sh -c -i 17/19
- <<: *py36_linux_test_config
name: "Integration tests for pants - shard 18 (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=integrationshard18
script:
- ./build-support/bin/travis-ci.sh -c -i 18/19
- <<: *py27_linux_test_config
name: "Blacklisted integration tests for pants - shard 0 (Py2.7 PEX w/ Py3.6 constraints)"
stage: *test
env:
- *py27_linux_test_config_env
- PANTS_PYTHON_SETUP_INTERPRETER_CONSTRAINTS="['CPython>=3.6']"
- CACHE_NAME=integrationshard0.py27blacklist
script:
- ./build-support/bin/travis-ci.sh -c2w -i 0/1
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 0 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard0
script:
- ./build-support/bin/travis-ci.sh -c2 -i 0/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 1 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard1
script:
- ./build-support/bin/travis-ci.sh -c2 -i 1/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 2 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard2
script:
- ./build-support/bin/travis-ci.sh -c2 -i 2/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 3 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard3
script:
- ./build-support/bin/travis-ci.sh -c2 -i 3/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 4 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard4
script:
- ./build-support/bin/travis-ci.sh -c2 -i 4/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 5 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard5
script:
- ./build-support/bin/travis-ci.sh -c2 -i 5/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 6 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard6
script:
- ./build-support/bin/travis-ci.sh -c2 -i 6/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 7 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard7
script:
- ./build-support/bin/travis-ci.sh -c2 -i 7/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 8 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard8
script:
- ./build-support/bin/travis-ci.sh -c2 -i 8/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 9 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard9
script:
- ./build-support/bin/travis-ci.sh -c2 -i 9/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 10 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard10
script:
- ./build-support/bin/travis-ci.sh -c2 -i 10/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 11 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard11
script:
- ./build-support/bin/travis-ci.sh -c2 -i 11/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 12 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard12
script:
- ./build-support/bin/travis-ci.sh -c2 -i 12/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 13 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard13
script:
- ./build-support/bin/travis-ci.sh -c2 -i 13/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 14 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard14
script:
- ./build-support/bin/travis-ci.sh -c2 -i 14/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 15 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard15
script:
- ./build-support/bin/travis-ci.sh -c2 -i 15/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 16 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard16
script:
- ./build-support/bin/travis-ci.sh -c2 -i 16/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 17 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard17
script:
- ./build-support/bin/travis-ci.sh -c2 -i 17/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 18 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard18
script:
- ./build-support/bin/travis-ci.sh -c2 -i 18/20
- <<: *py27_linux_test_config
name: "Integration tests for pants - shard 19 (Py2.7 PEX)"
env:
- *py27_linux_test_config_env
- CACHE_NAME=cronshard19
script:
- ./build-support/bin/travis-ci.sh -c2 -i 19/20
- <<: *linux_rust_tests
- <<: *osx_rust_tests
- <<: *py27_linux_test_config
name: "Python contrib tests (Py2.7 PEX)"
stage: *test
env:
- *py27_linux_test_config_env
- CACHE_NAME=linuxcontribtests.py27
script:
- ./build-support/bin/travis-ci.sh -2n
- <<: *py36_linux_test_config
name: "Python contrib tests (Py3.6 PEX)"
env:
- *py36_linux_test_config_env
- CACHE_NAME=linuxcontribtests.py36
script:
- ./build-support/bin/travis-ci.sh -n
- <<: *py27_osx_10_12_sanity_check
- <<: *py36_osx_10_12_sanity_check
- <<: *py27_osx_10_13_sanity_check
- <<: *py36_osx_10_13_sanity_check
- <<: *py27_osx_platform_tests
- <<: *py36_osx_platform_tests
- <<: *py27_jvm_tests
- <<: *py36_jvm_tests
- <<: *deploy_stable_multiplatform_pex
- <<: *deploy_unstable_multiplatform_pex
deploy:
# Deploy whatever a previous stage has left in dist/deploy.
# See: https://docs.travis-ci.com/user/deployment/s3/