@@ -3,24 +3,75 @@ name: tests
3
3
on : [push, pull_request]
4
4
5
5
jobs :
6
- unit_tests :
7
- name : unit tests
6
+
7
+ static_analysis :
8
+ runs-on : ubuntu-24.04
9
+ steps :
10
+ - uses : actions/checkout@v4
11
+ - uses : actions/setup-python@v5
12
+ with :
13
+ python-version : ' 3.11'
14
+ - name : Installing requirements
15
+ run :
16
+ python -m pip install -r requirements.txt
17
+ - name : Installing ubuntu requirements
18
+ run : " sudo apt-get install -y cppcheck"
19
+ - name : Static analysis
20
+ run : pre-commit run --all
21
+
22
+ scons_test :
23
+ runs-on : ${{ matrix.os }}
24
+ strategy :
25
+ matrix :
26
+ os : ["ubuntu-20.04", "ubuntu-24.04", "macos-14"]
27
+ python : ["3.11", "3.12"]
28
+ steps :
29
+ - uses : actions/checkout@v4
30
+ - uses : actions/setup-python@v5
31
+ with :
32
+ python-version : ${{ matrix.python }}
33
+ - name : Installing python requirements
34
+ run :
35
+ python -m pip install -r requirements.txt
36
+ - name : Installing ubuntu requirements
37
+ if : ${{startsWith(matrix.os, 'ubuntu')}}
38
+ run :
39
+ scripts/ubuntu_dependencies.sh
40
+ - name : Installing macos requirements
41
+ if : ${{startsWith(matrix.os, 'macos')}}
42
+ run :
43
+ scripts/macos_dependencies.sh
44
+ - name : Building
45
+ run : scons -j$(nproc || sysctl -n hw.logicalcpu)
46
+
47
+
48
+ full_tests :
8
49
runs-on : ubuntu-24.04
9
50
strategy :
10
51
matrix :
52
+ os : ["ubuntu-20.04", "ubuntu-24.04", "macos-14"]
53
+ python : ["3.11", "3.12"]
11
54
flags : ['', '--asan', '--ubsan']
12
55
backend : ['MSGQ', 'ZMQ']
13
- python-version : ["3.11", "3.12"]
56
+ exclude :
57
+ - os : " macos-14"
58
+ backend : " MSGQ"
14
59
steps :
15
60
- uses : actions/checkout@v4
16
61
- uses : actions/setup-python@v5
17
62
with :
18
- python-version : ${{ matrix.python-version }}
63
+ python-version : ${{ matrix.python }}
64
+ - name : Installing ubuntu requirements
65
+ if : ${{startsWith(matrix.os, 'ubuntu')}}
66
+ run :
67
+ scripts/ubuntu_dependencies.sh
68
+ - name : Installing macos requirements
69
+ if : ${{startsWith(matrix.os, 'macos')}}
70
+ run :
71
+ scripts/macos_dependencies.sh
19
72
- name : Building msgq
20
73
run : |
21
- export BUILD_TESTS=1
22
- scripts/install_dependencies.sh
23
- pip3 install --break-system-packages .[dev]
74
+ pip3 install -e .[dev]
24
75
- name : Python tests
25
76
run : ${{ matrix.backend }}=1 pytest --continue-on-collection-errors --cov --cov-report=xml --cov-append
26
77
- name : C++ tests
31
82
msgq/visionipc/test_runner
32
83
- name : Upload coverage
33
84
run : " bash <(curl -s https://codecov.io/bash) -v -F unit_tests_${{ matrix.backend }}"
34
-
35
- static_analysis :
36
- name : static analysis
37
- runs-on : ubuntu-24.04
38
- steps :
39
- - uses : actions/checkout@v3
40
- - name : Building msgq
41
- run : |
42
- scripts/install_dependencies.sh
43
- pip3 install --break-system-packages .[dev]
44
- - name : Static analysis
45
- # TODO: a package pre-commit installs has a warning, remove the unset once that's fixed
46
- run : unset PYTHONWARNINGS && pre-commit run --all
0 commit comments