Skip to content

Commit

Permalink
Adding CI
Browse files Browse the repository at this point in the history
  • Loading branch information
boseji committed Sep 6, 2024
1 parent 66c9468 commit a403f5b
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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: submit
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 uno zero

0 comments on commit a403f5b

Please sign in to comment.