Skip to content

Commit 680e310

Browse files
[GHA] weekly job (#3156)
### Changes Add weekly scope with precommit tests on python: 3.9, 3.11 and 3.12. TF disabled for 3.12 - tensorflow==2.15 not support
1 parent 1b4c9e6 commit 680e310

File tree

4 files changed

+263
-204
lines changed

4 files changed

+263
-204
lines changed

.github/workflows/call_precommit.yml

+234
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
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+
if: ${{ inputs.python_version != '3.12' }}
171+
defaults:
172+
run:
173+
shell: bash
174+
env:
175+
DEBIAN_FRONTEND: noninteractive
176+
steps:
177+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
178+
with:
179+
lfs: true
180+
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
181+
with:
182+
python-version: ${{ inputs.python_version }}
183+
cache: pip
184+
- name: Install NNCF and test requirements
185+
run: make install-tensorflow-test
186+
- name: Print installed modules
187+
run: pip list
188+
- name: Run TensorFlow precommit test scope
189+
run: make test-tensorflow
190+
env:
191+
NUM_WORKERS: 6
192+
193+
tools:
194+
timeout-minutes: 40
195+
runs-on: ubuntu-20.04
196+
defaults:
197+
run:
198+
shell: bash
199+
steps:
200+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
201+
with:
202+
lfs: true
203+
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
204+
with:
205+
python-version: ${{ inputs.python_version }}
206+
cache: pip
207+
- name: Install NNCF and test requirements
208+
run: pip install -r tests/tools/requirements.txt
209+
- name: Print installed modules
210+
run: pip list
211+
- name: Run tools precommit test scope
212+
run: pytest -ra tests/tools
213+
214+
pytorch2-cpu:
215+
timeout-minutes: 40
216+
runs-on: ubuntu-20.04
217+
defaults:
218+
run:
219+
shell: bash
220+
steps:
221+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
222+
with:
223+
lfs: true
224+
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
225+
with:
226+
python-version: ${{ inputs.python_version }}
227+
cache: pip
228+
- name: Install NNCF and test requirements
229+
run: |
230+
pip install -r tests/torch2/requirements.txt -e .
231+
- name: Print installed modules
232+
run: pip list
233+
- name: Run torch2 precommit test scope
234+
run: pytest -ra tests/torch2 -m "not cuda"

0 commit comments

Comments
 (0)