-
Notifications
You must be signed in to change notification settings - Fork 341
59 lines (53 loc) · 1.77 KB
/
python.yml
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python linting and testing
on:
push:
branches: [ master, test* ]
pull_request:
branches: [ master, test* ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, 3.10.8, 3.11, 3.12]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest mypy
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
./FLAKE8
- name: Type check with mypy
run: |
./MYPY
- name: Run toplev tests
run: |
if ! grep -q GenuineIntel /proc/cpuinfo ; then export NATIVE_ARGS="--force-cpu skl" ; fi
WRAP=python PERF=./fake-perf.py NORES=1 ./tl-tester
- name: Run ocperf tests
run: |
python ./event_download.py -a
WRAP=python PERF=./fake-perf.py NORES=1 ./tester
- name: Run other tests
run: |
WRAP=python PERF=./fake-perf.py NORES=1 ./other-tester
- name: Run ucevent tests
run: |
set -e
cd ucevent
for i in jkt ivt hsx bdxde bdx skx ; do FORCECPU=$i WRAP=python MOCK=1 NORES=1 ./uctester ; done
# XXX WRAP=python MOCK=1 NORES=1 ./RUN-ALL # need to avoid GNU parallel
#
- name: Run parser tests
run: |
cd parser
./tester