aboutsummaryrefslogtreecommitdiff
blob: 9a0cd8a3ad6f776b58ac0bed48d367bc96a99888 (plain)
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
dist: bionic
language: python
python:
- 3.6
- 3.7
- 3.8
addons:
  apt:
    packages:
    - install-info
cache:
  pip: true
  directories:
  - $HOME/downloads

install:
- pip install -U pip tox codecov
before_script:
- git clone https://github.com/pkgcore/pkgdist.git
- pkgdist/ci.sh
# Make sure the actual install-info binary is first in PATH since
# Debian-based distros use a wrapper script that outputs warnings and
# breaks the info file merge trigger test.
- mkdir texinfo
- ln -s /usr/bin/ginstall-info texinfo/install-info
- export PATH=$PWD/texinfo:$PATH
script: tox -e travis
after_success:
# upload coverage data
- tox -e coverage-report
- codecov

stages:
  - name: test
    if: NOT branch IN (lint, deploy)
  - name: deploy
    if: (type = api) OR (branch = deploy) OR (tag IS present)

jobs:
  include:
    # push tarball and wheels to pypi
    - stage: deploy
      sudo: required
      services:
      - docker
      env:
      - secure: VbHW1pmzwc3LtJ4JYivarXMdsAE/MfitddnyYSZs+qBLxPevv967WuXZBeJgEak913bLj9Ku9YoxH8OHxu4uACU1rLNo48y0DMm0qtiGHx2sTmevDwIRflLIx/aJiS5OAuJZ4jY79HKPIfgObfZwO5awRzs8Afhlqg5xIFiWhiQ=
      - secure: j/lUk3RkNuas+wiMdoWsC2j7emirtMRz6G/4OVUf1+X9aFLSLo5jpY8C4yZJPb0FuCdYEjfKsq6aMOADwwMg6aXbXj+u5frqhUYAqBELR85G7gRBoLzcqj9YaRVsiIf9rF14xlueCM2cK08rDlkJwHr4fQZkNBZnbZ5+8MvwsO0=
      - CIBW_PLATFORM=linux
      - CIBW_BUILD="cp36-* cp37-* cp38-*"
      - CIBW_BEFORE_BUILD="tar -xf /host/$HOME/downloads/\$(uname -m)/*.tar.gz -C / && pip install -r requirements/wheel.txt"
      - CIBW_ENVIRONMENT="PATH=/opt/bin:\$PATH"
      - CIBW_TEST_COMMAND="pip install -r {project}/requirements/test.txt && py.test {project}/tests"
      before_script:
      - git clone https://github.com/pkgcore/pkgdist.git
      - pkgdist/ci.sh
      script: pkgdist/build-dist-files.sh
      after_success:

    # push tarball to github
    - stage: deploy
      before_script:
      - git clone https://github.com/pkgcore/pkgdist.git
      - pkgdist/ci.sh
      - pip install -r requirements/sdist.txt
      script: python setup.py sdist -v
      after_success: tar -ztf dist/*.tar.gz | sort
      deploy:
        provider: releases
        api_key:
          secure: Bjyyu2UK3MzH0x0QvKIr/IYfxJEjbc+B43fnP++7rAIjiojckPFJavh5p4ausM/6XjDyJtAFkYBZ6z1f4H5/MR+GJUFl9hN+SZWGO5PuzzxjExxnfq0/ZxHAIWNvfTYoE1Y/8cefPg+DexLILSLFsp3DnX1Zrp5AWmwXaSjesJ0=
        file_glob: true
        file: dist/*.tar.gz
        skip_cleanup: true
        on:
          tags: true