1616
1717concurrency :
1818 group : ${{ github.workflow }}-${{ github.ref }}
19- cancel-in-progress : true # Cancel previous runs on new push
19+ cancel-in-progress : true
2020
2121jobs :
2222 install_build_execute :
2323 runs-on : ubuntu-24.04-arm
2424
25+ strategy :
26+ fail-fast : false
27+ matrix :
28+ compiler : [
29+ {name: AC6, ext: axf},
30+ {name: GCC, ext: elf}
31+ ]
32+ target : [
33+ {type: CM0, model: FVP_MPS2_Cortex-M0, uart: fvp_mps2.UART0},
34+ {type: CM0plus, model: FVP_MPS2_Cortex-M0plus, uart: fvp_mps2.UART0},
35+ {type: CM3, model: FVP_MPS2_Cortex-M3, uart: fvp_mps2.UART0},
36+ {type: CM4, model: FVP_MPS2_Cortex-M4, uart: fvp_mps2.UART0},
37+ {type: CM4_FP, model: FVP_MPS2_Cortex-M4, uart: fvp_mps2.UART0},
38+ {type: CM7, model: FVP_MPS2_Cortex-M7, uart: fvp_mps2.UART0},
39+ {type: CM7_SP, model: FVP_MPS2_Cortex-M7, uart: fvp_mps2.UART0},
40+ {type: CM7_DP, model: FVP_MPS2_Cortex-M7, uart: fvp_mps2.UART0},
41+ {type: CM23, model: FVP_MPS2_Cortex-M23, uart: fvp_mps2.UART0},
42+ {type: CM33, model: FVP_MPS2_Cortex-M33, uart: fvp_mps2.UART0},
43+ {type: CM33_FP, model: FVP_MPS2_Cortex-M33, uart: fvp_mps2.UART0},
44+ {type: CS300, model: FVP_Corstone_SSE-300, uart: mps3_board.uart0},
45+ {type: CS310, model: FVP_Corstone_SSE-310, uart: mps3_board.uart0},
46+ {type: CS315, model: FVP_Corstone_SSE-315, uart: mps4_board.uart0},
47+ {type: CS320, model: FVP_Corstone_SSE-320, uart: mps4_board.uart0}
48+ ]
49+ build : [
50+ {type: Release},
51+ {type: Debug}
52+ ]
53+
2554 steps :
2655 - name : Checkout repo
2756 uses : actions/checkout@v6
@@ -35,21 +64,32 @@ jobs:
3564 - name : Cache packs
3665 uses : actions/cache@v5
3766 with :
38- key : cmsis-packs-${{ hashFiles('*.csolution.yml', '*.cproject.yml') }}
39- restore-keys : |
40- cmsis-packs-
67+ key : cmsis-packs
4168 path : /home/runner/.cache/arm/packs
4269
43- - name : Build and Execute All Configurations
70+ - name : Build context Hello.${{ matrix.build.type }}+${{ matrix.target.type }} with ${{ matrix.compiler.name }}
4471 working-directory : ./
4572 run : |
46- chmod +x .github/scripts/run-tests.sh
47- .github/scripts/run-tests.sh .github/test-matrix.json
73+ cbuild Hello.csolution.yml --packs \
74+ --context Hello.${{ matrix.build.type }}+${{ matrix.target.type }} \
75+ --toolchain ${{ matrix.compiler.name }} --rebuild
4876
49- - name : Upload Failed Test Logs
50- if : failure()
51- uses : actions/upload-artifact@v6
52- with :
53- name : failed-test-logs-${{ github.workflow }}
54- path : logs/
55- retention-days : 30
77+ - name : Execute context Hello.${{ matrix.build.type }}+${{ matrix.target.type }} with ${{ matrix.compiler.name }}
78+ working-directory : ./
79+ run : |
80+ ${{ matrix.target.model }} \
81+ -a ./out/Hello/${{ matrix.target.type }}/${{ matrix.build.type }}/${{ matrix.compiler.name }}/Hello.${{ matrix.compiler.ext }} \
82+ -f ./FVP/${{ matrix.target.model }}/fvp_config.txt \
83+ -C ${{ matrix.target.uart }}.out_file=./out/Hello/${{ matrix.target.type }}/${{ matrix.build.type }}/${{ matrix.compiler.name }}/fvp_stdout.log \
84+ --simlimit 60 --stat
85+
86+ echo " Show simulation UART output"
87+ cat ./out/Hello/${{ matrix.target.type }}/${{ matrix.build.type }}/${{ matrix.compiler.name }}/fvp_stdout.log
88+
89+ echo "Checking simulation UART output"
90+ if [ "$(grep -c "Hello World 100" ./out/Hello/${{ matrix.target.type }}/${{ matrix.build.type }}/${{ matrix.compiler.name }}/fvp_stdout.log)" -eq 1 ]
91+ then
92+ exit 0
93+ else
94+ exit 1
95+ fi
0 commit comments