Skip to content

Test get_started example #120

Test get_started example

Test get_started example #120

Workflow file for this run

name: Test get_started example
on:
workflow_dispatch:
pull_request:
branches: [main]
push:
branches: [main]
schedule:
- cron: '30 22 * * 0'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
actions: read
security-events: write
jobs:
build-and-run:
strategy:
fail-fast: true
matrix:
compiler: [AC6, GCC, CLANG]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install system packages
run: |
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get install libpython3.9 libtinfo5
- name: Cache packs
uses: actions/cache@v4
with:
key: packs-${{ github.run_id }}-${{ matrix.compiler }}
restore-keys: |
packs-
path: /home/runner/.cache/arm/packs
- name: Activate vcpkg
uses: ARM-software/cmsis-actions/vcpkg@v1
with:
cache: "-${{ matrix.compiler }}"
- name: Activate Arm tool license
uses: ARM-software/cmsis-actions/armlm@v1
- uses: ammaraskar/gcc-problem-matcher@master
if: matrix.compiler == 'GCC'
- name: Build
run: |
echo "Building get started example ..."
cbuild get_started.csolution.yml --packs --update-rte --context .debug+avh --toolchain ${{ matrix.compiler }}
- name: Execute
run: |
echo "Running get started example ..."
ext=""
case "${{ matrix.compiler }}" in
AC6) ext="axf" ;;
GCC) ext="elf";;
CLANG) ext="elf" ;;
esac
FVP_MPS2_Cortex-M3 --simlimit 10 -f fvp-config.txt -a out/hello/avh/debug/hello.${ext} | tee model.log
echo "Checking output..."
grep "Hello World" model.log | wc -l
test "$(grep "Hello World" model.log | wc -l)" -eq 10