Skip to content

Commit

Permalink
Python 3.8 CI (#351)
Browse files Browse the repository at this point in the history
* Python 3.8 CI

* Update requirements.txt

* Allow wheel installation

* Activate conda env

* env.yml file

* Remove specific python version

* update env.yml

* Revert openssl

* Separate dependency installation

* CXX libraries - windows build

* Remove packages

* Update test env for testing

* Update torch installation for windows

* Pytorch installation - windows

* Atari py installation windows

* Windows fix (1)

* Remove repeated atari py installation

* Add badge to readme
  • Loading branch information
Sharad24 committed Sep 18, 2020
1 parent 147d373 commit bb85ea1
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 4 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
python-version: [ '3.6','3.7' ]
python-version: [ '3.6','3.7','3.8' ]
platform: [ubuntu-20.04, windows-2019, macOS-10.15]
runs-on: ${{ matrix.platform }}

Expand Down Expand Up @@ -56,17 +56,31 @@ jobs:
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: test

- name: Update conda env dependencies
shell: bash -l {0}
run: |
conda config --set ssl_verify no
conda install pytorch==1.4.0 torchvision==0.5.0 cpuonly -c pytorch
pip install -f https://github.com/Kojoley/atari-py/releases atari_py
conda env update environment.yml
# Install Dependencies
- name: Install Windows dependencies
shell: pwsh
if: startsWith(runner.os, 'Windows')
run: |
./.scripts/windows_cpu_build.ps1
- name: Install Linux Dependencies
shell: bash -l {0}
if: startsWith(runner.os, 'macOS') || startsWith(runner.os, 'Linux')
run: |
./.scripts/unix_cpu_build.sh
- name: Tests
run: pytest --durations=0
shell: bash -l {0}
run: |
conda activate test
pytest --durations=0
4 changes: 3 additions & 1 deletion .scripts/unix_cpu_build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh

conda install -c conda-forge swig
python -m pip install --upgrade pip
pip install cmake
pip install torch==1.4.0 --quiet --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
pip install -r requirements.txt
# pip install -r requirements.txt
2 changes: 1 addition & 1 deletion .scripts/windows_cpu_build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
conda install -c conda-forge swig
python -m pip install --upgrade pip
pip install torch==1.4.0 --quiet --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
pip install -r requirements.txt
# pip install -r requirements.txt
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<div align='center'>

[![pypi](https://img.shields.io/badge/pypi%20package-v0.0.2-blue)](https://pypi.org/project/genrl/)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/genrl.svg)](https://pypi.python.org/pypi/ansicolortags/)
[![Downloads](https://pepy.tech/badge/genrl)](https://pepy.tech/project/genrl)
[![codecov](https://codecov.io/gh/SforAiDl/genrl/branch/master/graph/badge.svg)](https://codecov.io/gh/SforAiDl/genrl)
[![GitHub license](https://img.shields.io/github/license/SforAiDl/genrl)](https://github.com/SforAiDl/genrl/blob/master/LICENSE)
Expand Down
67 changes: 67 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: test
channels:
- conda-forge
- soumith
- defaults
dependencies:
- ca-certificates=2020.6.20
- libcxx
- libffi=3.2.1
- openssl=1.1.1g
- pcre=8.44
- pip=20.2.3
#- python=3.8.5=h0ed32c4_8_cpython
#- python_abi=3.8=1_cp38
- sqlite=3.33.0
- swig=4.0.2
- tk=8.6.10
- wheel=0.35.1
- xz=5.2.5
- zlib=1.2.11
- pip:
- absl-py==0.10.0
- appdirs==1.4.4
#- atari-py==0.2.6
- attrs==20.2.0
- box2d-py==2.3.8
- certifi==2019.11.28
- cfgv==3.2.0
- cloudpickle==1.3.0
- cmake==3.18.2.post1
- cycler==0.10.0
- distlib==0.3.1
- filelock==3.0.12
- future==0.18.2
- grpcio==1.32.0
- gym==0.17.1
- identify==1.5.3
- importlib-resources==1.0.1
- kiwisolver==1.2.0
- markdown==3.2.2
- matplotlib==3.2.1
- more-itertools==8.5.0
- nodeenv==1.5.0
- numpy==1.18.2
- opencv-python==4.2.0.34
- packaging==20.4
- pandas==1.0.4
- pillow==7.1.0
- pluggy==0.13.1
- pre-commit==2.4.0
- protobuf==3.13.0
- py==1.9.0
- pyglet==1.5.0
- pyparsing==2.4.7
- pytest==5.4.1
- python-dateutil==2.8.1
- pytz==2020.1
- pyyaml==5.3.1
- scipy==1.4.1
- setuptools==41.0.0
- six==1.14.0
- tensorboard==1.15.0
- toml==0.10.1
- torchvision==0.5.0
- virtualenv==20.0.31
- wcwidth==0.2.5
- werkzeug==1.0.1
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ certifi==2019.11.28
cloudpickle==1.3.0
future==0.18.2
gym==0.17.1
gym[atari]
numpy==1.18.2
opencv-python==4.2.0.34
pandas==1.0.4
Expand All @@ -19,3 +20,4 @@ tensorboard==1.15.0
pre-commit==2.4.0
importlib-resources==1.0.1
setuptools==41.0.0
wheel==0.35.1

0 comments on commit bb85ea1

Please sign in to comment.