forked from FreeRTOS/FreeRTOS
-
Notifications
You must be signed in to change notification settings - Fork 1
597 lines (559 loc) · 20.1 KB
/
freertos_demos.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
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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
name: FreeRTOS Demos
on:
push:
pull_request:
workflow_dispatch:
env:
bashPass: \033[32;1mPASSED -
bashWarn: \033[33;1mWARNING -
bashFail: \033[31;1mFAILED -
bashEnd: \033[0m
pwshPass: "`e[32;1mPASSED -"
pwshWarn: "`e[33;1mWARNING -"
pwshFail: "`e[31;1mFAILED -"
pwshEnd: "`e[0m"
jobs:
WIN32-MSVC:
name: WIN32 MSVC
runs-on: windows-latest
steps:
- env:
stepName: Checkout Repository
name: ${{ env.stepName }}
uses: actions/checkout@v3
- env:
stepName: Fetch Required Submodule
name: ${{ env.stepName }}
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
set +e
git submodule update --checkout --init --depth 1 \
FreeRTOS/Source \
FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace
exitStatus=$?
set -e
echo -e "::endgroup::"
if [ $exitStatus -eq 0 ]; then
echo -e "${{ env.bashPass }} ${{env.stepName}} ${{ env.bashEnd }}"
else
echo -e "${{ env.bashFail }} ${{env.stepName}} ${{ env.bashEnd }}"
exit 1
fi
- env:
stepName: Add msbuild to PATH
name: ${{ env.stepName }}
uses: microsoft/[email protected]
- env:
stepName: Build WIN32-MSVC Full Demo
name: ${{ env.stepName }}
id: build-win32-msvs-full-demo
working-directory: FreeRTOS/Demo/WIN32-MSVC
run: |
# ${{ env.stepName }}
echo "::group::${{ env.stepName }}"
$content = Get-Content -Path 'main.c' -Raw
$newContent = $content -replace 'int\s+main(.*?)void(.*?)\r?\n\s*{', 'int main( void ){setvbuf( stdout, NULL, _IONBF, 0 );'
$newContent | Set-Content -Path 'main.c'
msbuild WIN32.sln -t:rebuild
$exitStatus = $?
echo "::endgroup::"
if($exitStatus -eq 1) {
echo "${{ env.pwshPass }} ${{env.stepName}} ${{ env.pwshEnd }}"
}else {
echo "${{ env.pwshFail }} ${{env.stepName}} ${{ env.pwshEnd }}"
exit 1
}
- env:
stepName: Run and monitor WIN32-MSVC Full Demo
name: ${{ env.stepName }}
uses: FreeRTOS/CI-CD-GitHub-Actions/executable-monitor@main
with:
exe-path: FreeRTOS/Demo/WIN32-MSVC/Debug/RTOSDemo.exe
timeout-seconds: 60
success-line: "No errors - tick count"
retry-attempts: 3
- env:
stepName: Build WIN32-MSVC Blinky Demo
name: ${{ env.stepName }}
id: build-win32-msvs-blinky-demo
working-directory: FreeRTOS/Demo/WIN32-MSVC
run: |
# ${{ env.stepName }}
echo "::group::${{ env.stepName }}"
$content = Get-Content -Path 'main.c' -Raw
$newContent = $content -replace '#define\s+mainCREATE_SIMPLE_BLINKY_DEMO_ONLY\s+0', '#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1'
$newContent | Set-Content -Path 'main.c'
msbuild WIN32.sln -t:rebuild
echo "::endgroup::"
$exitStatus = $?
if($exitStatus -eq 1) {
echo "${{ env.pwshPass }} ${{ env.stepName }} ${{ env.pwshEnd }}"
}else {
echo "${{ env.pwshFail }} ${{ env.stepName }} ${{ env.pwshEnd }}"
exit 1
}
- env:
stepName: Run and monitor WIN32-MSVC Blinky Demo
name: ${{ env.stepName }}
uses: FreeRTOS/CI-CD-GitHub-Actions/executable-monitor@main
with:
exe-path: FreeRTOS/Demo/WIN32-MSVC/Debug/RTOSDemo.exe
timeout-seconds: 60
success-line: "Message received from software timer"
retry-attempts: 3
- env:
stepName: Build WIN32-MSVC-Static-Allocation-Only Demo
name: ${{ env.stepName }}
id: build-win32-msvs-static-allocation-only-demo
working-directory: FreeRTOS/Demo/WIN32-MSVC-Static-Allocation-Only
run: |
# ${{ env.stepName }}
echo "::group::${{ env.stepName }}"
$content = Get-Content -Path 'main.c' -Raw
$newContent = $content -replace 'int\s+main(.*?)void(.*?)\r?\n\s*{', 'int main( void ){setvbuf( stdout, NULL, _IONBF, 0 );'
$newContent | Set-Content -Path 'main.c'
msbuild WIN32.sln -t:rebuild
$exitStatus = $?
echo "::endgroup::"
if($exitStatus -eq 1) {
echo "${{ env.pwshPass }} ${{ env.stepName }} ${{ env.pwshEnd }}"
}else {
echo "${{ env.pwshFail }} ${{ env.stepName }} ${{ env.pwshEnd }}"
exit 1
}
- env:
stepName:
Run and monitor WIN32-MSVC-Static-Allocation-Only Demo
name: ${{ env.stepName }}
uses: FreeRTOS/CI-CD-GitHub-Actions/executable-monitor@main
with:
exe-path: FreeRTOS/Demo/WIN32-MSVC-Static-Allocation-Only/Debug/RTOSDemo.exe
timeout-seconds: 60
success-line: "No errors - tick count"
retry-attempts: 3
WIN32-MingW:
name: WIN32 MingW
runs-on: windows-latest
steps:
- env:
stepName: Checkout Repository
name: ${{ env.stepName }}
uses: actions/checkout@v3
- env:
stepName: Fetch Required Submodule
name: ${{ env.stepName }}
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
git submodule update --checkout --init --depth 1 \
FreeRTOS/Source \
FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace
echo -e "::endgroup::"
echo -e "${{ env.bashPass }} ${{env.stepName}} ${{ env.bashEnd }}"
- env:
stepName: Build WIN32-MingW Full Demo
name: ${{ env.stepName }}
id: build-win32-mingw-full-demo
working-directory: FreeRTOS/Demo/WIN32-MingW
run: |
# ${{ env.stepName }}
echo "::group::${{ env.stepName }}"
$content = Get-Content -Path 'main.c' -Raw
$newContent = $content -replace 'int\s+main(.*?)void(.*?)\r?\n\s*{', 'int main( void ){setvbuf( stdout, NULL, _IONBF, 0 );'
$newContent | Set-Content -Path 'main.c'
gcc --version
make --version
make
$exitStatus = $?
echo "::endgroup::"
if($exitStatus -eq 1) {
echo "${{ env.pwshPass }} ${{ env.stepName }} ${{env.pwshEnd}}"
}else {
echo "${{ env.pwshFail }} ${{ env.stepName }} ${{env.pwshEnd}}"
exit 1
}
- env:
stepName: Run and monitor WIN32-MingW Full Demo
name: ${{ env.stepName }}
uses: FreeRTOS/CI-CD-GitHub-Actions/executable-monitor@main
with:
exe-path: FreeRTOS/Demo/WIN32-MingW/build/RTOSDemo.exe
timeout-seconds: 60
success-line: "No errors - tick count"
- env:
stepName: Build WIN32-MingW Blinky Demo
name: ${{ env.stepName }}
id: build-win32-mingw-blinky-demo
working-directory: FreeRTOS/Demo/WIN32-MingW
run: |
# ${{ env.stepName }}
echo "::group::${{ env.stepName }}"
$content = Get-Content -Path 'main.c' -Raw
$newContent = $content -replace '#define\s+mainCREATE_SIMPLE_BLINKY_DEMO_ONLY\s+0', '#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1'
$newContent = $newContent -replace 'int\s+main(.*?)void(.*?)\r?\n\s*{', 'int main( void ){setvbuf( stdout, NULL, _IONBF, 0 );'
$newContent | Set-Content -Path 'main.c'
gcc --version
make --version
make
$exitStatus = $?
echo "::endgroup::"
if($exitStatus -eq 1) {
echo "${{ env.pwshPass }} ${{ env.stepName }} ${{ env.pwshEnd }}"
}else {
echo "${{ env.pwshFail }} ${{ env.stepName }} ${{ env.pwshEnd }}"
exit 1
}
- env:
stepName: Run and monitor WIN32-MingW Blinky Demo
name: ${{ env.stepName }}
uses: FreeRTOS/CI-CD-GitHub-Actions/executable-monitor@main
with:
exe-path: FreeRTOS/Demo/WIN32-MingW/build/RTOSDemo.exe
timeout-seconds: 60
success-line: "Message received from software timer"
POSIX-GCC:
name: Posix GCC
runs-on: ubuntu-latest
steps:
- env:
stepName: Checkout Repository
name: ${{ env.stepName }}
uses: actions/checkout@v3
- env:
stepName: Fetch Required Submodule
name: ${{ env.stepName }}
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
set +e
git submodule update --checkout --init --depth 1 \
FreeRTOS/Source \
FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace
set -e
exitStatus=$?
set -e
echo -e "::endgroup::"
if [ $exitStatus -eq 0 ]; then
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
else
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}"
exit 1
fi
- env:
stepName: Install GCC
name: ${{ env.stepName }}
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
set +e
sudo apt-get -y update
sudo apt-get -y install build-essential
exitStatus=$?
set -e
echo -e "::endgroup::"
if [ $exitStatus -eq 0 ]; then
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
else
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
exit 1
fi
- env:
stepName: Build Posix_GCC Full Demo
name: ${{ env.stepName }}
id: build-posix-gcc-full-demo
shell: bash
working-directory: FreeRTOS/Demo/Posix_GCC
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
set +e
sed -i -z "s/int[[:space:]]*main[[:space:]]*([[:space:]]*void[[:space:]]*)\n{/int main( void ){setvbuf( stdout, NULL, _IONBF, 0 );/g" main.c
make -j
exitStatus=$?
set -e
echo -e "::endgroup::"
if [ $exitStatus -eq 0 ]; then
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
else
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}"
exit 1
fi
- env:
stepName: Run and monitor Posix_GCC Full Demo
name: ${{ env.stepName }}
uses: FreeRTOS/CI-CD-GitHub-Actions/executable-monitor@main
with:
exe-path: FreeRTOS/Demo/Posix_GCC/build/posix_demo
timeout-seconds: 60
success-line: "OK: No errors"
retry-attempts: 3
- env:
stepName: Build Posix_GCC Blinky Demo
name: ${{ env.stepName }}
id: build-posix-gcc-blinky-demo
shell: bash
working-directory: FreeRTOS/Demo/Posix_GCC
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
rm -rf build
set +e
make -j USER_DEMO=BLINKY_DEMO
exitStatus=$?
set -e
echo -e "::endgroup::"
if [ $exitStatus -eq 0 ]; then
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
else
echo -e "${{ env.bashFail }} ${{env.stepName}} ${{ env.bashEnd }}"
exit 1
fi
- env:
stepName: Run and monitor Posix_GCC Blinky Demo
name: ${{ env.stepName }}
uses: FreeRTOS/CI-CD-GitHub-Actions/executable-monitor@main
with:
exe-path: FreeRTOS/Demo/Posix_GCC/build/posix_demo
timeout-seconds: 60
success-line: "Message received from software timer"
MSP430-GCC:
name: GNU MSP430 Toolchain
runs-on: ubuntu-latest
steps:
- env:
stepName: Checkout Repository
name: ${{ env.stepName }}
uses: actions/checkout@v3
with:
submodules: true
- env:
stepName: Fetch Kernel Submodule
name: ${{ env.stepName }}
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
set +e
git submodule update --checkout --init --depth 1 FreeRTOS/Source
exitStatus=$?
set -e
echo -e "::endgroup::"
if [ $exitStatus -eq 0 ]; then
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
else
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}"
exit 1
fi
- env:
stepName: Install MSP430 Toolchain
name: ${{ env.stepName }}
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
set +e
sudo apt-get -y update
sudo apt-get -y install gcc-msp430 build-essential
exitStatus=$?
set -e
echo -e "::endgroup::"
if [ $exitStatus -eq 0 ]; then
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
else
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}"
exit 1
fi
- env:
stepName: Build msp430_GCC Demo
name: ${{ env.stepName }}
shell: bash
working-directory: FreeRTOS/Demo/msp430_GCC
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
set +e
make -j
exitStatus=$?
set -e
echo -e "::endgroup::"
if [ $exitStatus -eq 0 ]; then
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
else
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}"
exit 1
fi
ARM-GCC:
name: GNU ARM Toolchain
runs-on: ubuntu-latest
steps:
- env:
stepName: Checkout Repository
name: ${{ env.stepName }}
uses: actions/checkout@v3
- env:
stepName: Fetch Kernel Submodule
name: ${{ env.stepName }}
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
set +e
git submodule update --checkout --init --depth 1 FreeRTOS/Source FreeRTOS/Demo/ThirdParty/Community-Supported-Demos
exitStatus=$?
set -e
echo -e "::endgroup::"
if [ $exitStatus -eq 0 ]; then
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
else
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}"
exit 1
fi
- env:
stepName: Install GNU ARM Toolchain
name: Install GNU ARM Toolchain
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
set +e
sudo apt-get -y update
sudo apt-get -y install gcc-arm-none-eabi build-essential cmake git ninja-build python3-minimal
sudo apt-get -y install qemu-system-arm qemu-efi
exitStatus=$?
set -e
echo -e "::endgroup::"
if [ $exitStatus -eq 0 ]; then
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
else
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}"
exit 1
fi
- env:
stepName: Build CORTEX_MPU_M3_MPS2_QEMU_GCC Demo
name: ${{ env.stepName }}
shell: bash
working-directory: FreeRTOS/Demo/CORTEX_MPU_M3_MPS2_QEMU_GCC
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
set +e
make -j
exitStatus=$?
set -e
echo -e "::endgroup::"
if [ $exitStatus -eq 0 ]; then
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
else
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}"
exit 1
fi
- env:
stepName: Build CORTEX_LM3S102_GCC Demo
name: ${{ env.stepName }}
shell: bash
working-directory: FreeRTOS/Demo/CORTEX_LM3S102_GCC
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
set +e
make clean
make -j
exitStatus=$?
set -e
echo -e "::endgroup::"
if [ $exitStatus -eq 0 ]; then
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
else
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}"
exit 1
fi
- env:
stepName: Build CORTEX_LM3S811_GCC Demo
name: ${{ env.stepName }}
shell: bash
working-directory: FreeRTOS/Demo/CORTEX_LM3S811_GCC
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
set +e
make -j
exitStatus=$?
set -e
echo -e "::endgroup::"
if [ $exitStatus -eq 0 ]; then
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
else
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}"
exit 1
fi
- env:
stepName: Build CORTEX_M0+_RP2040 Demos
name: ${{ env.stepName }}
shell: bash
working-directory: FreeRTOS/Demo/ThirdParty/Community-Supported-Demos/CORTEX_M0+_RP2040
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
set +e
git clone https://github.com/raspberrypi/pico-sdk.git
cmake -B build -DPICO_SDK_PATH=pico-sdk -GNinja
ninja -C build --verbose
exitStatus=$?
set -e
echo -e "::endgroup::"
if [ $exitStatus -eq 0 ]; then
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
else
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}"
exit 1
fi
- env:
stepName: Build Qemu Runner File
name: ${{ env.stepName }}
shell: bash
working-directory: .github/scripts
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
gcc qemu_reader.c -o ../../FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/qemu_reader.out
exitStatus=$?
echo -e "::endgroup::"
if [ $exitStatus -eq 0 ]; then
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
else
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}"
exit 1
fi
- env:
stepName: Build CORTEX_MPS2_QEMU_IAR_GCC Demo
name: ${{ env.stepName }}
shell: bash
working-directory: FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.stepName }}"
set +e
make -C build/gcc -j
exitStatus=$?
set -e
echo -e "::endgroup::"
if [ $exitStatus -eq 0 ]; then
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
else
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}"
exit 1
fi
- env:
stepName: Run and monitor CORTEX_MPS2_QEMU_IAR_GCC Demo
name: ${{ env.stepName }}
uses: FreeRTOS/CI-CD-GitHub-Actions/executable-monitor@main
with:
exe-path: FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/qemu_reader.out
timeout-seconds: 20
success-line: "Message received from software timer"
retry-attempts: 1