ci: ESP32 2.x is no longer supported #92
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
permissions: {} | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
include: | |
- chip: ESP8266 | |
core-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json | |
core: esp8266:esp8266 | |
fqbn: esp8266:esp8266:nodemcuv2 | |
- chip: ESP32 | |
core-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json | |
core: esp32:esp32 | |
fqbn: esp32:esp32:esp32wrover:PartitionScheme=noota_ffat | |
arduino-libs: NimBLE-Arduino | |
- chip: ESP32C3 | |
core-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json | |
core: esp32:esp32 | |
fqbn: esp32:esp32:esp32c3:PartitionScheme=noota_ffat | |
arduino-libs: NimBLE-Arduino | |
- chip: nRF52 | |
core: adafruit:nrf52 | |
fqbn: adafruit:nrf52:feather52832 | |
core-url: https://adafruit.github.io/arduino-board-index/package_adafruit_index.json | |
pip-deps: adafruit-nrfutil | |
fail-fast: false | |
name: ${{ matrix.chip }} | |
steps: | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
if: ${{ matrix.pip-deps }} | |
- uses: arduino/setup-arduino-cli@v1 | |
- id: cores | |
name: Refresh Arduino cores | |
run: | | |
arduino-cli version | |
arduino-cli update --additional-urls "${{ matrix.core-url }}" | |
echo d=$(sha256sum ~/.arduino15/package_*index.json | sha256sum | cut -d' ' -f1) >> $GITHUB_OUTPUT | |
- name: Cache Arduino cores | |
uses: actions/cache@v4 | |
with: | |
path: ~/.arduino15/staging/packages | |
key: cores-${{ steps.cores.outputs.d }} | |
- name: Install Arduino cores | |
run: | | |
arduino-cli core install ${{ matrix.core }} --additional-urls "${{ matrix.core-url }}" | |
echo ${{ matrix.pip-deps }} | xargs -r pip install | |
echo ArduinoUnit ${{ matrix.arduino-libs }} | xargs -rn1 arduino-cli lib install | |
- uses: actions/checkout@v4 | |
- name: Prepare Arduino libraries | |
run: | | |
mkdir -p $HOME/Arduino/libraries | |
cd $HOME/Arduino/libraries | |
ln -s $GITHUB_WORKSPACE esp8266ndn | |
mkdir NDNph | |
curl -fsLS https://github.com/yoursunny/NDNph/archive/${NDNPH_VERSION}.tar.gz | tar -C NDNph -xz --strip-components=1 | |
ln -s $HOME/Arduino/libraries/NDNph $GITHUB_WORKSPACE/../NDNph # for Doxygen | |
env: | |
NDNPH_VERSION: develop | |
- name: Compile examples | |
run: | | |
mk/ci-list.sh ${{ matrix.chip }} ${{ matrix.fqbn }} | bash | |
publish: | |
needs: [build] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install dependencies | |
run: | | |
sudo apt-get install -y --no-install-recommends clang-format-15 doxygen | |
- uses: actions/checkout@v4 | |
- name: Check code style | |
run: | | |
mk/format-code.sh | |
git diff --exit-code | |
- name: Prepare Arduino libraries | |
run: | | |
NDNPH_DIR=$GITHUB_WORKSPACE/../NDNph | |
mkdir $NDNPH_DIR | |
curl -fsLS https://github.com/yoursunny/NDNph/archive/${NDNPH_VERSION}.tar.gz | tar -C $NDNPH_DIR -xz --strip-components=1 | |
env: | |
NDNPH_VERSION: develop | |
- name: Build docs | |
run: docs/build.sh | |
- name: Deploy docs | |
uses: nwtgck/actions-netlify@v3 | |
with: | |
publish-dir: ./docs/html/ | |
production-deploy: true | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
deploy-message: ${{ github.sha }} ${{ github.run_id }} | |
enable-pull-request-comment: false | |
enable-commit-comment: false | |
enable-commit-status: false | |
enable-github-deployment: false | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: cf340d80-1709-45d9-878f-12570d9dcee0 | |
if: ${{ github.repository == 'yoursunny/esp8266ndn' && github.event_name == 'push' }} |