Skip to content

Commit

Permalink
Add CI to run examples via github action
Browse files Browse the repository at this point in the history
  • Loading branch information
mattip authored and soumith committed Jul 6, 2020
1 parent 19ae7a3 commit 3c032e8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Run Examples

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install PyTorch
run: |
python -m pip install --upgrade pip
# Install CPU-based pytorch
pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
# Maybe use the CUDA 10.2 version instead?
# pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu102/torch_nightly.html
- name: Run Tests
run: |
./run_python_examples.sh "install_deps,run_all,clean"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# PyTorch Examples
![github CI](https://github.com/pytorch/pytorch-examples/workflows/.github/workflows/main.yml/badge.svg)

A repository showcasing examples of using [PyTorch](https://github.com/pytorch/pytorch)

Expand Down

0 comments on commit 3c032e8

Please sign in to comment.