-
Notifications
You must be signed in to change notification settings - Fork 69
91 lines (76 loc) · 2.59 KB
/
core.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
name: Core Checks
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lit:
runs-on: ubuntu-latest
env:
ARM_UBL_ACTIVATION_CODE: ${{ secrets.ARM_UBL_ACTIVATION_CODE }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Python requirements
run: |
pip install -r ./CMSIS/Core/Test/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 dependencies and tools
working-directory: /home/runner
run: |
sudo apt-get update
sudo apt-get install libtinfo5 llvm-15-tools
sudo ln -s /usr/bin/FileCheck-15 /usr/bin/FileCheck
- name: Prepare vcpkg env
working-directory: ./CMSIS/Core/Test
run: |
. <(curl https://aka.ms/vcpkg-init.sh -L)
vcpkg x-update-registry --all
vcpkg activate
- name: Activate Arm tool license
working-directory: ./CMSIS/Core/Test
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
- uses: ammaraskar/gcc-problem-matcher@master
- name: Run LIT
working-directory: ./CMSIS/Core/Test
run: |
. /home/runner/.vcpkg/vcpkg-init
vcpkg activate
./build.py lit
- name: Deactivate Arm tool license
if: always()
working-directory: ./CMSIS/Core/Test
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: Publish Test Results
if: ${{ !cancelled() && env.ARM_UBL_ACTIVATION_CODE }}
uses: EnricoMi/publish-unit-test-result-action@v2
with:
report_individual_runs: true
files: ./CMSIS/Core/Test/*.xunit