retworkx 0.3.2

A python graph library implemented in Rust
Documentation
---
stage_osx: &stage_osx
  os: osx
  language: generic
  cache:
    pip: true
    directories:
      - ~/python-interpreters/
  before_install:
    # Travis does not provide support for Python 3 under osx - it needs to be
    # installed manually.
    - |
      if [[ ! -d ~/python-interpreters/$PYTHON_VERSION ]]; then
        git clone git://github.com/pyenv/pyenv.git
        cd pyenv/plugins/python-build
        ./install.sh
        cd ../../..
        python-build $PYTHON_VERSION ~/python-interpreters/$PYTHON_VERSION
      fi
      sudo pip2 install -U virtualenv pip setuptools
      virtualenv --python ~/python-interpreters/$PYTHON_VERSION/bin/python venv
      source venv/bin/activate
    - which python
    - sh tools/install_rust.sh
    - export PATH=~/.cargo/bin:$PATH
  install:
    - pip install -U .
  script:
    - cd tests && python -m unittest discover .
notifications:
  email: false
os: linux
language: python
cache: pip
dist: bionic
before_install:
  - which python
  - sh tools/install_rust.sh
  - export PATH=~/.cargo/bin:$PATH
  - which python
  - pip install -U pip virtualenv
install:
  - virtualenv test-venv
  - test-venv/bin/pip install -U .
script:
  - cd tests && ../test-venv/bin/python -m unittest discover .
stages:
  - name: Compile and rustfmt
    if: tag IS blank
  - name: Linux x86_64
    if: tag IS blank
  - name: Linux non-x86_64
    if: tag IS blank
  - name: macOS
    if: tag IS blank
  - name: deploy
    if: tag IS present

jobs:
  fast_finish: true
  include:
    - name: Compile and rustfmt
      language: rust
      stage: Compile and rustfmt
      before_install: echo ""
      install: echo ""
      before_script:
        - rustup update
        - rustup component add rustfmt
        - rustup override set nightly-2020-02-06
        - rustup component add rustfmt
      script:
        - cargo build
        - cargo fmt -- --check
    - name: Python 3.5 Tests Linux
      stage: Linux x86_64
      python: 3.5
    - name: Python 3.6 Tests Linux
      stage: Linux x86_64
      python: 3.6
    - name: Python 3.7 Tests Linux
      stage: Linux x86_64
      python: 3.7
    - name: Python 3.8 Tests Linux
      stage: Linux x86_64
      python: 3.8
    - name: Python 3.7 Tests ppc64le Linux
      stage: Linux non-x86_64
      python: 3.7
      arch: ppc64le
    - name: Python 3.7 Tests s390x Linux
      stage: Linux non-x86_64
      python: 3.7
      arch: s390x
    - name: Python 3.7 Tests arm64 Linux
      stage: Linux non-x86_64
      python: 3.7
      arch: arm64
    - name: Python 3.5 Tests OSX
      stage: macOS
      <<: *stage_osx
      env:
        - PYTHON_VERSION=3.5.8
    - name: Python 3.6 Tests OSX
      stage: macOS
      <<: *stage_osx
      env:
        - PYTHON_VERSION=3.6.9
    - name: Python 3.7 Tests OSX
      stage: macOS
      <<: *stage_osx
      env:
        - PYTHON_VERSION=3.7.5
    - name: Python 3.8 Tests OSX
      stage: macOS
      <<: *stage_osx
      env:
        - PYTHON_VERSION=3.8.0

    - stage: deploy
      services:
        - docker
      before_install:
        - echo ""
      install:
        - echo ""
      env:
        - CIBW_BEFORE_BUILD="pip install -U setuptools-rust && yum install -y wget && tools/install_rust.sh"
        - CIBW_SKIP="cp27-* cp34-*"
        - CIBW_ENVIRONMENT='PATH="$PATH:$HOME/.cargo/bin"'
        - TWINE_USERNAME=retworkx-ci
        - CIBW_TEST_COMMAND="python -m unittest discover {project}/tests"
      if: tag IS present
      script:
        - sudo pip install -U cibuildwheel==1.1.0 twine
        - cibuildwheel --output-dir wheelhouse
        - twine upload wheelhouse/*
    - stage: deploy
      python: 3.7
      before_install:
        - echo ""
      install:
        - echo ""
      env:
        - TWINE_USERNAME=retworkx-ci
      before_script:
        - pip install -U twine
      if: tag IS present
      script:
        - python setup.py sdist
        - twine upload dist/*
    - stage: deploy
      arch: arm64
      services:
        - docker
      before_install:
        - echo ""
      install:
        - echo ""
      env:
        - CIBW_BEFORE_BUILD="pip install -U setuptools-rust && yum install -y wget && tools/install_rust.sh"
        - CIBW_SKIP="cp27-* cp34-*"
        - CIBW_ENVIRONMENT='PATH="$PATH:$HOME/.cargo/bin"'
        - TWINE_USERNAME=retworkx-ci
        - CIBW_TEST_COMMAND="python -m unittest discover {project}/tests"
      if: tag IS present
      script:
        - sudo pip install -U twine
        - git clone https://github.com/joerick/cibuildwheel.git
        - sudo pip install ./cibuildwheel
        - cibuildwheel --output-dir wheelhouse
        - twine upload wheelhouse/*
    - stage: deploy
      arch: ppc64le
      services:
        - docker
      before_install:
        - echo ""
      install:
        - echo ""
      env:
        - CIBW_BEFORE_BUILD="pip install -U setuptools-rust && yum install -y wget && tools/install_rust.sh"
        - CIBW_SKIP="cp27-* cp34-*"
        - CIBW_ENVIRONMENT='PATH="$PATH:$HOME/.cargo/bin"'
        - TWINE_USERNAME=retworkx-ci
        - CIBW_TEST_COMMAND="python -m unittest discover {project}/tests"
      if: tag IS present
      script:
        - sudo pip install -U twine
        - git clone https://github.com/joerick/cibuildwheel.git
        - sudo pip install ./cibuildwheel
        - cibuildwheel --output-dir wheelhouse
        - twine upload wheelhouse/*
    - stage: deploy
      os: osx
      language: generic
      if: tag IS present
      before_install:
        - echo ""
      install:
        - echo ""
      env:
        - CIBW_BEFORE_BUILD="pip install -U setuptools-rust && tools/install_rust.sh"
        - CIBW_SKIP="cp27-* cp34-*"
        - CIBW_ENVIRONMENT='PATH="$PATH:$HOME/.cargo/bin"'
        - TWINE_USERNAME=retworkx-ci
        - CIBW_TEST_COMMAND="python -m unittest discover {project}/tests"
      script:
        - sudo pip2 install -U cibuildwheel==1.1.0 twine
        - cibuildwheel --output-dir wheelhouse
        - twine upload wheelhouse/*