-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy path.travis.yml
129 lines (109 loc) · 4.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
# vim:ts=2:sts=2:sw=2:et
#
# Author: Hari Sekhon
# Date: 2014-11-29 01:02:47 +0000 (Sat, 29 Nov 2014)
#
# https://github.com/HariSekhon/lib
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback
# to help improve or steer this or other code I publish
#
# https://www.linkedin.com/in/HariSekhon
#
# ============================================================================ #
# T r a v i s C I
# ============================================================================ #
# https://docs.travis-ci.com/user/customizing-the-build/
---
# XXX: sets language to Ruby and breaks build
version: ~> 1.0
# ===============================================
# https://docs.travis-ci.com/user/languages/perl/
language: perl
perl:
# this build has thread support
- "5.26-shrplib"
#- "5.22"
#- "5.18-shrplib"
#- "5.16"
# latest Redis cpan module requires Perl >= 5.10
- "5.10"
# there is workaround in build now to install older version if latest fails for RHEL5/CentOS5 servers
#- "5.8"
# =========================================
# https://docs.travis-ci.com/user/multi-os/
os:
- linux
- osx
# https://docs.travis-ci.com/user/reference/osx/
# macOS 10.15.7 - otherwise defaults to Mac macOS 10.13 with xcode9.4 otherwise - and HomeBrew update takes 50 minutes until the build times out :-/
osx_image: xcode12.2
# =============================================
# https://docs.travis-ci.com/user/build-matrix/
# https://docs.travis-ci.com/user/build-stages/matrix-expansion/
#matrix:
# allow_failures:
# - os: osx
# ======================================================
# https://docs.travis-ci.com/user/environment-variables/
env:
#- DEBUG=1 PYTHONUNBUFFERED=1
- PYTHONUNBUFFERED=1
# ==============================================
# https://docs.travis-ci.com/user/notifications/
notifications:
email: false
# =================================================================================
# https://docs.travis-ci.com/user/customizing-the-build/#building-specific-branches
# https://docs.travis-ci.com/user/conditional-builds-stages-jobs
#branches:
# only:
# - master
# ========================================
# https://docs.travis-ci.com/user/caching/
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log
cache:
- pip
- directories:
- $HOME/.cache
- $HOME/.cpan
- $HOME/.cpanm
- $HOME/.gem
- bash-tools/pytools_checks
# ==============================================
# https://docs.travis-ci.com/user/job-lifecycle/
# avoid package checksum mismatches when installing packages
before_install:
- sudo rm -f "${TRAVIS_ROOT}/etc/apt/apt.conf.d/99-travis-apt-proxy"
- sudo rm -rf "${TRAVIS_ROOT}/var/lib/apt/lists/"*
install:
# "cpanm ." causes: No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself.
#- cpanm --installdeps --notest . || echo CPANM FAILED
# --installdeps only does dep modules, leaving others to be fully tested and compiled by make's regular cpan, which is slow and doing only "cpan --verbose --notest ." results in calling Makefile.PL and then make, again falling back to the slow original cpan, so now changed core Makefile to get cpanm and then use that for all modules
- travis_retry make
script:
#- PERL5OPT=-MDevel::Cover=-coverage,statement,branch,condition,path,subroutine prove -lrsv t
- python -V
- which pip || sudo easy_install pip
#- which pip || sudo apt-get update && sudo apt-get install -y python-pip
- pip -V
- travis_retry make test
# sends to sonarcloud using above addon and secure token
- sonar-scanner
after_success:
- echo "After Success:"
# -report is parsed as a map and dropped otherwise
- "cover -report coveralls || :"
after_failure:
- echo "After Failure"
#- for x in /home/travis/.cpanm/work/*/build.log; do echo "uploading $x"; curl -sT "$x" transfer.sh || :; curl -sT "$x" chunk.io || :; done
# ===========================================
# https://docs.travis-ci.com/user/sonarcloud/
addons:
sonarcloud:
organization: "harisekhon"
token:
secure: "FnwL0C+BAUWUGz5wWZJeW3Wxi2eRAMgTNPghCFQYtmwLrvOa76j4tV3lqMtbXYqa32HkCJYqmo7T0Mj/oGAr+dqbxHD/mj3Qh24Xw1F0QydRM0WWbPen6bcp0jis+4VlNxZSBHJ62fHYrVF2p2v9/rtH+Ifc/kDGs+7ZdYjgbuw="