summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: b4aa93027be5ca37539869202d8bf2759b4ff040 (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
language: python
python:
  - "2.7"
  - "3.4"
  - "3.5"
  - "3.6"
  - "3.7"
  - "3.8"
  - "pypy"
  - "pypy3"

jobs:
  include:
    - if: tag =~ /^([0-9]+\.[0-9]+\.[0-9]+)(\.?(dev|a|b|rc)[0-9]+)?$/
      name: "Linux wheels"
      services:
        - "docker"
      python: "3.8"
      install:
        - python3 -m pip install cibuildwheel==1.3.0 twine virtualenv
        - "make jq.c"
      script:
        - export CIBW_TEST_REQUIRES="-r test-requirements.txt"
        - export CIBW_TEST_COMMAND="nosetests {project}/tests"
        - python3 -m cibuildwheel --output-dir wheelhouse
        - twine check wheelhouse/*
        - twine upload wheelhouse/*.whl

    - if: tag =~ /^([0-9]+\.[0-9]+\.[0-9]+)(\.?(dev|a|b|rc)[0-9]+)?$/
      name: "OS X wheels"
      os: osx
      osx_image: xcode11.2
      language: "shell"
      install:
        - python3 -m pip install cibuildwheel==1.3.0 twine virtualenv
        - "make jq.c"
      script:
        - export CIBW_TEST_REQUIRES="-r test-requirements.txt"
        - export CIBW_TEST_COMMAND="nosetests {project}/tests"
        - python3 -m cibuildwheel --output-dir wheelhouse
        - twine check wheelhouse/*
        - twine upload wheelhouse/*.whl

env:
  global:
    - TWINE_USERNAME=__token__
    # Note: TWINE_PASSWORD is set to a PyPI API token in Travis settings

install:
  - "make jq.c"
  - "pip install tox"
script: tox -e py