Skip to content

Commit 11d0a34

Browse files
weekly job
1 parent c479989 commit 11d0a34

File tree

3 files changed

+262
-196
lines changed

3 files changed

+262
-196
lines changed

.github/workflows/call_precommit.yml

+233
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
name: call-precommit
2+
permissions: read-all
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
python_version:
8+
description: 'Python version'
9+
type: string
10+
required: true
11+
gpu_enabled:
12+
description: 'Enable gpu tests'
13+
type: boolean
14+
default: false
15+
required: true
16+
17+
jobs:
18+
common:
19+
timeout-minutes: 40
20+
runs-on: ubuntu-20.04
21+
defaults:
22+
run:
23+
shell: bash
24+
steps:
25+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
26+
with:
27+
lfs: true
28+
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
29+
with:
30+
python-version: ${{ inputs.python_version }}
31+
cache: pip
32+
- name: Install NNCF and test requirements
33+
run: make install-common-test
34+
- name: Print installed modules
35+
run: pip list
36+
- name: Run common precommit test scope
37+
run: make test-common
38+
env:
39+
NUM_WORKERS: 2
40+
41+
onnx:
42+
timeout-minutes: 40
43+
runs-on: ubuntu-20.04-8-cores
44+
defaults:
45+
run:
46+
shell: bash
47+
steps:
48+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
49+
with:
50+
lfs: true
51+
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
52+
with:
53+
python-version: ${{ inputs.python_version }}
54+
- name: Install NNCF and test requirements
55+
run: make install-onnx-test
56+
- name: Print installed modules
57+
run: pip list
58+
- name: Run ONNX precommit test scope
59+
run: make test-onnx
60+
env:
61+
NUM_WORKERS: 4
62+
63+
openvino:
64+
timeout-minutes: 40
65+
runs-on: ubuntu-20.04-8-cores
66+
defaults:
67+
run:
68+
shell: bash
69+
steps:
70+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
71+
with:
72+
lfs: true
73+
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
74+
with:
75+
python-version: ${{ inputs.python_version }}
76+
cache: pip
77+
- name: Install NNCF and test requirements
78+
run: make install-openvino-test
79+
- name: Print installed modules
80+
run: pip list
81+
- name: Run OV precommit test scope
82+
run: make test-openvino
83+
env:
84+
NUM_WORKERS: 4
85+
86+
pytorch-cpu:
87+
timeout-minutes: 40
88+
runs-on: ubuntu-20.04-8-cores
89+
defaults:
90+
run:
91+
shell: bash
92+
env:
93+
DEBIAN_FRONTEND: noninteractive
94+
steps:
95+
- name: Install dependencies
96+
run : |
97+
sudo apt-get update
98+
sudo apt-get --assume-yes install gcc g++ build-essential ninja-build libgl1-mesa-dev libglib2.0-0
99+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
100+
with:
101+
lfs: true
102+
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
103+
with:
104+
python-version: ${{ inputs.python_version }}
105+
cache: pip
106+
- name: Runner info
107+
continue-on-error: true
108+
run: |
109+
cat /etc/*release
110+
cat /proc/cpuinfo
111+
- name: Install NNCF and test requirements
112+
run: make install-torch-test
113+
- name: Print installed modules
114+
run: pip list
115+
- name: Run PyTorch precommit test scope
116+
run: |
117+
make test-torch-cpu
118+
env:
119+
NUM_WORKERS: 4
120+
121+
pytorch-cuda:
122+
timeout-minutes: 40
123+
runs-on: aks-linux-4-cores-28gb-gpu-tesla-t4
124+
if: ${{ inputs.gpu_enabled == true }}
125+
defaults:
126+
run:
127+
shell: bash
128+
env:
129+
DEBIAN_FRONTEND: noninteractive
130+
steps:
131+
- name: Install dependencies
132+
run : |
133+
sudo apt-get update
134+
sudo apt-get --assume-yes install build-essential ninja-build libgl1-mesa-dev libglib2.0-0 wget make
135+
- name: Download CUDA
136+
run: |
137+
wget -q https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux.run
138+
sudo sh cuda_12.4.0_550.54.14_linux.run --toolkit --silent
139+
- name: Runner info
140+
continue-on-error: true
141+
run: |
142+
export PATH=/usr/local/cuda-12.4/bin${PATH:+:${PATH}}
143+
export LD_LIBRARY_PATH=/usr/local/cuda-12.4/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
144+
nvidia-smi
145+
cat /proc/cpuinfo
146+
nvcc --version
147+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
148+
with:
149+
lfs: true
150+
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
151+
with:
152+
python-version: ${{ inputs.python_version }}
153+
cache: pip
154+
- name: Install NNCF and test requirements
155+
run: make install-torch-test
156+
- name: Print installed modules
157+
run: pip list
158+
- name: Check CUDA
159+
run: |
160+
python -c "import torch; print(torch.cuda.is_available())"
161+
- name: Run PyTorch precommit test scope
162+
run: |
163+
export PATH=/usr/local/cuda-12.4/bin${PATH:+:${PATH}}
164+
export LD_LIBRARY_PATH=/usr/local/cuda-12.4/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
165+
make test-torch-cuda
166+
167+
tensorflow:
168+
timeout-minutes: 40
169+
runs-on: ubuntu-20.04-8-cores
170+
defaults:
171+
run:
172+
shell: bash
173+
env:
174+
DEBIAN_FRONTEND: noninteractive
175+
steps:
176+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
177+
with:
178+
lfs: true
179+
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
180+
with:
181+
python-version: ${{ inputs.python_version }}
182+
cache: pip
183+
- name: Install NNCF and test requirements
184+
run: make install-tensorflow-test
185+
- name: Print installed modules
186+
run: pip list
187+
- name: Run TensorFlow precommit test scope
188+
run: make test-tensorflow
189+
env:
190+
NUM_WORKERS: 6
191+
192+
tools:
193+
timeout-minutes: 40
194+
runs-on: ubuntu-20.04
195+
defaults:
196+
run:
197+
shell: bash
198+
steps:
199+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
200+
with:
201+
lfs: true
202+
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
203+
with:
204+
python-version: ${{ inputs.python_version }}
205+
cache: pip
206+
- name: Install NNCF and test requirements
207+
run: pip install -r tests/tools/requirements.txt
208+
- name: Print installed modules
209+
run: pip list
210+
- name: Run tools precommit test scope
211+
run: pytest -ra tests/tools
212+
213+
pytorch2-cpu:
214+
timeout-minutes: 40
215+
runs-on: ubuntu-20.04
216+
defaults:
217+
run:
218+
shell: bash
219+
steps:
220+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
221+
with:
222+
lfs: true
223+
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
224+
with:
225+
python-version: ${{ inputs.python_version }}
226+
cache: pip
227+
- name: Install NNCF and test requirements
228+
run: |
229+
pip install -r tests/torch2/requirements.txt -e .
230+
- name: Print installed modules
231+
run: pip list
232+
- name: Run torch2 precommit test scope
233+
run: pytest -ra tests/torch2 -m "not cuda"

0 commit comments

Comments
 (0)