]> begriffs open source - cmsis/blob - .github/workflows/core.yml
Bump actions/configure-pages from 3 to 4
[cmsis] / .github / workflows / core.yml
1 name: Core Checks
2 on:
3   workflow_dispatch:
4   pull_request:
5     paths: 
6       - .github/workflows/core.yml
7       - CMSIS/Core/Include/**/*
8       - CMSIS/Core/Source/**/*
9       - CMSIS/Core/Test/**/*
10   push:
11     branches: [main]
12   
13 concurrency:
14   group: ${{ github.workflow }}-${{ github.ref }}
15   cancel-in-progress: true
16
17 jobs:
18   lit:
19     runs-on: ubuntu-latest
20
21     env:
22       ARM_UBL_ACTIVATION_CODE: ${{ secrets.ARM_UBL_ACTIVATION_CODE }}
23
24     steps:
25       - uses: actions/checkout@v4
26       
27       - uses: actions/setup-python@v4
28         with:
29           python-version: '3.10'    
30           cache: 'pip'
31
32       - name: Python requirements
33         run: |
34           pip install -r ./CMSIS/Core/Test/requirements.txt
35
36       - name: Cache vcpkg
37         uses: actions/cache@v3
38         with:
39           key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }}-${{ matrix.compiler }}
40           restore-keys: |
41             vcpkg-${{ runner.os }}-${{ runner.arch }}-
42           path: /home/runner/.vcpkg
43
44       - name: Install LLVM dependencies and tools
45         working-directory: /home/runner
46         run: |
47           sudo apt-get update
48           sudo apt-get install libtinfo5 llvm-15-tools
49           sudo ln -s /usr/bin/FileCheck-15 /usr/bin/FileCheck
50     
51       - name: Prepare vcpkg env
52         working-directory: ./CMSIS/Core/Test
53         run: |
54           . <(curl https://aka.ms/vcpkg-init.sh -L)
55           vcpkg x-update-registry --all
56           vcpkg activate
57           
58       - name: Activate Arm tool license
59         working-directory: ./CMSIS/Core/Test
60         run: |
61           . /home/runner/.vcpkg/vcpkg-init
62           vcpkg activate
63           if [[ -n "${{ env.ARM_UBL_ACTIVATION_CODE }}" ]]; then
64             armlm activate --code ${{ env.ARM_UBL_ACTIVATION_CODE }}
65           else
66             armlm activate --server https://mdk-preview.keil.arm.com --product KEMDK-COM0
67           fi
68
69       - uses: ammaraskar/gcc-problem-matcher@master
70
71       - name: Run LIT
72         working-directory: ./CMSIS/Core/Test
73         run: |
74           . /home/runner/.vcpkg/vcpkg-init
75           vcpkg activate
76
77           ./build.py lit
78
79       - name: Deactivate Arm tool license
80         if: always()
81         working-directory: ./CMSIS/Core/Test
82         run: |
83           . /home/runner/.vcpkg/vcpkg-init
84           vcpkg activate
85           if [[ -n "${{ env.ARM_UBL_ACTIVATION_CODE }}" ]]; then
86             armlm deactivate --code ${{ env.ARM_UBL_ACTIVATION_CODE }}
87           else
88             armlm deactivate --product KEMDK-COM0
89           fi
90
91       - name: Publish Test Results
92         if: ${{ !cancelled() && env.ARM_UBL_ACTIVATION_CODE }}
93         uses: EnricoMi/publish-unit-test-result-action@v2
94         with:
95           report_individual_runs: true
96           files: ./CMSIS/Core/Test/*.xunit