Skip to content

Commit 495f80c

Browse files
authored
Merge branch 'main' into anecdata-patch-1
2 parents cfa4f61 + a980f68 commit 495f80c

File tree

594 files changed

+41903
-715
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

594 files changed

+41903
-715
lines changed

.github/workflows/arduino_cron.yml

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
name: Arduino Library CI
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
8+
9+
jobs:
10+
check-if-needed:
11+
runs-on: ubuntu-latest
12+
outputs:
13+
answer: ${{ steps.is-needed.outputs.answer }}
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 2
18+
- name: Check if run by adabot
19+
id: check-cron
20+
run: |
21+
iscron=false
22+
[[ "${{ github.event_name }}" == "push" && "${{ github.actor }}" == "adafruit-adabot" ]] && iscron=true
23+
echo "status=$iscron" >> "$GITHUB_OUTPUT"
24+
- name: Check if dispatched
25+
id: check-dispatch
26+
run: |
27+
isdispatch=false
28+
[[ "${{ github.event_name }}" == "workflow_dispatch" ]] && isdispatch=true
29+
echo "status=$isdispatch" >> "$GITHUB_OUTPUT"
30+
- name: Check for Arduino file updates
31+
id: check-updated
32+
if: ${{ steps.check-cron.outputs.status }} == false && ${{ steps.check-dispatch.outputs.status }} == false
33+
run: |
34+
changedfiles=$(git diff --name-only -r HEAD^1 HEAD)
35+
ischanged=false
36+
for changedfile in ${changedfiles[*]}; do
37+
echo $changedfile
38+
if [[ $changedfile == *.c ]] ||
39+
[[ $changedfile == *.cpp ]] ||
40+
[[ $changedfile == *.h ]] ||
41+
[[ $changedfile == *.hpp ]] ||
42+
[[ $changedfile == *.ino ]]; then
43+
ischanged=true
44+
break
45+
fi
46+
done
47+
echo "status=$ischanged" >> "$GITHUB_OUTPUT"
48+
- name: Output Arduino needed
49+
id: is-needed
50+
run: |
51+
isneeded=false
52+
if [[ ${{ steps.check-cron.outputs.status }} == true ]] ||
53+
[[ ${{ steps.check-dispatch.outputs.status }} == true ]] ||
54+
[[ ${{ steps.check-updated.outputs.status }} == true ]]; then
55+
isneeded=true
56+
fi
57+
echo "answer=$isneeded" >> "$GITHUB_OUTPUT"
58+
59+
arduino:
60+
strategy:
61+
fail-fast: false
62+
matrix:
63+
arduino-platform: ["cpb", "cpc", "cpx_ada", "esp32", "esp8266", "feather32u4", "feather_m0_express", "feather_m4_express", "feather_rp2040", "flora", "funhouse", "gemma", "gemma_m0", "hallowing_m0", "hallowing_m4_tinyusb", "magtag", "metro_m0", "metro_m0_tinyusb", "metro_m4", "metro_m4_tinyusb", "monster_m4sk", "monster_m4sk_tinyusb", "neokeytrinkey_m0", "neotrellis_m4", "nrf52832", "nrf52840", "protrinket_5v", "proxlighttrinkey_m0", "pybadge", "pygamer", "pyportal", "qt2040_trinkey", "qtpy_m0", "qtpy_esp32s2", "rotarytrinkey_m0", "slidetrinkey_m0", "trinket_m0", "uno", "trinket_5v", "ledglasses_nrf52840" ]
64+
runs-on: ubuntu-latest
65+
if: needs.check-if-needed.outputs.answer == 'true'
66+
needs: check-if-needed
67+
steps:
68+
- uses: actions/setup-python@v4
69+
with:
70+
python-version: "3.x"
71+
- uses: actions/checkout@v3
72+
- uses: actions/checkout@v3
73+
with:
74+
repository: adafruit/ci-arduino
75+
path: ci
76+
77+
- name: pre-install
78+
run: bash ci/actions_install.sh
79+
80+
# manually install some libraries
81+
- name: extra libraries
82+
run: |
83+
git clone --quiet https://github.com/adafruit/Cryptosuite.git /home/runner/Arduino/libraries/Cryptosuite
84+
git clone --quiet https://github.com/adafruit/WiFiNINA.git /home/runner/Arduino/libraries/WiFiNINA
85+
git clone --quiet https://github.com/adafruit/Adafruit_LSM303.git /home/runner/Arduino/libraries/Adafruit_LSM303
86+
git clone --quiet https://github.com/moderndevice/CapSense.git /home/runner/Arduino/libraries/CapSense
87+
git clone --quiet https://github.com/PaintYourDragon/ffft.git /home/runner/Arduino/libraries/ffft
88+
git clone --quiet https://github.com/adafruit/RadioHead.git /home/runner/Arduino/libraries/RadioHead
89+
git clone --quiet https://github.com/me-no-dev/ESPAsyncTCP /home/runner/Arduino/libraries/ESPAsyncTCP
90+
git clone --quiet https://github.com/adafruit/Talkie /home/runner/Arduino/libraries/Talkie
91+
git clone --quiet https://github.com/Infineon/arduino-optiga-trust-m /home/runner/Arduino/libraries/arduinoOptigaTrustM
92+
git clone --quiet https://github.com/adafruit/HID /home/runner/Arduino/libraries/HID_Project
93+
rm -rf /home/runner/Arduino/libraries/ArduinoHttpClient
94+
git clone --quiet https://github.com/arduino-libraries/ArduinoHttpClient.git /home/runner/Arduino/libraries/ArduinoHttpClient
95+
96+
- name: test platforms
97+
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }}
98+
99+
100+
- name: Upload build artifacts
101+
uses: actions/upload-artifact@v3
102+
with:
103+
name: ${{ github.event.repository.name }}.${{ github.sha }}
104+
path: |
105+
build/*.hex
106+
build/*.bin
107+
build/*.uf2
108+
109+
- name: Zip release files
110+
if: startsWith(github.ref, 'refs/tags/')
111+
run: |
112+
if [ -d build ]; then
113+
(
114+
echo "Built from Adafruit Learning System Guides `git describe --tags` for ${{ matrix.arduino-platform }}"
115+
echo "Source code: https://github.com/adafruit/"
116+
echo "Adafruit Learning System: https://learn.adafruit.com/"
117+
) > build/README.txt
118+
cd build && zip -9 -o ${{ matrix.arduino-platform }}.zip *.hex *.bin *.uf2 *.txt
119+
fi
120+
121+
- name: Create release
122+
if: startsWith(github.ref, 'refs/tags/')
123+
uses: softprops/action-gh-release@v1
124+
with:
125+
files: build/${{ matrix.arduino-platform }}.zip
126+
fail_on_unmatched_files: false
127+
body: "Select the zip file corresponding to your board from the list below."

.github/workflows/githubci.yml

Lines changed: 1 addition & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Arduino Library CI
1+
name: SPDX and Pylint
22

33
on: [pull_request, push, repository_dispatch]
44

@@ -15,75 +15,6 @@ jobs:
1515
- name: check SPDX licensing
1616
run: python ./SPDX.py
1717

18-
arduino:
19-
strategy:
20-
fail-fast: false
21-
matrix:
22-
arduino-platform: ["cpb", "cpc", "cpx_ada", "esp32", "esp8266", "feather32u4", "feather_m0_express", "feather_m4_express", "feather_rp2040", "flora", "funhouse", "gemma", "gemma_m0", "hallowing_m0", "hallowing_m4_tinyusb", "magtag", "metro_m0", "metro_m0_tinyusb", "metro_m4", "metro_m4_tinyusb", "monster_m4sk", "monster_m4sk_tinyusb", "neokeytrinkey_m0", "neotrellis_m4", "nrf52832", "nrf52840", "protrinket_5v", "proxlighttrinkey_m0", "pybadge", "pygamer", "pyportal", "qt2040_trinkey", "qtpy_m0", "qtpy_esp32s2", "rotarytrinkey_m0", "slidetrinkey_m0", "trinket_m0", "uno", "trinket_5v", "ledglasses_nrf52840" ]
23-
runs-on: ubuntu-latest
24-
25-
steps:
26-
- uses: actions/setup-python@v4
27-
with:
28-
python-version: "3.x"
29-
- uses: actions/checkout@v3
30-
- uses: actions/checkout@v3
31-
with:
32-
repository: adafruit/ci-arduino
33-
path: ci
34-
35-
- name: pre-install
36-
run: bash ci/actions_install.sh
37-
38-
# manually install some libraries
39-
- name: extra libraries
40-
run: |
41-
git clone --quiet https://github.com/adafruit/Cryptosuite.git /home/runner/Arduino/libraries/Cryptosuite
42-
git clone --quiet https://github.com/adafruit/WiFiNINA.git /home/runner/Arduino/libraries/WiFiNINA
43-
git clone --quiet https://github.com/adafruit/Adafruit_LSM303.git /home/runner/Arduino/libraries/Adafruit_LSM303
44-
git clone --quiet https://github.com/moderndevice/CapSense.git /home/runner/Arduino/libraries/CapSense
45-
git clone --quiet https://github.com/PaintYourDragon/ffft.git /home/runner/Arduino/libraries/ffft
46-
git clone --quiet https://github.com/adafruit/RadioHead.git /home/runner/Arduino/libraries/RadioHead
47-
git clone --quiet https://github.com/me-no-dev/ESPAsyncTCP /home/runner/Arduino/libraries/ESPAsyncTCP
48-
git clone --quiet https://github.com/adafruit/Talkie /home/runner/Arduino/libraries/Talkie
49-
git clone --quiet https://github.com/Infineon/arduino-optiga-trust-m /home/runner/Arduino/libraries/arduinoOptigaTrustM
50-
git clone --quiet https://github.com/adafruit/HID /home/runner/Arduino/libraries/HID_Project
51-
rm -rf /home/runner/Arduino/libraries/ArduinoHttpClient
52-
git clone --quiet https://github.com/arduino-libraries/ArduinoHttpClient.git /home/runner/Arduino/libraries/ArduinoHttpClient
53-
54-
- name: test platforms
55-
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }}
56-
57-
58-
- name: Upload build artifacts
59-
uses: actions/upload-artifact@v3
60-
with:
61-
name: ${{ github.event.repository.name }}.${{ github.sha }}
62-
path: |
63-
build/*.hex
64-
build/*.bin
65-
build/*.uf2
66-
67-
- name: Zip release files
68-
if: startsWith(github.ref, 'refs/tags/')
69-
run: |
70-
if [ -d build ]; then
71-
(
72-
echo "Built from Adafruit Learning System Guides `git describe --tags` for ${{ matrix.arduino-platform }}"
73-
echo "Source code: https://github.com/adafruit/"
74-
echo "Adafruit Learning System: https://learn.adafruit.com/"
75-
) > build/README.txt
76-
cd build && zip -9 -o ${{ matrix.arduino-platform }}.zip *.hex *.bin *.uf2 *.txt
77-
fi
78-
79-
- name: Create release
80-
if: startsWith(github.ref, 'refs/tags/')
81-
uses: softprops/action-gh-release@v1
82-
with:
83-
files: build/${{ matrix.arduino-platform }}.zip
84-
fail_on_unmatched_files: false
85-
body: "Select the zip file corresponding to your board from the list below."
86-
8718
pylint:
8819
runs-on: ubuntu-latest
8920
steps:

0 commit comments

Comments
 (0)