forked from FreeRTOS/FreeRTOS
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (79 loc) · 2.81 KB
/
kernel-unit-tests.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
77
78
79
80
name: Kernel Unit Tests
on: [push, pull_request]
jobs:
run-submodule:
name: FreeRTOS/Source Submodule Revision
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 5
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: 3.8
- name: Install packages
run: |
sudo apt-get install lcov cflow ruby doxygen build-essential unifdef
- name: Run Unit Tests with ENABLE_SANITIZER=1
run: |
make -C FreeRTOS/Test/CMock clean
make -C FreeRTOS/Test/CMock ENABLE_SANITIZER=1 run_col_formatted
- name: Run Unit Tests for coverage
run: |
make -C FreeRTOS/Test/CMock clean
make -C FreeRTOS/Test/CMock lcovhtml
lcov --config-file FreeRTOS/Test/CMock/lcovrc --summary FreeRTOS/Test/CMock/build/cmock_test.info > FreeRTOS/Test/CMock/build/cmock_test_summary.txt
- name: Archive code coverage data
uses: actions/upload-artifact@v4
with:
name: submodule-coverage-data
path: FreeRTOS/Test/CMock/build/cmock_test*
- name: Archive code coverage html report
uses: actions/upload-artifact@v4
with:
name: submodule-coverage-report
path: FreeRTOS/Test/CMock/build/coverage
run-upstream:
name: FreeRTOS-Kernel Main Branch
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 5
- name: Checkout the main branch from the FreeRTOS-Kernel repository
uses: actions/checkout@v3
with:
path: ./FreeRTOS/Source
ref: main
repository: FreeRTOS/FreeRTOS-Kernel
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: 3.8
- name: Install packages
run: |
sudo apt-get install lcov cflow ruby doxygen build-essential unifdef
- name: Run Unit Tests with ENABLE_SANITIZER=1
run: |
make -C FreeRTOS/Test/CMock clean
make -C FreeRTOS/Test/CMock ENABLE_SANITIZER=1 run_col_formatted
- name: Run Unit Tests for coverage
run: |
make -C FreeRTOS/Test/CMock clean
make -C FreeRTOS/Test/CMock lcovhtml
lcov --config-file FreeRTOS/Test/CMock/lcovrc --summary FreeRTOS/Test/CMock/build/cmock_test.info > FreeRTOS/Test/CMock/build/cmock_test_summary.txt
- name: Archive code coverage data
uses: actions/upload-artifact@v4
with:
name: main-branch-coverage-data
path: FreeRTOS/Test/CMock/build/cmock_test*
- name: Archive code coverage html report
uses: actions/upload-artifact@v4
with:
name: main-branch-coverage-report
path: FreeRTOS/Test/CMock/build/coverage