-
Notifications
You must be signed in to change notification settings - Fork 14
80 lines (68 loc) · 2.01 KB
/
build_test.yaml
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: Build and test
on:
push:
branches:
- main
- develop
- feature_*
pull_request:
branches:
- main
- develop
- feature_*
jobs:
build:
runs-on: ubuntu-latest
container: zephyrprojectrtos/ci:latest
env:
CMAKE_PREFIX_PATH: /opt/toolchains
strategy:
matrix:
platform:
[
rcar_spider,
rcar_salvator_xs_m3,
rcar_h3ulcb_ca57,
native_posix,
native_posix_64,
]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Initialize
run: |
sudo apt update
ln -ns /opt/protoc/include/google /usr/local/include
west init -l ./
west update
west zephyr-export
- name: Create IPL files
run: |
mkdir src/prebuilt
touch src/prebuilt/ipl.bin
touch src/prebuilt/ipl.dtb
- name: Build ${{ matrix.platform }}
if: "!startsWith(matrix.platform, 'native')"
run: |
west build -b ${{ matrix.platform }} -p always -- -DSHIELD=xen_dom0
- name: Build ${{ matrix.platform }}
if: startsWith(matrix.platform, 'native')
run: |
west build -b ${{ matrix.platform }} -p always
- name: Test ${{ matrix.platform }}
if: matrix.platform == 'native_posix'
run: |
west twister -c -v -p ${{ matrix.platform }} -T tests
- name: Test ${{ matrix.platform }}
if: matrix.platform == 'native_posix_64'
run: |
west twister -c -v -p ${{ matrix.platform }} --coverage --coverage-basedir src/ --coverage-tool gcovr -T tests
gcovr twister-out/${{ matrix.platform }}/ -f src/ --xml-pretty > ./coverage.xml
- name: Upload codecov report
if: startsWith(matrix.platform, 'native_posix_64')
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml