language: python env: global: - PIP_CACHE_DIR="$HOME/.cache/pip" # unify pip cache location for all platforms - TOXENV=py # 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 # skip local branches (assumed built via PR) if: type != push OR tag IS NOT blank OR branch = master OR branch = devel OR repo != tqdm/tqdm stages: - test - name: deploy if: repo = tqdm/tqdm AND NOT type = pull_request jobs: include: - stage: test name: py2.6 python: 2.6 env: TOXENV=py26 dist: trusty - name: py2.7 python: 2.7 - name: py3.4 python: 3.4 env: TOXENV=py34 - name: py3.5 python: 3.5 - name: py3.6 python: 3.6 - name: py3.7 python: 3.7 - name: py3.8 python: 3.8 - name: tf-no-keras python: 3.7 env: TOXENV=tf-no-keras - name: pypy2.7 python: pypy2.7-7.3.1 env: CRYPTOGRAPHY_ALLOW_OPENSSL_102=1 - name: pypy3.6 python: pypy3.6-7.3.1 env: TOXENV=pypy3 - name: py2.7-osx os: osx language: shell - name: py3.7-osx os: osx osx_image: xcode11.2 language: shell install: - pip3 install tox - pip3 install . - 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:%d%n- %s%n%b---' $(git tag --sort=v:refname | 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: review-tools channel: stable - name: lxd channel: stable env: - SNAPCRAFT_IMAGE_INFO: | '{"build_url": "$TRAVIS_JOB_WEB_URL"}' - SNAPCRAFT_BUILD_ENVIRONMENT: lxd - SNAPCRAFT_BUILD_INFO: 1 # https://snapcraft.io/blog/introducing-developer-notifications-for-snap-security-updates before_install: - sudo usermod --append --groups lxd $USER - sudo /snap/bin/lxd.migrate -yes - sudo /snap/bin/lxd waitready - sudo /snap/bin/lxd init --auto install: - make snapcraft.yaml script: - sg lxd -c snapcraft 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