Skip to content

Commit

Permalink
[Tests] Add mim ci (#928)
Browse files Browse the repository at this point in the history
* init

* fix typo

* remove pillow and fix repo name
  • Loading branch information
wangruohui authored Jun 22, 2022
1 parent fee80fd commit 9d7707b
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/test_mim.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: test-mim

on:
push:
paths:
- 'model-index.yml'
- 'configs/**'

pull_request:
paths:
- 'model-index.yml'
- 'configs/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build_cpu:
runs-on: ubuntu-18.04
strategy:
matrix:
python-version: [3.7]
torch: [1.8.0]
include:
- torch: 1.8.0
torch_version: torch1.8
torchvision: 0.9.0
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: pip install pip --upgrade
- name: Install PyTorch
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
- name: Install openmim
run: pip install openmim
- name: Build and install
run: rm -rf .eggs && mim install -e .
- name: test commands of mim
run: mim search mmedit
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def gen_packages_items():
return packages


def add_mim_extention():
def add_mim_extension():
"""Add extra files that are required to support MIM into the package.
These files will be added by creating a symlink to the originals if the
Expand Down Expand Up @@ -201,7 +201,7 @@ def add_mim_extention():


if __name__ == '__main__':
add_mim_extention()
add_mim_extension()
setup(
name='mmedit',
version=get_version(),
Expand Down

0 comments on commit 9d7707b

Please sign in to comment.