-
Notifications
You must be signed in to change notification settings - Fork 50
76 lines (76 loc) · 2.63 KB
/
review.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: review
on: [pull_request]
env:
cflags: -Werror
jobs:
checkpatch:
name: checkpatch review
runs-on: ubuntu-latest
steps:
- name: 'Calculate PR commits + 1'
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: ${{ env.PR_FETCH_DEPTH }}
- name: Run checkpatch review
uses: webispy/checkpatch-action@v9
make:
name: Compilation test with gcc
strategy:
matrix:
gcc-version: [7, 8, 9, 10, 11, 12, 13]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Add ubuntu repository and install dependencies'
run: tests/install_ubuntu_packages.sh ${{ matrix.gcc-version }}
- name: 'Generate compiling configurations'
run: . tests/build_configure.sh ${{ env.cflags }}
- name: 'Make'
run: CC=gcc-${{ matrix.gcc-version }} CXX=g++-${{ matrix.gcc-version }} && V=1 make -j$(nproc)
- name: 'Check public symbol visibility'
run: tests/check_symbol_visibility.sh
clangcompile:
name: Compilation test with clang
strategy:
matrix:
gcc-version: [12]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Add ubuntu repository and install dependencies'
run: tests/install_ubuntu_packages.sh ${{ matrix.gcc-version }}
- name: 'Install clang'
run: sudo apt-get install clang
- name: 'Generate compiling configurations'
run: . tests/build_configure.sh ${{ env.cflags }} clang
- name: 'Make'
run: V=1 make -j$(nproc)
tests:
name: Run tests
strategy:
matrix:
gcc-version: [12]
python-version: ["3.7"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Add ubuntu repository and install dependencies'
run: tests/install_ubuntu_packages.sh ${{ matrix.gcc-version }}
- name: 'Generate compiling configurations'
run: . tests/build_configure.sh ${{ env.cflags }}
- name: 'Make'
run: CC=gcc-${{ matrix.gcc-version }} CXX=g++-${{ matrix.gcc-version }} && V=1 make -j$(nproc)
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
- name: Run tests using pytest
run: |
# Run only non-hardware dependent tests
pytest --ledctl-binary=src/ledctl/ledctl