ci: use arduino/compile-sketches@v1 #96
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: {} | ||
env: | ||
NDNPH_VERSION: develop | ||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
include: | ||
- chip: ESP8266 | ||
fqbn: esp8266:esp8266:nodemcuv2 | ||
platforms: | | ||
- name: esp8266:esp8266 | ||
source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json | ||
sketches: | | ||
- examples/PingClient | ||
- examples/PingServer | ||
- examples/unittest | ||
- examples/UnixTime | ||
- chip: ESP32 | ||
fqbn: esp32:esp32:esp32wrover:PartitionScheme=noota_ffat | ||
platforms: &esp32platform | | ||
- name: esp32:esp32 | ||
source-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json | ||
libraries: | | ||
- name: NimBLE-Arduino | ||
sketches: &esp32sketches | | ||
- examples/BlePingServer | ||
- examples/NdncertClient | ||
- examples/PingClient | ||
- examples/PingServer | ||
- examples/unittest | ||
- examples/UnixTime | ||
- chip: ESP32C3 | ||
fqbn: esp32:esp32:esp32c3:PartitionScheme=noota_ffat | ||
platforms: *esp32platform | ||
sketches: *esp32sketches | ||
cli-compile-flags: | | ||
- --build-property=build.defines=-DDEMO_BLEPINGSERVER_DISABLE_NIMBLE=1 | ||
- chip: nRF52 | ||
fqbn: adafruit:nrf52:feather52832 | ||
platforms: | | ||
- name: adafruit:nrf52 | ||
source-url: https://adafruit.github.io/arduino-board-index/package_adafruit_index.json | ||
pip-deps: adafruit-nrfutil | ||
sketches: | | ||
- examples/BlePingServer | ||
- examples/unittest | ||
fail-fast: false | ||
name: ${{ matrix.chip }} | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- run: pip install --user ${{ matrix.pip-deps }} | ||
if: ${{ matrix.pip-deps }} | ||
- uses: actions/checkout@v4 | ||
- uses: arduino/compile-sketches@v1 | ||
with: | ||
fqbn: ${{ matrix.fqbn }} | ||
platforms: ${{ matrix.platforms }} | ||
libraries: | | ||
- source-path: ./ | ||
- source-url: https://github.com/yoursunny/NDNph.git | ||
version: ${{ env.NDNPH_VERSION }} | ||
- name: ArduinoUnit | ||
${{ matrix.libraries }} | ||
sketch-paths: ${{ matrix.sketches }} | ||
cli-compile-flags: ${{ matrix.cli-compile-flags }} | ||
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' }} |