]> begriffs open source - freertos/blob - .github/workflows/kernel-checks.yml
RP2040: Fix compiler warning and comment (#509)
[freertos] / .github / workflows / kernel-checks.yml
1 name: Kernel-Checker
2
3 on: [pull_request]
4
5 jobs:
6   kernel-checker:
7     name: FreeRTOS Kernel Header Checks
8     runs-on: ubuntu-latest
9     steps:
10       # Install python 3
11       - name: Tool Setup
12         uses: actions/setup-python@v2
13         with:
14           python-version: 3.7.10
15           architecture:   x64
16         env:
17           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18
19       # There is shared code, hosted by FreeRTOS/FreeRTOS, with deps needed by header checker
20       - name: Checkout FreeRTOS Tools
21         uses: actions/checkout@v2
22         with:
23           repository: FreeRTOS/FreeRTOS
24           ref:  main
25           path: tools
26
27       # Checkout user pull request changes
28       - name: Checkout Pull Request
29         uses: actions/checkout@v2
30         with:
31           ref:  ${{ github.event.pull_request.head.sha }}
32           path: inspect
33
34       # Collect all affected files
35       - name: Collecting changed files
36         uses: lots0logs/gh-action-get-changed-files@2.1.4
37         with:
38           token: ${{ secrets.GITHUB_TOKEN }}
39
40       # Run checks
41       - name: Check File Headers
42         run: |
43           mv tools/.github/scripts/common inspect/.github/scripts
44           pip install -r inspect/.github/scripts/common/requirements.txt
45           cd inspect
46           .github/scripts/kernel_checker.py --json ${HOME}/files_modified.json ${HOME}/files_added.json ${HOME}/files_renamed.json
47           exit $?