Skip to content

Commit 9f66e83

Browse files
Split variant build, combine spell + style checks (#2291)
Variant builds were taking longer than the actual individual CI jobs, so split it up. Combine the spelling and style checks, they ran very fast and spent more time in checking out than in running.
1 parent 0969901 commit 9f66e83

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

.github/workflows/pull-request.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,21 @@ env:
1313

1414
jobs:
1515

16-
# Me no spell so good
17-
code-spell:
18-
name: Check spelling
16+
# Consistent style, spelling
17+
astyle:
18+
name: Spelling, Style, Boards, Package
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@v4
2222
with:
23-
submodules: true
23+
submodules: false
2424
- name: Run codespell
2525
uses: codespell-project/actions-codespell@master
2626
with:
2727
skip: ./ArduinoCore-API,./libraries/ESP8266SdFat,./libraries/Adafruit_TinyUSB_Arduino,./libraries/LittleFS/lib,./tools/pyserial,./pico-sdk,./.github,./docs/i2s.rst,./cores/rp2040/api,./libraries/FreeRTOS,./tools/libbearssl/bearssl,./include,./libraries/WiFi/examples/BearSSL_Server,./ota/uzlib,./libraries/http-parser/lib,./libraries/WebServer/examples/HelloServerBearSSL/HelloServerBearSSL.ino,./libraries/HTTPUpdateServer/examples/SecureBearSSLUpdater/SecureBearSSLUpdater.ino,./.git,./libraries/FatFS/lib/fatfs,./libraries/FatFS/src/diskio.h,./libraries/FatFS/src/ff.cpp,./libraries/FatFS/src/ffconf.h,./libraries/FatFS/src/ffsystem.cpp,./libraries/FatFS/src/ff.h,./libraries/lwIP_WINC1500/src/driver,./libraries/lwIP_WINC1500/src/common,./libraries/lwIP_WINC1500/src/bus_wrapper,./libraries/lwIP_WINC1500/src/spi_flash
2828
ignore_words_list: ser,dout,shiftIn,acount
29-
30-
# Consistent style
31-
astyle:
32-
name: Style, Boards, Package
33-
runs-on: ubuntu-latest
34-
steps:
35-
- uses: actions/checkout@v4
36-
with:
37-
submodules: false
29+
- name: Get submodules for following tests
30+
run: git submodule update --init
3831
- name: Check package references
3932
run: |
4033
./tests/ci/pkgrefs_test.sh
@@ -226,8 +219,11 @@ jobs:
226219

227220
# Build every variant using PIO for simplicity
228221
build-variants:
229-
name: Build Every Variant
222+
name: Build Every Variant ${{ matrix.chunk }}
230223
runs-on: ubuntu-latest
224+
strategy:
225+
matrix:
226+
chunk: [0, 1]
231227
steps:
232228
- uses: actions/checkout@v4
233229
with:
@@ -264,6 +260,11 @@ jobs:
264260
cp -f /home/runner/work/arduino-pico/arduino-pico/tools/json/*.json /home/runner/.platformio/platforms/raspberrypi/boards/.
265261
- name: Build Every Variant
266262
run: |
263+
cnt=0
267264
for b in $(cut -f1 -d. /home/runner/work/arduino-pico/arduino-pico/boards.txt | sed 's/#.*//' | sed 's/^menu$//' | sort -u); do
268-
pio ci --board=$b -O "platform_packages=framework-arduinopico@symlink:///home/runner/work/arduino-pico/arduino-pico" libraries/rp2040/examples/Bootsel/Bootsel.ino
265+
cnt=$((cnt + 1))
266+
rem=$((cnt % 2))
267+
if [ $rem == ${{ matrix.chunk }} ]; then
268+
pio ci --board=$b -O "platform_packages=framework-arduinopico@symlink:///home/runner/work/arduino-pico/arduino-pico" libraries/rp2040/examples/Bootsel/Bootsel.ino
269+
fi
269270
done

tests/restyle.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
for dir in ./cores/rp2040 ./libraries/EEPROM ./libraries/I2S ./libraries/SingleFileDrive \
44
./libraries/LittleFS/src ./libraries/LittleFS/examples ./libraries/PWMAudio \
5-
./libraries/rp2040 ./libraries/SD ./libraries/ESP8266SdFat ./libraries/ADCInput \
5+
./libraries/rp2040 ./libraries/SD ./libraries/ADCInput \
66
./libraries/Servo ./libraries/SPI ./libraries/Wire ./libraries/PDM \
77
./libraries/WiFi ./libraries/lwIP_Ethernet ./libraries/lwIP_CYW43 \
88
./libraries/FreeRTOS/src ./libraries/LEAmDNS ./libraries/MD5Builder \

0 commit comments

Comments
 (0)