forked from travis-ci/cpython-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
167 lines (156 loc) · 4.92 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
language: __sardonyx__
stages:
- build
stage: build
jobs:
include:
- language: bash
dist: freebsd
name: freebsd
os: freebsd
group: dev
install:
- pushd /opt/pyenv/
- sudo git checkout master
- sudo git pull
- popd
- sudo python -m pip install virtualenv==20.0.2
- language: ruby
dist: focal
group: edge
name: focal
os: linux
- language: minimal
dist: bionic
group: dev
name: bionic
os: linux
- language: minimal
dist: xenial
group: edge
name: xenial
os: linux
- dist: trusty
name: trusty
os: linux
if: NOT env(VERSION) =~ -dev$ AND NOT env(VERSION) =~ /^3\.([789]|1\d+)/
- dist: precise
name: precise
os: linux
if: NOT env(VERSION) =~ -dev$ AND NOT env(VERSION) =~ ^pypy AND NOT env(VERSION) =~ /^3\.([789]|1\d+)/
- arch: ppc64le
dist: xenial
name: xenial-ppc64le
os: linux
language: minimal
- arch: ppc64le
dist: bionic
name: bionic-ppc64le
os: linux
language: minimal
- arch: ppc64le
dist: focal
name: focal-ppc64le
os: linux
- arch: s390x
dist: xenial
name: xenial-s390x
os: linux
language: minimal
- arch: s390x
dist: bionic
name: bionic-s390x
os: linux
language: minimal
- arch: s390x
dist: focal
name: focal-s390x
os: linux
language: minimal
- arch: arm64
dist: xenial
name: xenial-arm64
language: minimal
- arch: arm64
dist: bionic
name: bionic-arm64
language: minimal
- arch: arm64
dist: focal
name: focal-arm64
language: minimal
allow_failures:
- name: freebsd
env:
global:
- VERSION=3.8-dev
# - ALIAS=nightly
install:
- pushd /opt/pyenv/
- sudo git checkout master
- sudo git pull
- popd
# As of this writing:
# * Py2 is EOL
# * however, pip (https://pip.pypa.io/en/latest/development/release-process/#python-2-support) intends to keep supporting it as long as practical
# * Virtualenv also supports old versions (e.g. 3.4) far longer than PSF does
# * all images have `virtualenv` on PATH but vary in whether it's per-user or global and which Python installation it belongs to
# * some of these preinstalled `virtualenv`s don't support 3.9+
# * selected amd64 images have 3.7.* preinstalled with pip; multiarch have pyenv not on PATH, with no alt versions
# * xenial's provided Py3, 3.5, is in security fixes mode, due for EOL in 06.2020
#
# So it seems to be safe to use `virtualenv` with system's Py2 if we update it, for the foreseeable future.
# FIXME: use an officially supported alt Python version for `virtualenv` instead once one is available in all images.
- |
# `cat` avoids "broken pipe"; `freeze` instead of `list` avoids a warning about future output format change
if (python -m pip freeze --user | cat | grep -qP '^virtualenv=='); then
python -m pip install --upgrade --user virtualenv
elif (python -m pip freeze | cat | grep -qP '^virtualenv=='); then
sudo python -m pip install --upgrade virtualenv
else
sudo python -m pip install virtualenv
fi
before_script:
- 'export INSTALL_DEST=${INSTALL_DEST:-/opt/python}'
- 'export LSB_RELEASE=${LSB_RELEASE:-$(lsb_release -rs || if [[ $(uname -a) == *"FreeBSD"* ]]; then echo $(uname -r | rev | cut -c9- | rev); else false; fi || echo ${$(sw_vers -productVersion)%*.*})}'
- 'export OS_NAME=${OS_NAME:-$((lsb_release -is || if [[ $(uname -a) == *"FreeBSD"* ]]; then echo $(uname | cut -c1-); else false; fi || echo "osx") | tr "A-Z" "a-z")}'
- 'export ARCH=${ARCH:-$(uname -m)}'
# pipenv is supported for python 2.7 and 3.4 and higher.
- 'export PACKAGES=${PACKAGES:-pip nose pytest mock wheel pipenv}'
- export PYTHON_CONFIGURE_OPTS="--with-wide-unicode --enable-shared --enable-ipv6 --enable-loadable-sqlite-extensions --with-computed-gotos $CONFIGURE_OPTS"
- sudo chown -R $USER $HOME/.cache
- |
if [[ $VERSION = pypy*-dev ]]; then
if ! [[ -f ~/virtualenv/pypy/bin/activate ]]; then
curl -O https://s3.amazonaws.com/travis-python-archives/binaries/ubuntu/$(lsb_release -rs)/x86_64/pypy2.7-5.9.0.tar.bz2
sudo tar xf pypy*.tar.bz2 -C /
fi
source ~/virtualenv/pypy/bin/activate
python --version
fi
script: ./bin/compile
after_success: ./bin/archive
after_failure: cat /tmp/python-build.*.log
addons:
apt:
packages:
- openssl
- libssl-dev
- mercurial
- python3-pip
artifacts:
paths:
- $LSB_RELEASE/
target_paths:
- /binaries/$OS_NAME/$LSB_RELEASE/$ARCH
branch:
- default
cache_control: public
notifications:
email: false
slack:
rooms:
secure: "ZZb1XxoEiVqSUYTwQDxDLasQwVyF5s2FUoTI4Hcf66GGr50seBgWvcHpCkbtDbntluoyUB/s9MyuVAsIq/tIu+z2EQpKQN8PGZXYZEb2DzEkRbekyUx4MQufvY3mbIwv69SSs12uq90Ce2R3S+okPvbjCB7HzEufW9wvtl6TwME="
on_success: never
on_failure: always
on_pull_requests: false