Skip to content

Doc: various improvements in documentation. #162

Doc: various improvements in documentation.

Doc: various improvements in documentation. #162

name: CoreValidation
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-run:
strategy:
fail-fast: true
matrix:
compiler: [AC6, GCC, Clang]
runs-on: ubuntu-latest
env:
ARM_UBL_ACTIVATION_CODE: ${{ secrets.ARM_UBL_ACTIVATION_CODE }}
steps:
- run: |
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get install libpython3.9
- uses: actions/checkout@v3
- working-directory: /home/runner
env:
GH_TOKEN: ${{ github.token }}
run: |
if [ -d CMSIS-DFP ]; then
cd CMSIS-DFP
git fetch origin main
git checkout -f origin/main
else
gh repo clone ARM-software/CMSIS-DFP
fi
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Python requirements
run: |
pip install -r ./CMSIS/CoreValidation/Project/requirements.txt
- name: Cache vcpkg
uses: actions/cache@v3
with:
key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }}-${{ matrix.compiler }}
restore-keys: |
vcpkg-${{ runner.os }}-${{ runner.arch }}-
path: /home/runner/.vcpkg
- name: Install LLVM/Clang dependencies
if: matrix.compiler == 'Clang'
working-directory: /home/runner
run: |
sudo apt-get update
sudo apt-get install libtinfo5
- name: Prepare vcpkg env
working-directory: ./CMSIS/CoreValidation/Project
run: |
. <(curl https://aka.ms/vcpkg-init.sh -L)
vcpkg x-update-registry --all
vcpkg activate
echo "Fix library search path for VHT models"
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(dirname $(which VHT_MPS2_Cortex-M3))" >> $GITHUB_ENV
echo "Fix execute permissions for VHT models"
chmod +x $(dirname $(which VHT_MPS2_Cortex-M3))/VHT_*
echo "Patch CMSIS-Toolbox"
pushd $(dirname $(which cbuild))/../etc
curl -O https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/buildmgr/cbuildgen/config/AC6.6.18.0.cmake
curl -O https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/buildmgr/cbuildgen/config/GCC.10.3.1.cmake
curl -O https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/buildmgr/cbuildgen/config/CLANG.16.0.0.cmake
curl -O https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/buildmgr/cbuildgen/config/IAR.9.32.1.cmake
curl -O https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/buildmgr/cbuildgen/config/CMSIS-Build-Utils.cmake
curl -O https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/projmgr/templates/cdefault.yml
curl -O https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/projmgr/templates/ac6_linker_script.sct
curl -O https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/projmgr/templates/clang_linker_script.ld
curl -O https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/projmgr/templates/gcc_linker_script.ld
curl -O https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/projmgr/templates/iar_linker_script.ifc
popd
- name: Activate Arm tool license
working-directory: ./CMSIS/CoreValidation/Project
run: |
. /home/runner/.vcpkg/vcpkg-init
vcpkg activate
if [[ -n "${{ env.ARM_UBL_ACTIVATION_CODE }}" ]]; then
armlm activate --code ${{ env.ARM_UBL_ACTIVATION_CODE }}
else
armlm activate --server https://mdk-preview.keil.arm.com --product KEMDK-COM0
fi
- name: Initialize CodeQL
if: matrix.compiler == 'GCC'
uses: github/codeql-action/init@v2
with:
languages: cpp
queries: security-and-quality
- uses: ammaraskar/gcc-problem-matcher@master
if: matrix.compiler == 'Clang' || matrix.compiler == 'GCC'
- name: Build
working-directory: ./CMSIS/CoreValidation/Project
run: |
. /home/runner/.vcpkg/vcpkg-init
vcpkg activate
echo "Register local CMSIS-DFP pack"
cpackget add /home/runner/CMSIS-DFP/ARM.CMSIS_DFP.pdsc
echo "Build test projects ..."
./build.py --verbose -m VHT -c ${{ matrix.compiler }} build || echo "::warning::=== Some configurations failed to build! ==="
- name: Perform CodeQL Analysis
if: ${{ !cancelled() && matrix.compiler == 'GCC' }}
uses: github/codeql-action/analyze@v2
- name: Execute
if: ${{ env.ARM_UBL_ACTIVATION_CODE }}
working-directory: ./CMSIS/CoreValidation/Project
run: |
. /home/runner/.vcpkg/vcpkg-init
vcpkg activate
echo "Run test projects ..."
./build.py --verbose -m VHT -c ${{ matrix.compiler }} -d "CM[047]*" -d "CM3" -d "CM[23]3*" run || echo "::warning::==== Some configurations failed to run! ==="
- name: Deactivate Arm tool license
if: always()
working-directory: ./CMSIS/CoreValidation/Project
run: |
. /home/runner/.vcpkg/vcpkg-init
vcpkg activate
if [[ -n "${{ env.ARM_UBL_ACTIVATION_CODE }}" ]]; then
armlm deactivate --code ${{ env.ARM_UBL_ACTIVATION_CODE }}
else
armlm deactivate --product KEMDK-COM0
fi
- name: Archive Test Reports
if: ${{ !cancelled() && env.ARM_UBL_ACTIVATION_CODE }}
uses: actions/upload-artifact@v3
with:
name: test-results-${{ matrix.compiler }}
path: ./CMSIS/CoreValidation/Project/build/*.junit
event-file:
needs: [build-and-run]
runs-on: ubuntu-latest
steps:
- name: Archive event file
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v3
with:
name: EventFile
path: ${{ github.event_path }}