language: python env: global: - PIP_CACHE_DIR="$HOME/.cache/pip" # unify pip cache location for all platforms # use cache for big builds like pandas (to minimise build time). # If issues, clear cache # https://docs.travis-ci.com/user/caching/#Clearing-Caches cache: pip: true directories: - $HOME/.cache/pip before_cache: - rm -f $HOME/.cache/pip/log/debug.log notifications: email: false # branches: # remove travis double-check on pull requests in main repo # only: # - master # - /^\d\.\d+$/ stages: - check - test - name: deploy if: repo = tqdm/tqdm AND NOT type = pull_request - name: development if: false jobs: allow_failures: - stage: development include: - stage: test name: py2.6 python: 2.6 env: TOXENV=py26 dist: trusty - name: py2.7 python: 2.7 env: TOXENV=py27 - name: py3.4 python: 3.4 env: TOXENV=py34 - name: py3.5 python: 3.5 env: TOXENV=py35 - name: py3.6 python: 3.6 env: TOXENV=py36 - name: py3.7 python: 3.7 env: TOXENV=py37 - name: tf-no-keras python: 3.7 env: TOXENV=tf-no-keras - name: pypy2.7 python: pypy2.7-5.10.0 env: TOXENV=pypy - name: pypy3.5 python: pypy3.5-5.10.0 env: TOXENV=pypy3 - stage: development name: py2.7-win os: windows language: shell env: TOXENV=py27 before_install: &before_install_win - | if [[ "$TOXENV" == "py37" ]]; then choco install python --version 3.7.4 export PATH="/c/Python37:/c/Python37/Scripts:$PATH" else choco install python2 export PATH="/c/Python27:/c/Python27/Scripts:$PATH" fi - python -m pip install -U pip setuptools wheel install: &install_win - python -m pip install tox - python -m pip install . script: &script_win - python -m tox - name: py3.7-win os: windows language: shell env: TOXENV=py37 before_install: *before_install_win install: *install_win script: *script_win - name: py2.7-osx os: osx language: shell env: TOXENV=py27 - name: py3.7-osx os: osx osx_image: xcode11.2 # py3.7 language: shell env: TOXENV=py37 - stage: check name: style python: 3.7 env: TOXENV=flake8 - name: setup python: 3.7 env: TOXENV=setup.py - name: perf python: 3.7 env: TOXENV=perf - stage: deploy name: PyPI and GitHub python: 3.7 addons: apt: packages: - pandoc install: script: - pip install .[dev] - make build #- make submodules #- cd wiki && make && cd .. - openssl aes-256-cbc -K $encrypted_a6d6301302b7_key -iv $encrypted_a6d6301302b7_iv -in .meta/.tqdm.gpg.enc -out .tqdm.gpg -d - gpg --import .tqdm.gpg - rm .tqdm.gpg - git log --pretty='format:- %s%n%b---' $(git tag --sort=creatordate | tail -n2 | head -n1)..HEAD > CHANGES.md deploy: - provider: script script: twine upload -s -i tqdm@caspersci.uk.to dist/tqdm-* skip_cleanup: true on: tags: true - provider: releases api_key: $GITHUB_TOKEN file_glob: true file: dist/tqdm-*.whl* skip_cleanup: true draft: true name: tqdm $TRAVIS_TAG stable edge: true tag_name: $TRAVIS_TAG target_commitish: $TRAVIS_COMMIT release_notes_file: CHANGES.md on: tags: true - name: docker python: 3.7 services: - docker install: script: - echo "$DOCKER_PWD" | docker login -u $DOCKER_USR --password-stdin - echo "$GITHUB_TOKEN" | docker login docker.pkg.github.com -u $GITHUB_USR --password-stdin - make -B docker - | if [[ -n "$TRAVIS_TAG" ]]; then docker tag tqdm/tqdm:latest tqdm/tqdm:${TRAVIS_TAG#v} docker tag tqdm/tqdm:latest docker.pkg.github.com/tqdm/tqdm/tqdm:${TRAVIS_TAG#v} ; fi - docker tag tqdm/tqdm:latest tqdm/tqdm:devel - docker tag tqdm/tqdm:latest docker.pkg.github.com/tqdm/tqdm/tqdm:latest - docker tag tqdm/tqdm:latest docker.pkg.github.com/tqdm/tqdm/tqdm:devel deploy: - provider: script script: docker push tqdm/tqdm:${TRAVIS_TAG#v} on: tags: true - provider: script script: 'docker push docker.pkg.github.com/tqdm/tqdm/tqdm:${TRAVIS_TAG#v} || :' on: tags: true - provider: script script: docker push tqdm/tqdm:latest - provider: script script: 'docker push docker.pkg.github.com/tqdm/tqdm/tqdm:latest || :' - provider: script script: docker push tqdm/tqdm:devel on: branch: devel - provider: script script: 'docker push docker.pkg.github.com/tqdm/tqdm/tqdm:devel || :' on: branch: devel - name: snap python: 3.7 addons: snaps: - name: snapcraft channel: stable confinement: classic - name: lxd channel: stable env: - SNAPCRAFT_IMAGE_INFO: '{"build_url": "$TRAVIS_BUILD_URL"}' before_install: - sudo /snap/bin/lxd.migrate -yes - sudo /snap/bin/lxd waitready - sudo /snap/bin/lxd init --auto install: - make snapcraft.yaml script: - sudo snapcraft --use-lxd after_failure: - sudo journalctl -u snapd deploy: - provider: snap snap: tqdm*.snap channel: stable skip_cleanup: true on: tags: true - provider: snap snap: tqdm*.snap channel: candidate skip_cleanup: true - provider: snap snap: tqdm*.snap channel: edge skip_cleanup: true on: branch: devel before_install: # fix a crash with multiprocessing on Travis # - sudo rm -rf /dev/shm # - sudo ln -s /run/shm /dev/shm - git fetch --tags install: - pip install tox - pip install . script: - tox