Compile - Run - Report #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compile - Run - Report | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
schedule: | |
- cron: '30 22 * * 0' # Run every Sunday at 22:30 | |
permissions: | |
contents: read | |
actions: read | |
checks: write | |
jobs: | |
CI_test_run: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Install Python used by the report utility | |
- name: Setup Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- run: | |
pip install junit_reporter | |
# Install system packages required by FVP VSI extensions | |
- name: Install system packages | |
run: | | |
sudo add-apt-repository ppa:deadsnakes/ppa | |
sudo apt-get install libpython3.9 libtinfo5 | |
# Install vcpkg tools from the vcpkg-configuration.json and activate an Arm tools license | |
- name: Activate vcpkg | |
uses: ARM-software/cmsis-actions/vcpkg@v1 | |
- name: Activate Arm tool license | |
uses: ARM-software/cmsis-actions/armlm@v1 | |
# Build the project, run the test and convert the log to junit format | |
- name: Build | |
run: | | |
echo "Building get started example ..." | |
cbuild get_started.csolution.yml --packs --update-rte --context .debug+avh | |
- name: Execute | |
run: | | |
echo "Running get started example ..." | |
FVP_MPS2_Cortex-M3 --simlimit 10 -f Project/fvp_config.txt -a out/Project/avh/debug/Project.axf | tee Project.avh.log | |
- name: Convert log to junit | |
run: | | |
echo "Converting log to junit..." | |
python Project/report.py Project.avh.log | |
cat Project.avh.xml | |
# Upload the junit report to the check run of the workflow | |
- name: Test Report | |
uses: phoenix-actions/test-reporting@v15 | |
if: success() || failure() # run this step even if previous step failed | |
with: | |
name: Test Report # Name of the check run which will be created | |
path: Project.avh.xml # Path to test results | |
reporter: jest-junit # Format of test results |