From c0f0b9d37f1280332d69da4f0f2e854866d8f36d Mon Sep 17 00:00:00 2001 From: funbiscuit Date: Wed, 12 Jul 2023 23:19:28 +0300 Subject: [PATCH] Compile arduino example in CI --- .github/workflows/ci.yaml | 19 +++++++++++++++++++ examples/arduino-cli/arduino-cli.ino | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 208804e..269e718 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -85,6 +85,25 @@ jobs: with: files: ${{ github.workspace }}/build/coverage_xml.xml + build-arduino-example: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Generate single header lib + working-directory: ${{github.workspace}}/lib + run: python3 build-shl.py + + - name: Copy single header file to sketch dir + run: cp ${{github.workspace}}/lib/shl/embedded_cli.h ${{github.workspace}}/examples/arduino-cli/embedded_cli.h + + - name: Compile arduino sketch + uses: arduino/compile-sketches@v1 + with: + sketch-paths: | + - examples/arduino-cli + build-win: strategy: fail-fast: false diff --git a/examples/arduino-cli/arduino-cli.ino b/examples/arduino-cli/arduino-cli.ino index f0cc59c..9368f6a 100644 --- a/examples/arduino-cli/arduino-cli.ino +++ b/examples/arduino-cli/arduino-cli.ino @@ -1,6 +1,6 @@ /** * Simple example of using embedded-cli in arduino. - * To compile copy embedded-cli.h and embedded-cli.c to sketch directory. + * To compile copy embedded-cli.h (single header version) to sketch directory. * * With specified settings: * 32 bytes for cmd buffer, 16 for RX buffer,