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 Windows CI #674

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
pool:
vmImage: 'windows-latest'

variables:
PYTHON_VERSION: 3.6

Comment on lines +3 to +6
Copy link
Author

Choose a reason for hiding this comment

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

On Windows, the python version must be> = 3.6 to install atari-py.

jobs:
- template: azure_templates/run-test.yml
parameters:
name: 'UnitTests_a_d'
PYTHON_VERSION: $(PYTHON_VERSION)
GLOB: '[a-d]*'
- template: azure_templates/run-test.yml
parameters:
name: 'UnitTests_e_h'
PYTHON_VERSION: $(PYTHON_VERSION)
GLOB: '[e-h]*'
- template: azure_templates/run-test.yml
parameters:
name: 'UnitTests_i_lo'
PYTHON_VERSION: $(PYTHON_VERSION)
GLOB: '[i-lo]*'
- template: azure_templates/run-test.yml
parameters:
name: 'UnitTests_lp_lz'
PYTHON_VERSION: $(PYTHON_VERSION)
GLOB: '[lp-lz]*'
- template: azure_templates/run-test.yml
parameters:
name: 'UnitTests_m_r'
PYTHON_VERSION: $(PYTHON_VERSION)
GLOB: '[m-r]*'
- template: azure_templates/run-test.yml
parameters:
name: 'UnitTests_s'
PYTHON_VERSION: $(PYTHON_VERSION)
GLOB: 's*'
- template: azure_templates/run-test.yml
parameters:
name: 'UnitTests_t_z'
PYTHON_VERSION: $(PYTHON_VERSION)
GLOB: '[t-z]*'
- template: azure_templates/run-test.yml
parameters:
name: 'UnitTests_determinism'
PYTHON_VERSION: $(PYTHON_VERSION)
GLOB: '0deterministic.py'
8 changes: 8 additions & 0 deletions azure_templates/install-msmpi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
steps:
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
Invoke-WebRequest "https://github.com/microsoft/Microsoft-MPI/releases/download/v10.1.1/msmpisetup.exe" -OutFile $pwd\msmpisetup.exe ;
Start-Process $pwd\msmpisetup.exe -ArgumentList '-unattend' -Wait ;
Remove-Item $pwd\msmpisetup.exe -Force
7 changes: 7 additions & 0 deletions azure_templates/install-python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
steps:
- script: |
python -m pip install --upgrade pip --user
python -m pip install --upgrade setuptools
python -m pip install tensorflow==1.14.0
python -m pip install -e .[mpi,tests,docs]
displayName: 'Install python package'
10 changes: 10 additions & 0 deletions azure_templates/run-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
jobs:
- job: ${{ parameters.name }}
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: ${{ parameters.PYTHON_VERSION }}
- template: install-msmpi.yml
- template: install-python-package.yml
- script: bash -c "python -m pytest --cov-config .coveragerc --cov-report term --cov=. -v tests/test_${{ parameters.GLOB }}"
displayName: 'Run test'
11 changes: 9 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import sys
import subprocess
import platform
from setuptools import setup, find_packages
from distutils.version import LooseVersion

Expand Down Expand Up @@ -39,6 +40,13 @@ def find_tf_dependency():

return tf_dependency

def other_tests_packages():
if platform.system() == 'Windows':
return []
elif platform.system() == 'Darwin': # Mac OS X
return ['pytype']
else:
return ['pytype']

Comment on lines 42 to 50
Copy link
Author

Choose a reason for hiding this comment

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

Pytype is currently not support windows.

long_description = """
[![Build Status](https://travis-ci.com/hill-a/stable-baselines.svg?branch=master)](https://travis-ci.com/hill-a/stable-baselines) [![Documentation Status](https://readthedocs.org/projects/stable-baselines/badge/?version=master)](https://stable-baselines.readthedocs.io/en/master/?badge=master) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/3bcb4cd6d76a4270acb16b5fe6dd9efa)](https://www.codacy.com/app/baselines_janitors/stable-baselines?utm_source=github.com&utm_medium=referral&utm_content=hill-a/stable-baselines&utm_campaign=Badge_Grade) [![Codacy Badge](https://api.codacy.com/project/badge/Coverage/3bcb4cd6d76a4270acb16b5fe6dd9efa)](https://www.codacy.com/app/baselines_janitors/stable-baselines?utm_source=github.com&utm_medium=referral&utm_content=hill-a/stable-baselines&utm_campaign=Badge_Coverage)
Expand Down Expand Up @@ -135,8 +143,7 @@ def find_tf_dependency():
'pytest-cov',
'pytest-env',
'pytest-xdist',
'pytype',
],
] + other_tests_packages(),
'docs': [
'sphinx',
'sphinx-autobuild',
Expand Down