|
| 1 | +name: OpenVINO - Full Test |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + schedule: |
| 6 | + - cron: "41 3 * * *" # run every day at 3:41 |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - v*-release |
| 10 | + pull_request: |
| 11 | + types: [opened, synchronize, reopened, labeled] |
| 12 | + |
| 13 | +concurrency: |
| 14 | + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
| 15 | + cancel-in-progress: true |
| 16 | + |
| 17 | +jobs: |
| 18 | + build: |
| 19 | + if: ${{ (github.event_name == 'workflow_dispatch') || (github.event_name == 'schedule') || (github.event_name == 'push') || contains( github.event.pull_request.labels.*.name, 'openvino-test') }} |
| 20 | + strategy: |
| 21 | + fail-fast: false |
| 22 | + matrix: |
| 23 | + include: |
| 24 | + - python-version: "3.9" |
| 25 | + os: "ubuntu-22.04" |
| 26 | + transformers-version: "latest" |
| 27 | + openvino: "ov-stable" |
| 28 | + nncf: "nncf-stable" |
| 29 | + - python-version: "3.9" |
| 30 | + os: "ubuntu-22.04" |
| 31 | + transformers-version: "latest" |
| 32 | + openvino: "ov-nightly" |
| 33 | + nncf: "nncf-stable" |
| 34 | + - python-version: "3.9" |
| 35 | + os: "ubuntu-22.04" |
| 36 | + transformers-version: "latest" |
| 37 | + openvino: "ov-stable" |
| 38 | + nncf: "nncf-develop" |
| 39 | + - python-version: "3.9" |
| 40 | + os: "ubuntu-22.04" |
| 41 | + transformers-version: "latest" |
| 42 | + openvino: "ov-nightly" |
| 43 | + nncf: "nncf-develop" |
| 44 | + |
| 45 | + runs-on: ${{ matrix.os }} |
| 46 | + |
| 47 | + steps: |
| 48 | + - uses: actions/checkout@v4 |
| 49 | + - name: Setup Python ${{ matrix.python-version }} |
| 50 | + uses: actions/setup-python@v5 |
| 51 | + with: |
| 52 | + python-version: ${{ matrix.python-version }} |
| 53 | + |
| 54 | + - name: Install dependencies |
| 55 | + run: | |
| 56 | + python -m pip install --upgrade pip |
| 57 | + # Install PyTorch CPU to prevent unnecessary downloading/installing of CUDA packages |
| 58 | + pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu |
| 59 | + pip install .[tests] |
| 60 | +
|
| 61 | + - name: Install openvino-nightly |
| 62 | + if: ${{ matrix.openvino == 'ov-nightly' }} |
| 63 | + run: pip install --pre -U openvino openvino-tokenizers --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly |
| 64 | + |
| 65 | + - name: Install openvino release |
| 66 | + if: ${{ matrix.openvino == 'ov-stable' }} |
| 67 | + run: pip install .[openvino] |
| 68 | + |
| 69 | + - name: Install nncf develop |
| 70 | + if: ${{ matrix.nncf == 'nncf-develop' }} |
| 71 | + run: pip install git+https://github.com/openvinotoolkit/nncf.git |
| 72 | + |
| 73 | + - name: Install nncf release |
| 74 | + if: ${{ matrix.nncf == 'nncf-stable' }} |
| 75 | + run: pip install .[nncf] |
| 76 | + |
| 77 | + - name: Install the lowest compatible transformers version |
| 78 | + if: ${{ matrix.transformers-version != 'latest' }} |
| 79 | + run: pip install transformers==${{ matrix.transformers-version }} |
| 80 | + |
| 81 | + - name: Pip freeze |
| 82 | + run: pip freeze |
| 83 | + |
| 84 | + - name: OpenVINO tests |
| 85 | + run: pytest tests/openvino --durations=0 |
| 86 | + env: |
| 87 | + RUN_SLOW: 1 |
| 88 | + HF_HUB_READ_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }} |
0 commit comments