forked from project-ocre/ocre-runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
199 lines (166 loc) · 6.42 KB
/
Copy pathhardware-bu585.yml
File metadata and controls
199 lines (166 loc) · 6.42 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# @copyright Copyright (c) contributors to Project Ocre,
# which has been established as Project Ocre a Series of LF Projects, LLC
#
# SPDX-License-Identifier: Apache-2.0
name: Hardware Checks (b_u585)
concurrency:
group: pr-workflows
cancel-in-progress: false
on:
workflow_call:
inputs:
devcontainer-tag:
description: The container tag to be used
default: latest
required: false
type: string
jobs:
setup-local-runner:
name: Setup local runner
runs-on: zephyr-xlarge-runner
steps:
- name: Remove old workflow files
run: rm -rf /var/ocre-ci-files/*
- name: Reset USB Connection
run: sudo usbreset STLINK-V3 # Product name for the b_u585i_iot02a, may have to update if we add additional STM boards to the workflow
mini-flash:
name: Mini sample build and flash
needs: setup-local-runner
runs-on: zephyr-xlarge-runner
container:
image: ghcr.io/${{ github.repository }}/devcontainer-zephyr:${{ inputs.devcontainer-tag }}
volumes:
- /var/ocre-ci-files/:/var/ocre-ci-files/
- /usr/local/STMicroelectronics/:/usr/local/STMicroelectronics/
- /github/home/STMicroelectronics/:/github/home/STMicroelectronics/
options: --user root --device=/dev/ttyACM0 --device=/dev/bus
steps:
- name: Clean workspace
run: |
rm -rf ../.west || true
find . -name . -o -prune -exec rm -rf -- {} +
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
path: ocre-runtime
submodules: recursive
- name: Setup west environment
run: |
. /opt/zephyr-venv/bin/activate
west init -l ocre-runtime
west update
- name: Build and Flash mini sample
run: |
. /opt/zephyr-venv/bin/activate
west build -p always -b b_u585i_iot02a ocre-runtime/src/samples/mini/zephyr
west flash --extload=/usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/ExternalLoader/MX25LM51245G_STM32U585I-IOT02A.stldr
mini-test:
name: Mini Validation Test
needs: mini-flash
runs-on: zephyr-xlarge-runner
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Run mini sample Test Case
run: |
cd tests_hw && bash beginTests.sh "mini"
- name: Print mini sample Test Case Logs
if: always()
run: |
cat /tmp/mini.log
demo-flash:
name: Demo sample build and flash
needs: [setup-local-runner, mini-test]
runs-on: zephyr-xlarge-runner
container:
image: ghcr.io/${{ github.repository }}/devcontainer-zephyr:${{ inputs.devcontainer-tag }}
volumes:
- /var/ocre-ci-files/:/var/ocre-ci-files/
- /usr/local/STMicroelectronics/:/usr/local/STMicroelectronics/
- /github/home/STMicroelectronics/:/github/home/STMicroelectronics/
options: --user root --device=/dev/ttyACM0 --device=/dev/bus
steps:
- name: Clean workspace
run: |
rm -rf ../.west || true
find . -name . -o -prune -exec rm -rf -- {} +
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
path: ocre-runtime
submodules: recursive
- name: Setup west environment
run: |
. /opt/zephyr-venv/bin/activate
west init -l ocre-runtime
west update
- name: Build and Flash Demo Sample
run: |
. /opt/zephyr-venv/bin/activate
west build -p always -b b_u585i_iot02a ocre-runtime/src/samples/demo/zephyr
west flash --extload=/usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/ExternalLoader/MX25LM51245G_STM32U585I-IOT02A.stldr --hex-file build/zephyr/merged.hex
demo-test:
name: Demo Validation Test
needs: demo-flash
runs-on: zephyr-xlarge-runner
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Run Demo Sample Test Case
run: |
cd tests_hw && bash beginTests.sh "demo"
- name: Print Demo Sample Test Case Logs
if: always()
run: |
cat /tmp/demo.log
build-flash-supervisor-set-1:
name: Build and Flash Supervisor with Image Set 1
needs: [setup-local-runner, demo-test]
runs-on: zephyr-xlarge-runner
container:
image: ghcr.io/${{ github.repository }}/devcontainer-zephyr:${{ inputs.devcontainer-tag }}
volumes:
- /var/ocre-ci-files/:/var/ocre-ci-files/
- /usr/local/STMicroelectronics/:/usr/local/STMicroelectronics/
- /github/home/STMicroelectronics/:/github/home/STMicroelectronics/
options: --user root --device=/dev/ttyACM0 --device=/dev/bus
steps:
- name: Clean workspace
run: |
rm -rf ../.west || true
find . -name . -o -prune -exec rm -rf -- {} +
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
path: ocre-runtime
submodules: recursive
- name: Setup west environment
run: |
. /opt/zephyr-venv/bin/activate
west init -l ocre-runtime
west update
- name: Build and Flash Supervisor
run: |
. /opt/zephyr-venv/bin/activate
west build -p always -b b_u585i_iot02a --shield wiznet_w5500 ocre-runtime/src/samples/supervisor/zephyr -- "-DOCRE_SDK_PRELOADED_IMAGES=hello-world.wasm;webserver-complex.wasm"
west flash --extload=/usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/ExternalLoader/MX25LM51245G_STM32U585I-IOT02A.stldr --hex-file build/zephyr/merged.hex
supervisor-test-set-1:
name: Supervisor Test Set 1
needs: build-flash-supervisor-set-1
runs-on: zephyr-xlarge-runner
strategy:
matrix:
test:
- name: Hello-World
group: supervisor-helloWorld
- name: Webserver-Complex
group: supervisor-webserverComplex
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Supervisor ${{ matrix.test.name }} Testcase
run: |
cd tests_hw && bash beginTests.sh ${{ matrix.test.group }}
- name: Print ${{ matrix.test.name }} Testcase Logs
if: always()
run: cat /tmp/${{ matrix.test.group }}.log