forked from Open-CMSIS-Pack/cmsis-toolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
134 lines (114 loc) · 3.89 KB
/
e2e_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
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
name: E2E Tests
on:
pull_request:
paths:
- '.github/workflows/e2e_test.yaml'
- '.github/matrix_includes.json'
- 'test/**'
- '!test/RobotTests.md'
- '!test/tests.py'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
matrix_prep:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: JoshuaTheMiller/conditional-build-matrix@v2.0.1
id: set-matrix
with:
inputFile: '.github/matrix_includes.json'
filter: '[?runOnBranch==`always`]'
test:
needs: [ matrix_prep ]
runs-on: ${{ matrix.runs_on }}
continue-on-error: true
strategy:
matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install pip dependencies
run: |
pip install --upgrade pip
pip install -r test/requirements.txt
- name: Setup vcpkg environment
uses: ARM-software/cmsis-actions/vcpkg@v1
with:
config: "./test/vcpkg-configuration.json"
vcpkg-downloads: "${{ github.workspace }}/.vcpkg/downloads"
cache: "-"
- name: Activate Arm tool license
run: |
armlm activate --server https://mdk-preview.keil.arm.com --product KEMDK-COM0
working-directory: ./test
- name: Binary version info
shell: bash
run: |
csolution${{ matrix.binary_extension }} -V
cpackget${{ matrix.binary_extension }} -V
cbuild${{ matrix.binary_extension }} -V
cbuild2cmake${{ matrix.binary_extension }} -V
cbuildgen${{ matrix.binary_extension }} -V
- name: Run Test
shell: bash
run: |
robot --outputdir reports-${{ matrix.target }}-${{ matrix.arch }} \
--settag ${{ matrix.target }}-${{ matrix.arch }} \
--name ${{ matrix.target }}-${{ matrix.arch }} \
./test
- name: Archieve test results
if: always()
uses: actions/upload-artifact@v4
with:
name: reports-${{ matrix.target }}-${{ matrix.arch }}
path: reports-${{ matrix.target }}-${{ matrix.arch }}
report:
runs-on: ubuntu-latest
if: always()
needs: test
permissions: write-all
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install pip dependencies
run: |
pip install --upgrade pip
pip install -r test/requirements.txt
- name: Download reports
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: reports-*
- name: Consolidate robot test results
working-directory: artifacts
run: |
python -m robot.rebot --name Collective_Robot_Results --outputdir collective_robot_results --output output.xml \
./reports-windows-amd64/output.xml \
./reports-linux-amd64/output.xml \
./reports-darwin-amd64/output.xml
- name: Generate Summary report
if: always()
run: |
python ./test/lib/execution_summary.py artifacts -o artifacts/collective_robot_results/output.xml -m summary_report.md
- name: Print E2E Report
if: always()
run: cat summary_report.md >> $GITHUB_STEP_SUMMARY
- name: Archieve consolidated test results
if: always()
uses: actions/upload-artifact@v4
with:
name: consolidated-reports
path: artifacts/collective_robot_results