-
Notifications
You must be signed in to change notification settings - Fork 0
139 lines (118 loc) · 5.17 KB
/
Test-MDK-Middleware-RefApps.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
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
name: Test MDK-Middleware RefApps # MDK-Middleware Reference Applications (Examples)
on:
workflow_dispatch:
pull_request:
branches: [main]
push:
branches: [main]
schedule:
- cron: '00 20 * * 6'
jobs:
Test: # Install tools, build
runs-on: ubuntu-latest
env:
TARGET_BOARD: NUCLEO-H743ZI2
strategy:
fail-fast: false
matrix:
solution: [
# {name: FileSystem, dir: FileSystem, layer_ac6: ./BSP/Layers/Default, layer_gcc: ./.ci/Layers/Default_GCC},
{name: Network, dir: Network, layer_ac6: ./BSP/Layers/Default, layer_gcc: ./.ci/Layers/Default_GCC},
{name: USB_Device, dir: USB/Device, layer_ac6: ./BSP/Layers/Default, layer_gcc: ./.ci/Layers/Default_GCC},
# {name: USB_Host, dir: USB/Host, layer_ac6: ./BSP/Layers/Default, layer_gcc: ./.ci/Layers/Default_GCC}
]
steps:
- name: Checkout .ci folder
uses: actions/checkout@v4
with:
sparse-checkout: |
.ci
- name: Install tools
uses: ARM-software/cmsis-actions/vcpkg@v1
with:
config: "./.ci/vcpkg-configuration.json"
- name: Activate Arm tool license
uses: ARM-software/cmsis-actions/armlm@v1
- name: Checkout current repository
uses: actions/checkout@v4
with:
path: ./BSP
- name: Checkout STM32H7xx_DFP
uses: actions/checkout@v4
with:
repository: Open-CMSIS-Pack/STM32H7xx_DFP
path: ./DFP
- name: Checkout MDK-Middleware
uses: actions/checkout@v4
with:
repository: ARM-software/MDK-Middleware
path: ./MDK-Middleware
- name: Checkout CMSIS-Driver_STM32
uses: actions/checkout@v4
with:
repository: Open-CMSIS-Pack/CMSIS-Driver_STM32
path: ./Drivers
- name: Initialize CMSIS pack root folder
run: |
cpackget init https://www.keil.com/pack/index.pidx
cpackget update-index
- name: Add local CMSIS packs
run: |
cpackget add ./BSP/Keil.NUCLEO-H743ZI2_BSP.pdsc
cpackget add ./DFP/Keil.STM32H7xx_DFP.pdsc
cpackget add ./MDK-Middleware/Keil.MDK-Middleware.pdsc
cpackget add ./Drivers/ARM.CMSIS-Driver_STM32.pdsc
- name: Copy example structure to CI/MW-RefApps/ folder
working-directory: ./
run: |
mkdir -p ./CI/MW-RefApps/Examples/
mkdir -p ./CI/MW-RefApps/Examples/${{ matrix.solution.dir }}/Board/
cp -rf ./MDK-Middleware/Examples/* ./CI/MW-RefApps/Examples/
if [ -e ./.ci/MW-RefApps/Examples/${{ matrix.solution.dir }}/${{ matrix.solution.name }}.csolution.yml ]
then
cp -rf ./.ci/MW-RefApps/Examples/${{ matrix.solution.dir }}/${{ matrix.solution.name }}.csolution.yml ./CI/MW-RefApps/Examples/${{ matrix.solution.dir }}/${{ matrix.solution.name }}.csolution.yml
fi
sed -i "s|target-types:|&\n - type: $TARGET_BOARD\n board: $TARGET_BOARD\n variables:\n - Board-Layer: \$SolutionDir()\$/Board/Board.clayer.yml|" ./CI/MW-RefApps/Examples/${{ matrix.solution.dir }}/${{ matrix.solution.name }}.csolution.yml
- name: Update board layer for ${{ matrix.solution.name }} AC6 build test
if: always()
working-directory: ./
run: |
cp -rf ${{ matrix.solution.layer_ac6 }}/* ./CI/MW-RefApps/Examples/${{ matrix.solution.dir }}/Board/ # Copy the Board layer
- name: ${{ matrix.solution.name }} AC6 build test
if: always()
working-directory: ./CI/MW-RefApps/Examples/${{ matrix.solution.dir }}/
run: |
cbuild ./${{ matrix.solution.name }}.csolution.yml --update-rte --packs \
--toolchain AC6 --rebuild
- name: Upload Artifact of the ${{ matrix.solution.name }} AC6 build
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.solution.name }}_AC6
path: |
./CI/MW-RefApps/Examples/${{ matrix.solution.dir }}/
!./CI/MW-RefApps/Examples/${{ matrix.solution.dir }}/tmp/
retention-days: 1
- name: Update board layer for ${{ matrix.solution.name }} GCC build test
if: always()
working-directory: ./
run: |
rm -rf ./CI/MW-RefApps/Examples/${{ matrix.solution.dir }}/Board/*
cp -rf ${{ matrix.solution.layer_gcc }}/* ./CI/MW-RefApps/Examples/${{ matrix.solution.dir }}/Board/ # Copy the Board layer
- name: ${{ matrix.solution.name }} GCC build test
if: always()
working-directory: ./CI/MW-RefApps/Examples/${{ matrix.solution.dir }}/
run: |
rm -rf out
rm -rf tmp
cbuild ./${{ matrix.solution.name }}.csolution.yml --update-rte --packs \
--toolchain GCC --rebuild
- name: Upload Artifact of the ${{ matrix.solution.name }} GCC build
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.solution.name }}_GCC
path: |
./CI/MW-RefApps/Examples/${{ matrix.solution.dir }}/
!./CI/MW-RefApps/Examples/${{ matrix.solution.dir }}/tmp/
retention-days: 1