From 8434b41e3af09a6ea6ce8773502297bcc465f2a2 Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Sun, 15 Sep 2019 17:57:18 -0700 Subject: [PATCH] ci: remove Travis CI Azure Pipelines now does everything we were doing in Travis. And with this, we now have a single CI system! --- .travis.yml | 152 ------------------------------------------ NEWS.rst | 2 +- README.rst | 7 +- ci/download-travis.py | 64 ------------------ ci/travis-build.sh | 81 ---------------------- ci/travis-install.sh | 32 --------- 6 files changed, 3 insertions(+), 335 deletions(-) delete mode 100644 .travis.yml delete mode 100644 ci/download-travis.py delete mode 100644 ci/travis-build.sh delete mode 100644 ci/travis-install.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 18d2bb7a..00000000 --- a/.travis.yml +++ /dev/null @@ -1,152 +0,0 @@ -stages: - - build - - test - -matrix: - include: - - stage: build - language: generic - os: linux - env: - - BUILDMODE=manylinuxwheels - - ARTIFACT_PATH=manylinuxwheels - sudo: required - services: - - docker - - - stage: build - language: generic - os: osx - env: - - BUILDMODE=macoswheels - - ARTIFACT_PATH=macos - - - stage: build - language: python - os: linux - python: 2.7 - env: - - BUILDMODE=tox - - ARTIFACT_PATH=tox/2.7 - - - stage: build - language: python - os: linux - python: 3.5 - env: - - BUILDMODE=tox - - ARTIFACT_PATH=tox/3.5 - - - stage: build - language: python - os: linux - python: 3.6 - env: - - BUILDMODE=tox - - ARTIFACT_PATH=tox/3.6 - - - stage: build - language: python - os: linux - python: 3.7 - dist: xenial - sudo: required - env: - - BUILDMODE=tox - - ARTIFACT_PATH=tox/3.7 - - - stage: build - language: python - os: linux - python: 3.8-dev - dist: xenial - sudo: required - env: - - BUILDMODE=tox - - ARTIFACT_PATH=tox/3.8-dev - - - stage: build - language: python - os: linux - python: nightly - env: - - BUILDMODE=tox - - ARTIFACT_PATH=tox/nightly - - - stage: build - language: python - os: linux - python: 2.7 - env: - - BUILDMODE=conda - - ARTIFACT_PATH=conda/2.7 - - - stage: build - language: python - os: linux - python: 3.7 - dist: xenial - sudo: required - env: - - BUILDMODE=conda - - ARTIFACT_PATH=conda/3.7 - - - stage: test - language: python - os: linux - python: 2.7 - env: - - BUILDMODE=manylinuxtest - - - stage: test - language: python - os: linux - python: 3.5 - env: - - BUILDMODE=manylinuxtest - - - stage: test - language: python - os: linux - python: 3.6 - env: - - BUILDMODE=manylinuxtest - - - stage: test - language: python - os: linux - python: 3.7 - dist: xenial - sudo: required - env: - - BUILDMODE=manylinuxtest - -env: - global: - # Enable fuzzing tests, other expensive tests. - - ZSTD_SLOW_TESTS=1 - - ZSTD_WARNINGS_AS_ERRORS=1 - - # This tells Hypothesis to work harder than it does by default. - - HYPOTHESIS_PROFILE=ci - - - ARTIFACTS_BUCKET=python-zstandard - - ARTIFACTS_PERMISSIONS=public-read - - # ARTIFACTS_KEY - - secure: nB7QXvYTQ+60WW8sh+JQSmBGI9EvXEigbhpmyjqCM5MZhnIQlWDXU/Ts2GbBZ75vTfYvOsDeVnOgL4yNbw3QiGAfntXHXSRLVPVWMg8hNLSO2FgQh/Ytw5XkYbVGnQve8giK5ZWgO877qMGepYrvtpIjIZbZ0fLfyVCMIKTJzYqewnH5EMzvsMxbxWe2Ojxd47DSmQkPlk6qHXupZ1t2FrCxcioXnWvwwVOAZWTvqMmgOtT3S/xRbZ1+US69LFebHcsusIOL7VzYunaTAgtOJUrS/QbW0ddbctM4qHSYIpwe/iQiGsWNsyJrViGAWg0r3SJr24bqjAzRSvNEwDvs9FhbQVcdZOKrH1KB/h34FkyQFQl+GuG7D4gZY8Eth8zW8p+Cz+SJHoiXjsCGdsmm+bPlKoZC4tJTzUtUmbpDt22BEbKqRObWIYQWLDQ6Keh7B4/tuGvl1r3cvsf/p66V8jwtpYP8papinjKYEwWCvPWBungpRcZ54ohPEmGOBer/nVTteZ9Q4rHBOlNu6Q1s2MooRHo+2K3u3aa43tFVgEi5XViC56g+KfQgB9Q2w6E8Vvj/enmDHKAhWlyFp7aliOXqzJBfFZluKwaccRsr/yaskNlSXdnRZS8/+m/oA7CnubpCh+fRPk6jf4g/l8fqw5spxx2f0lHEzfG243Vo4Q8= - # ARTIFACTS_SECRET - - secure: swX8M1dhvPirn69pSNzbmfuVi6asetIq49amJyGsIX0HyRHeUxS+ZOZrWTPXQhKWJJvKe+utToe7FFZH8xl7g8GtcQS0ufM41ScXCIMXDKsqtaBR2ISqKpHt7uHuO5J10DdDvdVekjUQRYkGDq6yIPheOudMgIAZzlTOVUUTfk/NWmmClW0VOI8yeusxNpVE2mNUXQ3ZElticVaHmmPrxqh9e3MXrhA7oe6j+IGtO18Cer5K97hQMRA8O5Sc6WAkYjcP757gZYWYiTLkC2Ifnud4PVJkkqH7vekDr97GnxFrt4u5ysZW3Aw124CYuc5fFtjWJsg/tV2/2qvwnqAtPVC0RGl98ztpEEldL2fyVc3EfQ47n4qvBnPNF2zo+To3eTIzEEZiPBrlrxhpq1GxVgo9ui8VsawPGEPtKu+qQ17JqIry5r4Wmk88mnIMblMxPGJ9+IQHvfJRMxNhREQXW8bBKHcIqJe1qZqidLdGGm7KhUUlIPRP28gqVL7U7s6RM2bGjBnRah8xixrM28K49Wrh5Ys+zYaqEI+zf6vQFapwgRAacoFvDrIjiTBzu8thJYhmhKbraTCkA8Ramaq0vhZK625ORjG9L8HR8jH05nqeGHgFi4H/VuR4nTRiRgO9ar9Ersp74zKh5rZqG7o0J/OSRHbqnABfLBzBGMP60wc= - -install: - - source ci/travis-install.sh - -script: - - source ci/travis-build.sh - -addons: - artifacts: - s3_region: "us-west-2" - target_paths: "/travis/${TRAVIS_BUILD_NUMBER}/${ARTIFACT_PATH}" - paths: - - $(ls dist/* | tr "\n" ":") diff --git a/NEWS.rst b/NEWS.rst index d122ac09..d99490ec 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -87,7 +87,7 @@ Bug Fixes Changes ------- -* Windows CI transitioned to Azure Pipelines (from AppVeyor). +* CI transitioned to Azure Pipelines (from AppVeyor and Travis CI). * Switched to ``pytest`` for running tests (from ``nose``). * Bundled zstandard library upgraded from 1.3.8 to 1.4.3. diff --git a/README.rst b/README.rst index 71db9d93..4d72ee1a 100644 --- a/README.rst +++ b/README.rst @@ -15,7 +15,7 @@ The canonical home for this project lives in a Mercurial repository run by the author. For convenience, that repository is frequently synchronized to https://github.com/indygreg/python-zstandard. -| |pipelines-status| |ci-status| +| |ci-status| Requirements ============ @@ -1598,8 +1598,5 @@ their work, consider donating some money. Any amount is appreciated. :target: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=gregory%2eszorc%40gmail%2ecom&lc=US&item_name=python%2dzstandard¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted :alt: Donate via PayPal -.. |pipelines-status| image:: https://dev.azure.com/gregoryszorc/python-zstandard/_apis/build/status/indygreg.python-zstandard?branchName=master +.. |ci-status| image:: https://dev.azure.com/gregoryszorc/python-zstandard/_apis/build/status/indygreg.python-zstandard?branchName=master :target: https://dev.azure.com/gregoryszorc/python-zstandard/_apis/build/status/indygreg.python-zstandard?branchName=master - -.. |ci-status| image:: https://travis-ci.org/indygreg/python-zstandard.svg?branch=master - :target: https://travis-ci.org/indygreg/python-zstandard diff --git a/ci/download-travis.py b/ci/download-travis.py deleted file mode 100644 index e0540393..00000000 --- a/ci/download-travis.py +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env python - -# Downloads Travis artifacts to the local directory. -# -# This script is a bit hacky. But it gets the job done. - -import argparse - -import requests - -BASE_URL = 'https://s3-us-west-2.amazonaws.com/python-zstandard/travis' - -PATHS = [ - ('manylinuxwheels', '-cp27-cp27m-manylinux1_i686.whl'), - ('manylinuxwheels', '-cp27-cp27mu-manylinux1_i686.whl'), - ('manylinuxwheels', '-cp34-cp34m-manylinux1_i686.whl'), - ('manylinuxwheels', '-cp35-cp35m-manylinux1_i686.whl'), - ('manylinuxwheels', '-cp36-cp36m-manylinux1_i686.whl'), - ('manylinuxwheels', '-cp27-cp27m-manylinux1_x86_64.whl'), - ('manylinuxwheels', '-cp27-cp27mu-manylinux1_x86_64.whl'), - ('manylinuxwheels', '-cp34-cp34m-manylinux1_x86_64.whl'), - ('manylinuxwheels', '-cp35-cp35m-manylinux1_x86_64.whl'), - ('manylinuxwheels', '-cp36-cp36m-manylinux1_x86_64.whl'), - ('manylinuxwheels', '-cp37-cp37m-manylinux1_x86_64.whl'), - ('macos', '-cp27-cp27m-macosx_10_6_intel.whl'), - ('macos', '-cp34-cp34m-macosx_10_6_intel.whl'), - ('macos', '-cp35-cp35m-macosx_10_6_intel.whl'), - ('macos', '-cp36-cp36m-macosx_10_6_intel.whl'), - ('macos', '-cp37-cp37m-macosx_10_6_intel.whl'), - ('conda/2.7', '-py27_0.tar.bz2'), - ('conda/3.7', '-py37_0.tar.bz2'), -] - -def make_request(session, url): - return session.get(url) - - -def download_artifacts(build, version): - session = requests.session() - - for path, suffix in PATHS: - basename = 'zstandard-%s%s' % (version, suffix) - url = '%s/%s/%s/dist/%s' % (BASE_URL, build, path, basename) - - response = make_request(session, url) - - if response.status_code != 200: - print('non-200 from %s' % url) - continue - - print('writing %s' % basename) - with open(basename, 'wb') as fh: - for chunk in response.iter_content(8192): - fh.write(chunk) - - -if __name__ == "__main__": - parser = argparse.ArgumentParser() - parser.add_argument('build', help='which build to download. e.g. "42"') - parser.add_argument('version', help='python-zstandard version string') - - args = parser.parse_args() - - download_artifacts(args.build, args.version) diff --git a/ci/travis-build.sh b/ci/travis-build.sh deleted file mode 100644 index fab2726a..00000000 --- a/ci/travis-build.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2018-present, Gregory Szorc -# All rights reserved. -# -# This software may be modified and distributed under the terms -# of the BSD license. See the LICENSE file for details. - -set -ex - -MANYLINUX_PYPATHS="cp27-cp27m cp27-cp27mu cp34-cp34m cp35-cp35m cp36-cp36m cp37-cp37m" -CURRENT_VERSION=zstandard-0.12.0.dev0 -MANYLINUX_URL=https://s3-us-west-2.amazonaws.com/python-zstandard/travis/${TRAVIS_BUILD_NUMBER}/manylinuxwheels/dist - -function make_manylinux_wheels { - image=$1 - pre_command=$2 - - for path in ${MANYLINUX_PYPATHS}; do - pypath=/opt/python/${path} - - docker run \ - -it \ - --rm \ - -e "PYPATH=${pypath}" \ - -e "ZSTD_WARNINGS_AS_ERRORS=${ZSTD_WARNINGS_AS_ERRORS}" \ - -v `pwd`:/project \ - ${image} \ - ${pre_command} /project/ci/build-manylinux-wheel.sh - done -} - -function resolve_wheel { - if [ "${TRAVIS_PYTHON_VERSION}" = "2.7" ]; then - pypart=cp27-cp27mu - elif [ "${TRAVIS_PYTHON_VERSION}" = "3.5" ]; then - pypart=cp35-cp35m - elif [ "${TRAVIS_PYTHON_VERSION}" = "3.6" ]; then - pypart=cp36-cp36m - elif [ "${TRAVIS_PYTHON_VERSION}" = "3.7" ]; then - pypart=cp37-cp37m - else - echo "Unsure what version of Python we're running: ${TRAVIS_PYTHON_VERSION}" - exit 1 - fi - - echo ${CURRENT_VERSION}-${pypart}-manylinux1_x86_64.whl -} - -if [ "${BUILDMODE}" = "conda" ]; then - conda build ci/conda - mkdir -p dist - cp -av /home/travis/miniconda/conda-bld/*/*.tar.bz2 dist/ - -elif [ "${BUILDMODE}" = "manylinuxwheels" ]; then - make_manylinux_wheels quay.io/pypa/manylinux1_x86_64 - make_manylinux_wheels quay.io/pypa/manylinux1_i686 linux32 - -elif [ "${BUILDMODE}" = "macoswheels" ]; then - cibuildwheel --output-dir dist - -elif [ "${BUILDMODE}" = "tox" ]; then - tox - -elif [ "${BUILDMODE}" = "manylinuxtest" ]; then - mkdir /tmp/wheels - - wheel=$(resolve_wheel) - curl ${MANYLINUX_URL}/${wheel} > /tmp/wheels/${wheel} - - pip install /tmp/wheels/${wheel} - - pytest -v - -elif [ -n "${BUILDMODE}" ]; then - echo "unknown BUILDMODE: ${BUILDMODE}" - exit 1 - -else - echo "BUILDMODE must be defined" - exit 1 -fi diff --git a/ci/travis-install.sh b/ci/travis-install.sh deleted file mode 100644 index a2c15bc8..00000000 --- a/ci/travis-install.sh +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 2016-present, Gregory Szorc -# All rights reserved. -# -# This software may be modified and distributed under the terms -# of the BSD license. See the LICENSE file for details. - -# This shell scripts sets up the Travis CI build environment. - -# If a Conda build, download and install Conda. -if [ "${BUILDMODE}" = "conda" ]; then - if [ "${TRAVIS_PYTHON_VERSION}" = "2.7" ]; then - wget -O miniconda.sh https://repo.continuum.io/miniconda/Miniconda2-4.5.11-Linux-x86_64.sh - else - wget -O miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-4.5.11-Linux-x86_64.sh - fi - - bash miniconda.sh -b -p $HOME/miniconda - export PATH="$HOME/miniconda/bin:$PATH" - hash -r - conda config --set always_yes yes --set changeps1 no - conda update -q conda - conda install conda-build - - conda create -n test-environment python=$TRAVIS_PYTHON_VERSION - source activate test-environment -elif [ "${BUILDMODE}" = "macoswheels" ]; then - pip2 install --require-hashes -r ci/requirements.macoswheels.txt -elif [ "${BUILDMODE}" = "manylinuxwheels" ]; then - echo "no installation necessary when generating manylinux wheels" -else - pip install --require-hashes -r ci/requirements.txt -fi