Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI for Windows #1158

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
46 changes: 45 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ x-pyenv-install: &x-pyenv-install |
"${PYENV}" install --keep --skip-existing ${PYENV_VERSION}
"${PYENV}" global ${PYENV_VERSION}

x-pyenv-27-env: &x-pyenv-27-env >
PYENV_VERSION=2.7.18

x-pyenv-39-env: &x-pyenv-39-env >
PYENV_VERSION=3.9.1

Expand Down Expand Up @@ -89,7 +92,7 @@ x-osx-27-shard: &x-osx-27-shard
env:
- *x-tox-env
- *x-pyenv-env
- PYENV_VERSION=2.7.18
- *x-pyenv-27-env

x-osx-39-shard: &x-osx-39-shard
<<: *x-osx-shard
Expand All @@ -98,6 +101,31 @@ x-osx-39-shard: &x-osx-39-shard
- *x-pyenv-env
- *x-pyenv-39-env

x-windows-shard: &x-windows-shard
os: windows
language: shell
cache:
# The default is 3 minutes (180).
timeout: 300
install:
- *x-tox-install

x-windows-27-shard: &x-windows-27-shard
<<: *x-windows-shard
before_install:
- choco install python2
chrisjbremner marked this conversation as resolved.
Show resolved Hide resolved
- python -m ensurepip --upgrade
env:
- *x-tox-env

x-windows-39-shard: &x-windows-39-shard
<<: *x-windows-shard
before_install:
- choco install python --version 3.9.1
- python -m ensurepip --upgrade
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not the python you think it is. CI says:

python2 v2.7.18 [Approved]

python2 package files install completed. Performing other installation steps.

Installing 64-bit python2...

python2 has been installed.

Installed to 'C:\Python27'

Adding C:\Python27 to PATH if needed
...
$ python -m pip install --upgrade pip

The command "python -m pip install --upgrade pip" failed and exited with 1 during .

Your build has been stopped.

C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/opt/bin/python.exe: No module named pip

Note chocolatey C:\Python27 vs C:/ProgramData/chocolatey/lib/mingw.... FWICT the latter is the "A basic Python 2.7.9 interpreter is also included: /C/ProgramData/chocolatey/bin/python.exe" referred to at the bottom of this section in the docs: https://docs.travis-ci.com/user/reference/windows/#pre-installed-chocolatey-packages

env:
- *x-tox-env

# NB: Travis partitions caches using a combination of os, language amd env vars. As such, we do not
# use TOXENV and instead pass the toxenv via -e on the command line. This helps ensure we share
# caches as much as possible (eg: all linux python 2.7.15 shards share a cache).
Expand Down Expand Up @@ -177,3 +205,19 @@ matrix:
- <<: *x-osx-39-shard
name: TOXENV=py39-integration
script: ${TOX_CMD} -e py39-integration

- <<: *x-windows-27-shard
name: TOXENV=py27
script: ${TOX_CMD} -e py27

- <<: *x-windows-39-shard
name: TOXENV=py39
script: ${TOX_CMD} -e py39

- <<: *x-windows-27-shard
name: TOXENV=py27-integration
script: ${TOX_CMD} -e py27-integration

- <<: *x-windows-39-shard
name: TOXENV=py39-integration
script: ${TOX_CMD} -e py39-integration