-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (56 loc) · 1.65 KB
/
ci.yaml
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
name: ci
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: arduino/arduino-lint-action@v1
with:
library-manager: update
compliance: strict
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 2
- uses: jayllyz/clang-format-action@v1
# Default options
with:
check: false
style: file
extensions: cpp,h,hpp,c,ino
clang-version: latest
# commit the changes (if there are any)
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "clang-format ✅"
branch: ${{ github.head_ref }}
test:
runs-on: ubuntu-latest
needs: [lint, format]
steps:
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: adafruit/ci-arduino
path: ci
- name: Install the prerequisites
run: bash ci/actions_install.sh
- name: Check for correct code formatting with clang-format
run: python3 ci/run-clang-format.py -e "ci/*" -e "bin/*" -r .
# Make sure to run the `clang-format -i src/*.h src/*.cpp` on the repo.
# To clean the Sources `clang-format -i examples/.../....ino`
- name: Test the code on supported platforms
run: python3 ci/build_platform.py main_platforms zero feather32u4 pico_rp2040