Skip to content

Merge pull request #1 from Evagan2018/main #5

Merge pull request #1 from Evagan2018/main

Merge pull request #1 from Evagan2018/main #5

Workflow file for this run

name: Test Build and Execution
on:
workflow_dispatch:
pull_request:
branches: [main]
push:
branches: [main]
schedule:
- cron: '0 6 * * 1'
jobs:
install_build_execute:
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [
{name: AC6, ext: axf},
{name: GCC, ext: elf}
]
target: [
{type: CM0, model: FVP_MPS2_Cortex-M0, uart: fvp_mps2.UART0},
{type: CM0plus, model: FVP_MPS2_Cortex-M0plus, uart: fvp_mps2.UART0},
{type: CM3, model: FVP_MPS2_Cortex-M3, uart: fvp_mps2.UART0},
{type: CM4, model: FVP_MPS2_Cortex-M4, uart: fvp_mps2.UART0},
{type: CM4_FP, model: FVP_MPS2_Cortex-M4, uart: fvp_mps2.UART0},
{type: CM7, model: FVP_MPS2_Cortex-M7, uart: fvp_mps2.UART0},
{type: CM7_SP, model: FVP_MPS2_Cortex-M7, uart: fvp_mps2.UART0},
{type: CM7_DP, model: FVP_MPS2_Cortex-M7, uart: fvp_mps2.UART0},
{type: CM23, model: FVP_MPS2_Cortex-M23, uart: fvp_mps2.UART0},
{type: CM33, model: FVP_MPS2_Cortex-M33, uart: fvp_mps2.UART0},
{type: CM33_FP, model: FVP_MPS2_Cortex-M33, uart: fvp_mps2.UART0},
{type: CS300, model: FVP_Corstone_SSE-300, uart: mps3_board.uart0},
{type: CS310, model: FVP_Corstone_SSE-310, uart: mps3_board.uart0},
{type: CS315, model: FVP_Corstone_SSE-315, uart: mps4_board.uart0}
]
build: [
{type: Release},
{type: Debug}
]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install tools
uses: ARM-software/cmsis-actions/vcpkg@v1
- name: Activate Arm tool license
uses: ARM-software/cmsis-actions/armlm@v1
- name: Cache packs
uses: actions/cache@v4
with:
key: cmsis-packs
path: /home/runner/.cache/arm/packs
- name: Build context Hello.${{ matrix.build.type }}+${{ matrix.target.type }} with ${{ matrix.compiler.name }}
working-directory: ./
run: |
cbuild Hello.csolution.yml --update-rte --packs \
--context Hello.${{ matrix.build.type }}+${{ matrix.target.type }} \
--toolchain ${{ matrix.compiler.name }} --rebuild
- name: Execute context Hello.${{ matrix.build.type }}+${{ matrix.target.type }} with ${{ matrix.compiler.name }}
working-directory: ./
run: |
${{ matrix.target.model }} \
-a ./out/Hello/${{ matrix.target.type }}/${{ matrix.build.type }}/${{ matrix.compiler.name }}/Hello.${{ matrix.compiler.ext }} \
-f ./FVP/${{ matrix.target.model }}/fvp_config.txt \
-C ${{ matrix.target.uart }}.out_file=./out/Hello/${{ matrix.target.type }}/${{ matrix.build.type }}/${{ matrix.compiler.name }}/fvp_stdout.log \
--simlimit 60 --stat
echo " Show simulation UART output"
cat ./out/Hello/${{ matrix.target.type }}/${{ matrix.build.type }}/${{ matrix.compiler.name }}/fvp_stdout.log
echo "Checking simulation UART output"
if [ "$(grep -c "Hello World 100" ./out/Hello/${{ matrix.target.type }}/${{ matrix.build.type }}/${{ matrix.compiler.name }}/fvp_stdout.log)" -eq 1 ]
then
exit 0
else
exit 1
fi