Add FOTA support and enable MCUboot logs #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check compliance | |
on: | |
pull_request: | |
paths: | |
- "**.c" | |
- "**.h" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
ncs: | |
name: Determine NCS version | |
runs-on: ubuntu-22.04 | |
outputs: | |
version: ${{ steps.version.outputs.version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "18.x" | |
- uses: actions/cache@v3 | |
name: Cache dependencies | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: npm ci | |
- name: Get NCS version | |
id: version | |
run: echo "version=`node .github/ncs-version.mjs`" >> $GITHUB_OUTPUT | |
checkpatch: | |
runs-on: ubuntu-22.04 | |
needs: [ncs] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Fetch all history for all tags and branches | |
run: git fetch --prune --tags | |
- name: Clone ci tools | |
run: | |
git clone https://github.com/zephyrproject-rtos/ci-tools ../ci-tools | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade --user pip 'setuptools<58' urllib3 chardet | |
python3 -m pip install --upgrade --user wheel pylint junitparser | |
python3 -m pip install --upgrade --user -r ../ci-tools/requirements.txt | |
sudo apt-get install httpie jq gitlint | |
- name: Check compliance | |
env: | |
BUILD_NUMBER: ${{ github.event.pull_request.head.sha }} | |
GH_USERNAME: github-actions[bot] | |
run: | | |
export PATH=$PATH:/home/runner/.local/bin | |
curl -s https://raw.githubusercontent.com/nrfconnect/sdk-nrf/${{ needs.ncs.outputs.version }}/.checkpatch.conf > .checkpatch.conf | |
mkdir -p scripts/checkpatch | |
curl -s https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/${{ needs.ncs.outputs.version }}/scripts/checkpatch.pl > scripts/checkpatch.pl | |
chmod +x scripts/checkpatch.pl | |
curl -s https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/${{ needs.ncs.outputs.version }}/scripts/spelling.txt > scripts/spelling.txt | |
curl -s https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/${{ needs.ncs.outputs.version }}/scripts/checkpatch/typedefsfile > scripts/checkpatch/typedefsfile | |
../ci-tools/scripts/check_compliance.py -p ${{ github.event.pull_request.number }} \ | |
-S ${{ github.event.pull_request.head.sha }} \ | |
-g \ | |
--commits origin/${{ github.event.pull_request.base.ref }}..HEAD \ | |
--repo ${{ github.event.repository.full_name }} |