-
-
Notifications
You must be signed in to change notification settings - Fork 395
/
Copy path.travis.yml
90 lines (79 loc) · 2.5 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
os: linux
dist: focal
language: python
cache: pip
python:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
arch:
- amd64
- arm64
env:
global:
LIBGIT2: ~/install/
LD_LIBRARY_PATH: ${LIBGIT2}/lib:${LD_LIBRARY_PATH}
LIBGIT2_VERSION: "1.1"
jobs:
allow_failures:
- arch: s390x
include:
- python: pypy3
arch: amd64
- python: 3.6
arch: s390x
- stage: &deploy_stage Publish to PyPI (runs only for tagged commits)
name: >-
OS-specific manylinux wheels
python: "3.7"
services:
- docker
before_install: []
install: skip
script: &docker-script
- travis/build-all-manylinux-wheels.sh "${LIBGIT2_VERSION}"
- ls -alh dist
before_deploy:
- ls dist
- pip install twine
- twine check dist/*
deploy:
provider: pypi
# `skip_cleanup: true` is required to preserve binary wheels, built
# inside of manylinux docker container during `script` step above.
skip_cleanup: true
# `skip_existing: true` is required to skip uploading dists, already
# present in PYPI instead of failing the whole process.
# This happens when other CI (AppVeyor etc.) has already uploaded
# the very same dist (usually sdist).
skip_existing: true
username: jdavid
password:
# Encrypted with `travis encrypt <password> -r libgit2/pygit2`
secure: "j/4klKkq6sJuPEYwA1n5PD1Z02SbfTwt9Jj1omnOUOzVv3njJ73IHHELvIxtn18yj8uIKs8XpCUbpMKFGdWzc/WNj8xQPHVaRIlCrKVbZiUH/zfbuWOWlKlSEbNZ5+vVsnNbTN1FEwxDV9+CQKsibUG2Y1OzBqLx1gBSRpjq+ro="
# Although Travis CI instructs `setup.py` to build source distribution,
# which is default value for distribution option (`distribution: sdist`),
# it will also upload all wheels we've previously built in manylinux
# docker container using `twine upload -r pypi dist/*` command.
# Also since commit https://github.com/travis-ci/dpl/commit/90b5e39
# it is default that Travis PYPI provider has `skip_upload_docs: true`
# set by default.
# Besides above, we don't do cleanup of `dist/*`, because it's being done
# by Travis CI PYPI deployment provider after upload, unconditionally.
on:
tags: true
all_branches: true
before_install:
- sudo apt-get -y install cmake
- ./.travis.sh "${LIBGIT2_VERSION}"
install:
- python setup.py egg_info
- pip install -r pygit2.egg-info/requires.txt
- python setup.py build_ext --inplace
script:
- pytest
stages:
- test
- name: *deploy_stage
if: tag IS present OR type IN (cron, api)