forked from ARMmbed/mbed-os
-
Notifications
You must be signed in to change notification settings - Fork 18
57 lines (57 loc) · 2 KB
/
target_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
name: target-tests
run-name: Run tests on targets
on: [push]
jobs:
test-boards:
strategy:
matrix:
target:
# - MBED_TARGET: LPC1768
# UPLOAD_METHOD: OPENOCD
# MBED_GREENTEA_SERIAL_PORT: /dev/ttyLPC1768
# OPENOCD_ADAPTER_SERIAL: 10102fa5c13a566eac31a28051fd06540eb7
- MBED_TARGET: NUCLEO_L452RE_P
UPLOAD_METHOD: OPENOCD
MBED_GREENTEA_SERIAL_PORT: /dev/ttyNUCLEO_L452RE_P
OPENOCD_ADAPTER_SERIAL: 066CFF515055657867071915
- MBED_TARGET: NUCLEO_H743ZI2
UPLOAD_METHOD: OPENOCD
MBED_GREENTEA_SERIAL_PORT: /dev/ttyNUCLEO_H743ZI2
OPENOCD_ADAPTER_SERIAL: 003C00193438510234313939
runs-on: ${{ matrix.target.MBED_TARGET }}
env:
BUILD_DIR: /home/victor/runner-shared/build_${{ matrix.target.MBED_TARGET }}
JUNIT_OUTPUT: ${{ github.workspace }}/mbed-tests-${{ matrix.target.MBED_TARGET }}.xml
steps:
- uses: actions/checkout@v4
- name: Create build directory
run: |
mkdir -p "$BUILD_DIR"
cd "$BUILD_DIR"
- name: Configure cmake
run: >
cmake
${{ github.workspace }}
-GNinja
-DCMAKE_BUILD_TYPE=Develop
-DMBED_TARGET=${{ matrix.target.MBED_TARGET }}
-DMBED_BUILD_GREENTEA_TESTS=ON
-DMBED_GREENTEA_SERIAL_PORT=${{ matrix.target.MBED_GREENTEA_SERIAL_PORT }}
-DUPLOAD_METHOD=${{ matrix.target.UPLOAD_METHOD }}
-DOPENOCD_ADAPTER_SERIAL=${{ matrix.target.OPENOCD_ADAPTER_SERIAL }}
- name: Compile
run: ninja
- name: Run ctest
run: >
ctest
--repeat until-pass:3
--output-on-failure
--output-junit "$JUNIT_OUTPUT"
--test-output-size-passed 100000
--test-output-size-failed 100000
.
- name: Archive ctest results
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: "$JUNIT_OUTPUT"