From 9d7707b58756ea49579b81a318d3987e4c8c552d Mon Sep 17 00:00:00 2001 From: WRH <12756472+wangruohui@users.noreply.github.com> Date: Wed, 22 Jun 2022 14:59:22 +0800 Subject: [PATCH] [Tests] Add mim ci (#928) * init * fix typo * remove pillow and fix repo name --- .github/workflows/test_mim.yml | 44 ++++++++++++++++++++++++++++++++++ setup.py | 4 ++-- 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/test_mim.yml diff --git a/.github/workflows/test_mim.yml b/.github/workflows/test_mim.yml new file mode 100644 index 0000000000..ab95e781b6 --- /dev/null +++ b/.github/workflows/test_mim.yml @@ -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 diff --git a/setup.py b/setup.py index 30598df4a9..b5972c1a8f 100644 --- a/setup.py +++ b/setup.py @@ -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 @@ -201,7 +201,7 @@ def add_mim_extention(): if __name__ == '__main__': - add_mim_extention() + add_mim_extension() setup( name='mmedit', version=get_version(),