name: build_pat

on:
  push:
    paths-ignore:
      - 'README.md'
      - 'README_zh-CN.md'
      - 'docs/**'
      - 'examples/**'
      - '.dev_scripts/**'

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

env:
  MMCV_WITH_OPS: 1

jobs:
  build_parrots:
    runs-on: ubuntu-18.04
    container:
      image: ghcr.io/cokedong/parrots:pat0.21.0a0_cuda11
      credentials:
        username: cokedong
        password: ${{ secrets.PARROTS_CI_TOKEN }}

    steps:
      - uses: actions/checkout@v2
      - name: Install unittest dependencies
        run: pip install -r requirements/test.txt
      - name: Build and install
        run: |
          source /usr/local/env/pat_latest
          pip install -e . -v
