Skip to content

Commit 74699c2

Browse files
committed
Merge branch 'main' of github.com:ladyada/Adafruit_Learning_System_Guides
2 parents 2c9341f + ab72e5d commit 74699c2

File tree

87 files changed

+5313
-89
lines changed

Some content is hidden

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

87 files changed

+5313
-89
lines changed

.github/workflows/arduino_cron.yml

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

16bit_hello_picowbell_dvi/.feather_rp2040.test.only

Whitespace-only changes.

0 commit comments

Comments
 (0)