]> begriffs open source - cmsis/blob - .github/workflows/corevalidation.yml
Update CoreValidation to CMSIS-Toolbox 2.0.0
[cmsis] / .github / workflows / corevalidation.yml
1 name: Build CoreValidation tests
2 on:
3   workflow_dispatch:
4   pull_request:
5     branches: [main]
6   push:
7     branches: [main]
8   
9 concurrency:
10   group: ${{ github.workflow }}-${{ github.ref }}
11   cancel-in-progress: true
12
13 jobs:
14   corevalidation:
15     name: Build
16     runs-on: ubuntu-latest
17     steps:
18       - uses: actions/checkout@v3
19
20       - working-directory: /home/runner
21         env:
22           GH_TOKEN: ${{ github.token }}
23         run: |
24           if [ -d CMSIS-DFP ]; then
25             cd CMSIS-DFP
26             git fetch origin main
27             git checkout -f origin/main
28           else
29             gh repo clone ARM-software/CMSIS-DFP
30           fi
31
32       - uses: actions/setup-python@v4
33         with:
34           python-version: '3.10'    
35           cache: 'pip'
36
37       - name: Cache vcpkg
38         uses: actions/cache@v3
39         with:
40           key: vcpkg
41           path: /home/runner/.vcpkg
42
43       - name: Cache Arm Compiler 6
44         uses: actions/cache@v3
45         with:
46           key: armcompiler-6.20.0
47           path: /home/runner/standalone-linux-x86_64-rel.tgz
48
49       - name: Install Arm Compiler 6
50         working-directory: /home/runner
51         run: |
52           test -f standalone-linux-x86_64-rel.tgz || \
53             wget https://artifacts.keil.arm.com/arm-compiler/6.20/21/standalone-linux-x86_64-rel.tgz
54           mkdir -p arm-compiler-6.20.0
55           tar xf standalone-linux-x86_64-rel.tgz -C arm-compiler-6.20.0
56           echo "AC6_TOOLCHAIN_6_20_0=$(pwd)/arm-compiler-6.20.0/bin" >> $GITHUB_ENV
57         
58       - name: Initialize CodeQL
59         uses: github/codeql-action/init@v2
60         with:
61           languages: cpp
62           queries: security-and-quality
63
64       - uses: ammaraskar/gcc-problem-matcher@master
65
66       - name: Execute build
67         working-directory: ./CMSIS/CoreValidation/Project
68         run: |
69           echo "Install Python requirements"
70           pip install -r requirements.txt
71
72           echo "Activate vcpkg environment"
73           . <(curl https://aka.ms/vcpkg-init.sh -L)
74           vcpkg activate
75
76           echo "Activate Arm tool license"
77           ${AC6_TOOLCHAIN_6_20_0}/armlm activate --server https://mdk-preview.keil.arm.com --product KEMDK-COM0
78
79           echo "Register local CMSIS-DFP pack"
80           cpackget add /home/runner/CMSIS-DFP/ARM.CMSIS_DFP.pdsc
81
82           echo "Run build script"
83           ./build.py --verbose -m FVP -c GCC -c AC6 build || echo "=== Something failed! ==="
84
85       - name: Perform CodeQL Analysis
86         if: always()
87         uses: github/codeql-action/analyze@v2
88