Run CoreValidation in VHT models #74
Workflow file for this run
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: Build CoreValidation tests | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
corevalidation: | |
name: Build | |
runs-on: ubuntu-latest | |
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: Cache vcpkg | |
uses: actions/cache@v3 | |
with: | |
key: vcpkg | |
path: /home/runner/.vcpkg | |
- name: Cache Arm Compiler 6 | |
uses: actions/cache@v3 | |
with: | |
key: armcompiler-6.20.0 | |
path: /home/runner/standalone-linux-x86_64-rel.tgz | |
- name: Install Arm Compiler 6 | |
working-directory: /home/runner | |
run: | | |
test -f standalone-linux-x86_64-rel.tgz || \ | |
wget https://artifacts.keil.arm.com/arm-compiler/6.20/21/standalone-linux-x86_64-rel.tgz | |
mkdir -p arm-compiler-6.20.0 | |
tar xf standalone-linux-x86_64-rel.tgz -C arm-compiler-6.20.0 | |
echo "AC6_TOOLCHAIN_6_20_0=$(pwd)/arm-compiler-6.20.0/bin" >> $GITHUB_ENV | |
- name: Cache LLVM/Clang | |
uses: actions/cache@v3 | |
with: | |
key: clang-16.0.0 | |
path: /home/runner/LLVMEmbeddedToolchainForArm-16.0.0-Linux-x86_64.tar.gz | |
- name: Install LLVM/Clang | |
working-directory: /home/runner | |
run: | | |
sudo apt-get update | |
sudo apt-get install libtinfo5 | |
test -f LLVMEmbeddedToolchainForArm-16.0.0-Linux-x86_64.tar.gz || \ | |
wget https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-16.0.0/LLVMEmbeddedToolchainForArm-16.0.0-Linux-x86_64.tar.gz | |
tar xf LLVMEmbeddedToolchainForArm-16.0.0-Linux-x86_64.tar.gz | |
./LLVMEmbeddedToolchainForArm-16.0.0-Linux-x86_64/bin/clang --version | |
echo "CLANG_TOOLCHAIN_16_0_0=$(pwd)/LLVMEmbeddedToolchainForArm-16.0.0-Linux-x86_64/bin" >> $GITHUB_ENV | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: cpp | |
queries: security-and-quality | |
- uses: ammaraskar/gcc-problem-matcher@master | |
- name: Execute build | |
working-directory: ./CMSIS/CoreValidation/Project | |
run: | | |
echo "Install Python requirements" | |
pip install -r requirements.txt | |
echo "Activate vcpkg environment" | |
. <(curl https://aka.ms/vcpkg-init.sh -L) | |
vcpkg activate | |
# Fix library search for VHT | |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(dirname $(which VHT_MPS2_Cortex-M3)) | |
echo "Activate Arm tool license" | |
${AC6_TOOLCHAIN_6_20_0}/armlm activate --server https://mdk-preview.keil.arm.com --product KEMDK-COM0 | |
echo "Patch CMSIS-Toolbox" | |
pushd $(dirname $(which cbuild))/../etc | |
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/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/clang_linker_script.ld | |
popd | |
echo "Register local CMSIS-DFP pack" | |
cpackget add /home/runner/CMSIS-DFP/ARM.CMSIS_DFP.pdsc | |
echo "Run build script" | |
# ./build.py --verbose -m VHT -c AC6 -c GCC -c Clang build || echo "=== Something failed! ===" | |
echo "Run build script" | |
./build.py --verbose -m VHT -c AC6 -d CM3 -o none build run || echo "=== Something failed! ===" | |
echo "Deactivate Arm tool license" | |
${AC6_TOOLCHAIN_6_20_0}/armlm deactivate --product KEMDK-COM0 | |
- name: Perform CodeQL Analysis | |
if: always() | |
uses: github/codeql-action/analyze@v2 | |