branches: only: - /v\d+\.\d+(\.\d+)?(\S*)?$/ # tag format: *v0.25(.8)(dev14) - staging - master matrix: include: # python manylinux packages - name: "cp38-cp38m-manylinux1_x86_64.whl" os: linux sudo: true language: python python: '3.8' services: - docker env: - DOCKER_IMAGE="quay.io/pypa/manylinux1_x86_64" - PY_VERSION="cp38-cp38" - DOCKER_BUILD=true - TEST_IN_HOST=true - MATRIX_EVAL="" cache: directories: - ccache - name: "cp38-cp38m-manylinux1_i686.whl" os: linux sudo: true services: - docker env: - DOCKER_IMAGE="quay.io/pypa/manylinux1_i686" - PY_VERSION="cp38-cp38" - DOCKER_BUILD=true - MATRIX_EVAL="" cache: directories: - ccache - name: "cp37-cp37m-manylinux1_x86_64.whl" os: linux sudo: true language: python python: '3.7-dev' services: - docker env: - DOCKER_IMAGE="quay.io/pypa/manylinux1_x86_64" - PY_VERSION="cp37-cp37m" - DOCKER_BUILD=true - TEST_IN_HOST=true - MATRIX_EVAL="" cache: directories: - ccache - name: "cp37-cp37m-manylinux1_i686.whl" os: linux sudo: true services: - docker env: - DOCKER_IMAGE="quay.io/pypa/manylinux1_i686" - PY_VERSION="cp37-cp37m" - DOCKER_BUILD=true - MATRIX_EVAL="" cache: directories: - ccache - name: "cp36-cp36m-manylinux1_x86_64.whl" os: linux sudo: true language: python python: '3.6' services: - docker env: - DOCKER_IMAGE="quay.io/pypa/manylinux1_x86_64" - PY_VERSION="cp36-cp36m" - DOCKER_BUILD=true - TEST_IN_HOST=true - MATRIX_EVAL="" cache: directories: - ccache - name: "cp36-cp36m-manylinux1_i686.whl" os: linux sudo: true services: - docker env: - DOCKER_IMAGE="quay.io/pypa/manylinux1_i686" - PY_VERSION="cp36-cp36m" - DOCKER_BUILD=true - MATRIX_EVAL="" cache: directories: - ccache - name: "cp35-cp35m-manylinux1_x86_64.whl" os: linux sudo: true language: python python: '3.5' services: - docker env: - DOCKER_IMAGE="quay.io/pypa/manylinux1_x86_64" - PY_VERSION="cp35-cp35m" - DOCKER_BUILD=true - TEST_IN_HOST=true - MATRIX_EVAL="" cache: directories: - ccache - name: "cp35-cp35m-manylinux1_i686.whl" os: linux sudo: true services: - docker env: - DOCKER_IMAGE="quay.io/pypa/manylinux1_i686" - PY_VERSION="cp35-cp35m" - DOCKER_BUILD=true - MATRIX_EVAL="" cache: directories: - ccache - name: "cp34-cp34m-manylinux1_x86_64.whl" os: linux sudo: true language: python python: '3.4' services: - docker env: - DOCKER_IMAGE="quay.io/pypa/manylinux1_x86_64" - PY_VERSION="cp34-cp34m" - DOCKER_BUILD=true - TEST_IN_HOST=true - MATRIX_EVAL="" cache: directories: - ccache - name: "cp34-cp34m-manylinux1_i686.whl" os: linux sudo: true services: - docker env: - DOCKER_IMAGE="quay.io/pypa/manylinux1_i686" - PY_VERSION="cp34-cp34m" - DOCKER_BUILD=true - MATRIX_EVAL="" cache: directories: - ccache - name: "cp27-cp27mu-manylinux1_x86_64.whl" os: linux sudo: true language: python python: '2.7' services: - docker env: - DOCKER_IMAGE="quay.io/pypa/manylinux1_x86_64" - PY_VERSION="cp27-cp27mu" - DOCKER_BUILD=true - TEST_IN_HOST=true - MATRIX_EVAL="" cache: directories: - ccache - name: "cp27-cp27mu-manylinux1_i686.whl" os: linux sudo: true services: - docker env: - DOCKER_IMAGE="quay.io/pypa/manylinux1_i686" - PY_VERSION="cp27-cp27mu" - DOCKER_BUILD=true - MATRIX_EVAL="" cache: directories: - ccache - name: "cp27-cp27m-manylinux1_x86_64.whl" os: linux sudo: true language: python python: '2.7' services: - docker env: - DOCKER_IMAGE="quay.io/pypa/manylinux1_x86_64" - PY_VERSION="cp27-cp27m" - DOCKER_BUILD=true - TEST_IN_HOST=false # travis's python 2.7 uses ucs4 (mu), so this test fails. - MATRIX_EVAL="" cache: directories: - ccache - name: "cp27-cp27m-manylinux1_i686.whl" os: linux sudo: true services: - docker env: - DOCKER_IMAGE="quay.io/pypa/manylinux1_i686" - PY_VERSION="cp27-cp27m" - DOCKER_BUILD=true - MATRIX_EVAL="" cache: directories: - ccache # python 2 osx # - name: "klayout python2 osx10.13" - name: "cp27-cp27m-macosx_10_13_x86_64.whl" os: osx osx_image: xcode9.4 # macOS 10.13 cache: directories: - ccache addons: homebrew: packages: - ccache update: true env: - MATRIX_EVAL="" - ARCHFLAGS="-std=c++11" - PIP_UPDATE="1" - PYTHON_BUILD=true # - name: "klayout python2 osx10.12" - name: "cp27-cp27m-macosx_10_12_x86_64.whl" os: osx osx_image: xcode8.3 # macOS 10.12 cache: directories: - ccache addons: homebrew: packages: - ccache update: true env: - MATRIX_EVAL="brew install python2 || brew link --overwrite python@2" # deficient python2 in travis's xcode8.3 (no ssl) - ARCHFLAGS="-std=c++11" - PIP_UPDATE="1" - PYTHON_BUILD=true # - name: "klayout python2 osx10.11" - name: "cp27-cp27m-macosx_10_11_x86_64.whl" os: osx osx_image: xcode8 # macOS 10.11 cache: directories: - ccache addons: homebrew: packages: - ccache update: true env: - MATRIX_EVAL="" - ARCHFLAGS="-std=c++11" - PIP_UPDATE="1" - PYTHON_BUILD=true # python 3 osx # - name: "klayout python3 osx10.13" - name: "cp37-cp37m-macosx_10_13_x86_64.whl" os: osx osx_image: xcode9.4 # macOS 10.13 cache: directories: - ccache addons: homebrew: packages: - python3 - ccache update: true env: - MATRIX_EVAL="shopt -s expand_aliases; alias python='python3'; alias pip='pip3';" - ARCHFLAGS="-std=c++11" - PIP_UPDATE="1" - PYTHON_BUILD=true # - name: "klayout python3.6.6 osx10.13" - name: "cp36-cp36m-macosx_10_13_x86_64.whl" os: osx osx_image: xcode9.4 # macOS 10.13 cache: directories: - ccache addons: homebrew: packages: - ccache update: true env: - MATRIX_EVAL="brew update; brew tap sashkab/python; brew install sashkab/python/python36; brew link --force --overwrite python36; shopt -s expand_aliases; alias python='/usr/local/opt/python36/bin/python3.6'; alias pip='/usr/local/opt/python36/bin/pip3.6';" - ARCHFLAGS="-std=c++11" - PIP_UPDATE="1" - PYTHON_BUILD=true # - name: "klayout python3.5.6 osx10.13" - name: "cp35-cp35m-macosx_10_13_x86_64.whl" os: osx osx_image: xcode9.4 # macOS 10.13 cache: directories: - ccache addons: homebrew: packages: - ccache update: true env: - MATRIX_EVAL="brew update; brew tap sashkab/python; brew install sashkab/python/python35; brew link --force --overwrite python35; shopt -s expand_aliases; alias python='/usr/local/opt/python35/bin/python3.5'; alias pip='/usr/local/opt/python35/bin/pip3.5';" - ARCHFLAGS="-std=c++11" - PIP_UPDATE="1" - PYTHON_BUILD=true # - name: "klayout python3 osx10.12" - name: "cp37-cp37m-macosx_10_12_x86_64.whl" os: osx osx_image: xcode8.3 # macOS 10.12 cache: directories: - ccache addons: homebrew: packages: - python3 - ccache update: true env: - MATRIX_EVAL="shopt -s expand_aliases; alias python='python3'; alias pip='pip3';" - ARCHFLAGS="-std=c++11" - PIP_UPDATE="1" - PYTHON_BUILD=true # - name: "klayout python3 osx10.11" - name: "cp37-cp37m-macosx_10_11_x86_64.whl" os: osx osx_image: xcode8 # macOS 10.11 cache: directories: - ccache addons: homebrew: packages: - ccache update: true env: - MATRIX_EVAL="brew update; brew config; brew upgrade python; brew postinstall python; ls -l /usr/local/opt/python/libexec/bin/; shopt -s expand_aliases; alias python='/usr/local/opt/python/libexec/bin/python'; alias pip='/usr/local/opt/python/libexec/bin/pip';" - ARCHFLAGS="-std=c++11" - PIP_UPDATE="1" - PYTHON_BUILD=true # KLayout builds for mac # Python 3 - name: "KLayout macOS 10.13 with py3.7" os: osx osx_image: xcode9.4 # macOS 10.13 cache: directories: - ccache addons: homebrew: packages: - python3 - qt - ccache update: true env: - MATRIX_EVAL="" - PYTHON_VERSION=B37 - MACOS_VERSION=HighSierra - KLAYOUT_BUILD=true - name: "KLayout macOS 10.12 with py3.7" os: osx osx_image: xcode8.3 # macOS 10.12 cache: directories: - ccache addons: homebrew: packages: - python3 - qt - ccache update: true env: - MATRIX_EVAL="" - PYTHON_VERSION=B37 - MACOS_VERSION=Sierra - KLAYOUT_BUILD=true - name: "KLayout macOS 10.11 with py3.7" os: osx osx_image: xcode8 # macOS 10.11 cache: directories: - ccache addons: homebrew: packages: - python3 - ccache update: true env: - MATRIX_EVAL="brew update; brew config; brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/56c500b569c724b049be7ab9e12d9693f85522f9/Formula/qt.rb" # Qt 5.11.2 - PYTHON_VERSION=B37 - MACOS_VERSION=ElCapitan - KLAYOUT_BUILD=true # Python 2 - name: "KLayout macOS 10.13 with py2.7" os: osx osx_image: xcode9.4 # macOS 10.13 cache: directories: - ccache addons: homebrew: packages: - qt - ccache update: true env: - MATRIX_EVAL="" - PYTHON_VERSION=Sys - MACOS_VERSION=HighSierra - KLAYOUT_BUILD=true - name: "KLayout macOS 10.12 with py2.7" os: osx osx_image: xcode8.3 # macOS 10.12 cache: directories: - ccache addons: homebrew: packages: - qt - ccache update: true env: - MATRIX_EVAL="" - PYTHON_VERSION=Sys - MACOS_VERSION=Sierra - KLAYOUT_BUILD=true - name: "KLayout macOS 10.11 with py2.7" os: osx osx_image: xcode8 # macOS 10.11 cache: directories: - ccache addons: homebrew: packages: - ccache update: true env: - MATRIX_EVAL="brew update; brew config; brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/56c500b569c724b049be7ab9e12d9693f85522f9/Formula/qt.rb" # Qt 5.11.2 - PYTHON_VERSION=Sys - MACOS_VERSION=ElCapitan - KLAYOUT_BUILD=true before_install: - env - gem install dropbox-deployment - if [ "${TRAVIS_OS_NAME}" == "osx" ]; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; mkdir -p ccache; export CCACHE_DIR="`pwd`/ccache"; ccache -s; fi - eval "${MATRIX_EVAL}" - if [ "${PIP_UPDATE}" == "1" ]; then pip --version; pip install --upgrade pip || sudo pip install --upgrade pip; pip --version; pip install --upgrade setuptools wheel || sudo pip install --upgrade setuptools wheel; fi - python -c "import distutils.sysconfig as sysconfig; print(sysconfig.__file__)" install: - if [ "$DOCKER_BUILD" = true ]; then docker pull $DOCKER_IMAGE; fi script: - if [ "$DOCKER_BUILD" = true ]; then mkdir -p ccache; mkdir -p wheelhouse; docker run --rm -e DOCKER_IMAGE -e PY_VERSION -v `pwd`:/io $DOCKER_IMAGE $PRE_CMD "/io/ci-scripts/docker/docker_build.sh"; klayout_version=$(python -c 'import setup; print(setup.Config().version())'); mkdir -p deploy/dist-pymod/$klayout_version; cp -a wheelhouse/{klayout-*manylinux1*.whl,*.zip} deploy/dist-pymod/$klayout_version; if [ "$TEST_IN_HOST" = true ]; then pip install klayout --no-index -f ./wheelhouse; python testdata/pymod/import_db.py; python testdata/pymod/import_rdb.py; python testdata/pymod/import_tl.py; python testdata/pymod/import_lib.py; python testdata/pymod/pya_tests.py; fi fi - if [ "$PYTHON_BUILD" = true ]; then python setup.py build; python setup.py bdist_wheel; python setup.py install; python setup.py sdist --formats=zip; python testdata/pymod/import_db.py; python testdata/pymod/import_rdb.py; python testdata/pymod/import_tl.py; python testdata/pymod/import_lib.py; python testdata/pymod/pya_tests.py; klayout_version=$(python -c 'import setup; print(setup.Config().version())'); mkdir -p deploy/dist-pymod/$klayout_version; cp -a dist/{*.whl,*.zip} deploy/dist-pymod/$klayout_version; python -c 'import klayout.db as db; print(dir(db))'; python -c 'import klayout.rdb as rdb; print(dir(rdb))'; python -c 'import klayout.tl as tl; print(dir(tl))'; fi - if [ "$KLAYOUT_BUILD" = true ]; then ./travis-build.sh; fi before_cache: - if [ "${TRAVIS_OS_NAME}" == "osx" ]; then ccache -s; fi after_success: # upload to dropbox # need DROPBOX_OAUTH_BEARER environment variable - dropbox-deployment # uploading to pypi using twine # need TWINE_USERNAME, TWINE_PASSWORD and TWINE_REPOSITORY_URL env variable - if [ ! -z "$TRAVIS_TAG" ] && [ ! -z "$TWINE_PASSWORD" ] && [[ "$PYTHON_BUILD" = true || "$DOCKER_BUILD" = true ]]; then pip install -U twine || sudo pip install -U twine; twine upload --skip-existing deploy/dist-pymod/$klayout_version/*; fi