Repository navigation
94 lines (87 loc) · 2.9 KB
/
Copy pathcall_precommit_windows.yml
File metadata and controls
94 lines (87 loc) · 2.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: call-precommit-windows
permissions: read-all
on:
workflow_call:
inputs:
pr_num:
description: 'The pull request number'
type: string
default: ''
python_version:
description: 'Python version'
type: string
required: true
override_requirements:
description: 'Override requirements'
default: ''
type: string
required: false
defaults:
run:
shell: bash
env:
UV_SYSTEM_PYTHON: 'true'
jobs:
precommit:
name: ${{ matrix.scope }}
timeout-minutes: 40
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- scope: common
runner: windows-2025
install: install-common
test: test-common
workers: 2
- scope: onnx
runner: windows-2025-8-core
install: install-onnx
test: test-onnx
workers: 4
- scope: openvino
runner: windows-2025-8-core
install: install-openvino
test: test-openvino
workers: 4
- scope: pytorch-cpu
runner: windows-2025-8-core
install: install-torch
test: test-torch-cpu
workers: 4
env:
NNCF_EXTENSION_LOAD_TIMEOUT: ${{ matrix.scope == 'pytorch-cpu' && '180' || '' }}
steps:
- name: CPU Info
shell: bash
run: awk 'BEGIN{RS=""} END{print}' /proc/cpuinfo
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
lfs: true
ref: ${{ inputs.pr_num != '' && format('refs/pull/{0}/head', inputs.pr_num) || github.ref }}
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ inputs.python_version }}
- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
if: ${{ matrix.scope == 'pytorch-cpu' }}
- name: Override constraints
if: ${{ inputs.override_requirements != '' }}
run: python .github/scripts/override_constraints.py "${{ inputs.override_requirements }}"
- name: Install NNCF and test requirements
run: make ${{ matrix.install }}
- name: Print installed modules
run: pip list
- name: Pytest
run: |
set +e
sys_lib="$(python -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))")"
prefix_lib="$(python -c "import sys; print(sys.prefix + '/libs')")"
include_dir="$(python -c "import sysconfig; print(sysconfig.get_path('include'))")"
export LIB="${LIB};${sys_lib};${prefix_lib}"
export INCLUDE="${INCLUDE};${include_dir}"
make ${{ matrix.test }}
env:
NUM_WORKERS: ${{ matrix.workers }}