-
Notifications
You must be signed in to change notification settings - Fork 8
187 lines (166 loc) · 5.25 KB
/
tests.yml
File metadata and controls
187 lines (166 loc) · 5.25 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
name: gen_pack
on:
workflow_dispatch:
pull_request:
paths-ignore:
- '**/*.md'
push:
branches: [main]
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Install Ubuntu deps
run: |
sudo apt-get update
sudo apt-get install \
shellcheck
- uses: ammaraskar/gcc-problem-matcher@0f9c86f9e693db67dacf53986e1674de5f2e5f28 # master
- name: Run ShellCheck
run: |
shellcheck -s bash -f gcc gen-pack lib/*
cov:
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- name: Harden Runner
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
submodules: recursive
- name: Install Ubuntu deps
run: |
sudo apt-get update
sudo apt-get install \
dos2unix \
kcov
- name: Run kcov
run: |
./test/run_cov.sh
- name: Publish coverage report to QLTY
uses: qltysh/qlty-action/coverage@a19242102d17e497f437d7466aa01b528537e899 # v2.2.0
with:
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
files: ${{github.workspace}}/test/cov/all/kcov-merged/cov.xml
skip-errors: false
format: cobertura
verbose: true
tests:
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
fail-fast: true
matrix:
os: [ macos-14, macos-15, macos-26, ubuntu-22.04, ubuntu-24.04, ubuntu-22.04-arm, ubuntu-24.04-arm, windows-2022, windows-2025 ]
include:
- os: macos-26
target: darwin-arm64
archiveext: tar.gz
unarcmd: tar -xzf
- os: macos-15
target: darwin-arm64
archiveext: tar.gz
unarcmd: tar -xzf
- os: macos-14
target: darwin-arm64
archiveext: tar.gz
unarcmd: tar -xzf
- os: ubuntu-22.04
target: linux-amd64
archiveext: tar.gz
unarcmd: tar -xzf
- os: ubuntu-24.04
target: linux-amd64
archiveext: tar.gz
unarcmd: tar -xzf
- os: ubuntu-22.04-arm
target: linux-arm64
archiveext: tar.gz
unarcmd: tar -xzf
- os: ubuntu-24.04-arm
target: linux-arm64
archiveext: tar.gz
unarcmd: tar -xzf
- os: windows-2022
target: windows-amd64
archiveext: zip
unarcmd: 7z x
- os: windows-2025
target: windows-amd64
archiveext: zip
unarcmd: 7z x
env:
CMSIS_PACK_ROOT: ${{ github.workspace }}/.packs/
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: recursive
- name: Install Ubuntu deps
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt-get update
sudo apt-get install \
dos2unix \
libxml2-utils
- name: Install MacOS deps
if: ${{ startsWith(matrix.os, 'macos') }}
run: |
brew install \
bash \
coreutils \
dos2unix \
gnu-tar \
grep
- name: Set up Python 3
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.x'
- name: Verify Python
run: |
python3 --version
python3 -m http.server --help
- name: Install CMSIS-Toolbox
shell: bash
run: |
curl -L https://github.com/Open-CMSIS-Pack/cmsis-toolbox/releases/download/2.12.0/cmsis-toolbox-${{ matrix.target }}.${{ matrix.archiveext }} -o cmsis-toolbox-${{ matrix.target }}.${{ matrix.archiveext }}
${{ matrix.unarcmd }} cmsis-toolbox-${{ matrix.target }}.${{ matrix.archiveext }}
echo "$(pwd)/cmsis-toolbox-${{ matrix.target }}/bin" >> $GITHUB_PATH
- name: Install pack ARM.CMSIS
shell: bash
run: |
cpackget init https://www.keil.com/pack/index.pidx
cpackget add -a ARM.CMSIS
- name: Run unit tests
shell: bash
env:
LANG: en_GB.UTF-8
LC_ALL: en_GB.UTF-8
TMPDIR: ${{ github.workspace }}/../../tmp
run: |
mkdir -p ${TMPDIR}
./test/run_all.sh