* Add HTTP-parser lib to support ESP32 WebServer * Add WebServer from ESP32. Only supports HTTP * Separate HTTP server from the network server Instead of managing the WiFiServer/WiFiServerSecure in the same object as the HTTP handling, split them into separate objects. This lets HTTP and HTTPS servers work without templates or duplicating code. The HTTP block just gets a `WiFiClient*` and works with that to only do HTTP processing, while the upper object handles the appropriate server and client types. * Add HTTPS server * Clean up some THandlerFunction refs * Refactor into a template-ized WebServer/WebServerSecure * Add DNSServer examples which need WebServer * Fix CoreMutex infinite recursion crash Core could crash while Serial debugging was going on and prints were happening from LWIP/IRQ land and the main app. * Add HTTPUpdateServer(Secure) * Add MIME include, optimize WebServer::send(size,len) When send()ing a large buffer, the WebServer::send() call would actually convert that buffer into a String (i.e. duplicate it, and potential issues with embedded \0s in binary data). Make a simple override to send(size, len) to allow writing from the source buffer instead. * Fix WiFiClient::send(Stream), add FSBrowser example
226 lines
7.6 KiB
YAML
226 lines
7.6 KiB
YAML
# Run whenever a PR is generated or updated.
|
|
|
|
|
|
name: Arduino-Pico CI
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
|
|
jobs:
|
|
|
|
# Me no spell so good
|
|
code-spell:
|
|
name: Check spelling
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- name: Run codespell
|
|
uses: codespell-project/actions-codespell@master
|
|
with:
|
|
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
|
|
ignore_words_list: ser,dout
|
|
|
|
# Consistent style
|
|
astyle:
|
|
name: Style, Boards, Package
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: false
|
|
- name: Check package references
|
|
run: |
|
|
./tests/ci/pkgrefs_test.sh
|
|
- name: Check boards.txt was not edited after makeboards.py
|
|
run: |
|
|
./tools/makeboards.py
|
|
# If anything changed, GIT should return an error and fail the test
|
|
git diff --exit-code
|
|
- name: Run astyle on all code/examples
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install astyle
|
|
./tests/restyle.sh
|
|
# If anything changed, GIT should return an error and fail the test
|
|
git diff --exit-code
|
|
# - name: Check Arduino API copy is clean
|
|
# run: |
|
|
# git submodule update --init ./ArduinoCore-API
|
|
# diff -r ./cores/rp2040/api ./ArduinoCore-API/api
|
|
|
|
# Build all examples on linux (core and Arduino IDE)
|
|
build-linux:
|
|
name: Build ${{ matrix.chunk }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
chunk: [0, 1, 2, 3, 4, 5]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.x'
|
|
- name: Cache Linux toolchain
|
|
id: cache-linux
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ./tools/dist
|
|
key: ${{ runner.os }}-${{ hashFiles('package/package_pico_index.template.json', 'tests/common.sh') }}
|
|
- name: Build Sketches
|
|
env:
|
|
TRAVIS_BUILD_DIR: ${{ github.workspace }}
|
|
TRAVIS_TAG: ${{ github.ref }}
|
|
BUILD_PARITY: custom
|
|
mod: 6
|
|
rem: ${{ matrix.chunk }}
|
|
run: |
|
|
cd pico-sdk
|
|
git submodule update --init
|
|
cd ..
|
|
bash ./tests/build.sh
|
|
|
|
# Build TinyUSB examples, requires custom build command line
|
|
build-tinyusb:
|
|
name: Build TinyUSB Examples
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.x'
|
|
- name: Cache Linux toolchain
|
|
id: cache-linux
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ./tools/dist
|
|
key: ${{ runner.os }}-${{ hashFiles('package/package_pico_index.template.json', 'tests/common.sh') }}
|
|
- name: Build Sketches
|
|
env:
|
|
TRAVIS_BUILD_DIR: ${{ github.workspace }}
|
|
TRAVIS_TAG: ${{ github.ref }}
|
|
BUILD_PARITY: custom
|
|
run: |
|
|
cd pico-sdk
|
|
git submodule update --init
|
|
cd ..
|
|
bash ./tests/build-tinyusb.sh
|
|
|
|
# Single build under Windows to ensure the Win toolchain is good.
|
|
build-windows:
|
|
name: Windows
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.x'
|
|
- name: Cache Windows toolchain
|
|
id: cache-windows
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ./tools/dist
|
|
key: ${{ runner.os }}-${{ hashFiles('package/package_pico_index.template.json', 'tests/common.sh') }}
|
|
- name: Build Sketch
|
|
env:
|
|
TRAVIS_BUILD_DIR: ${{ github.workspace }}
|
|
TRAVIS_TAG: ${{ github.ref }}
|
|
WINDOWS: 1
|
|
BUILD_PARITY: custom
|
|
mod: 500
|
|
rem: 1
|
|
run: |
|
|
# Windows has python3 already installed, but it's called "python".
|
|
# Copy python.exe to the proper name so scripts "just work".
|
|
try { Get-Command python3 } catch { copy (get-command python).source (get-command python).source.Replace("python.exe", "python3.exe") }
|
|
cd pico-sdk
|
|
git submodule update --init
|
|
cd ..
|
|
bash ./tests/build.sh
|
|
|
|
|
|
# Single build under macOS to ensure the Mac toolchain is good.
|
|
build-mac:
|
|
name: Mac
|
|
runs-on: macOS-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.x'
|
|
- name: Cache Mac toolchain
|
|
id: cache-mac
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ./tools/dist
|
|
key: ${{ runner.os }}-${{ hashFiles('package/package_pico_index.template.json', 'tests/common.sh') }}
|
|
- name: Build Sketch
|
|
env:
|
|
TRAVIS_BUILD_DIR: ${{ github.workspace }}
|
|
TRAVIS_TAG: ${{ github.ref }}
|
|
MACOSX: 1
|
|
BUILD_PARITY: custom
|
|
mod: 500
|
|
rem: 1
|
|
run: |
|
|
cd pico-sdk
|
|
git submodule update --init
|
|
cd ..
|
|
bash ./tests/build.sh
|
|
|
|
# Build a few examples with PlatformIO to test if integration works
|
|
build-platformio:
|
|
name: Build PlatformIO Examples
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: 'true'
|
|
- name: Initialize needed submodules
|
|
run: |
|
|
cd pico-sdk
|
|
git submodule update --init
|
|
cd ../libraries/Adafruit_TinyUSB_Arduino
|
|
git submodule update --init
|
|
cd ../..
|
|
- name: Cache pip
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
- name: Cache PlatformIO
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.platformio
|
|
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
- name: Install PlatformIO
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install --upgrade platformio
|
|
pio pkg install --global --platform https://github.com/maxgerhardt/platform-raspberrypi.git
|
|
pio pkg install --global --tool symlink://.
|
|
- name: Build Multicore Example
|
|
run: pio ci --board=rpipico --board=adafruit_feather -O "platform_packages=framework-arduinopico@symlink:///home/runner/work/arduino-pico/arduino-pico" libraries/rp2040/examples/Multicore/Multicore.ino
|
|
- name: Build Fade Example
|
|
run: pio ci --board=rpipico --board=adafruit_feather -O "platform_packages=framework-arduinopico@symlink:///home/runner/work/arduino-pico/arduino-pico" libraries/rp2040/examples/Fade/Fade.ino
|
|
- name: Build TinyUSB Example
|
|
run: pio ci --board=rpipico --board=adafruit_feather -O "platform_packages=framework-arduinopico@symlink:///home/runner/work/arduino-pico/arduino-pico" -O "build_flags=-DUSE_TINYUSB" libraries/Adafruit_TinyUSB_Arduino/examples/CDC/cdc_multi/cdc_multi.ino
|
|
- name: Build WiFi Example
|
|
run: pio ci --board=rpipicow -O "platform_packages=framework-arduinopico@symlink:///home/runner/work/arduino-pico/arduino-pico" libraries/WiFi/examples/ScanNetworks/ScanNetworks.ino
|
|
- name: Build Signed OTA Example
|
|
run: pio ci --board=rpipicow -O "platform_packages=framework-arduinopico@symlink:///home/runner/work/arduino-pico/arduino-pico" libraries/ArduinoOTA/examples/SignedOTA/SignedOTA.ino
|