-
Notifications
You must be signed in to change notification settings - Fork 75
156 lines (131 loc) · 4.69 KB
/
corevalidation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: CoreValidation
on:
workflow_dispatch:
pull_request:
paths:
- .github/workflows/corevalidation.yml
- .github/workflows/corevalidation-report.yml
- CMSIS/Core/Include/**/*
- CMSIS/Core/Source/**/*
- CMSIS/CoreValidation/**/*
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@v4
- working-directory: /home/runner
env:
GH_TOKEN: ${{ github.token }}
run: |
if [ -d Cortex_DFP ]; then
cd Cortex_DFP
git fetch origin main
git checkout -f origin/main
else
gh repo clone ARM-software/Cortex_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
- 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 Cortex_DFP pack"
cpackget add /home/runner/Cortex_DFP/ARM.Cortex_DFP.pdsc
echo "Build test projects ..."
./build.py --verbose -m FVP -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 FVP -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 }}