From 020b73d99a392ccc8f81def5252d43d5c24f8f42 Mon Sep 17 00:00:00 2001 From: Georg Icking-Konert Date: Mon, 4 Nov 2024 05:02:13 +0100 Subject: [PATCH] Create build_examples.yml initial CI test --- .github/workflows/build_examples.yml | 46 ++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/build_examples.yml diff --git a/.github/workflows/build_examples.yml b/.github/workflows/build_examples.yml new file mode 100644 index 0000000..e2d4efa --- /dev/null +++ b/.github/workflows/build_examples.yml @@ -0,0 +1,46 @@ +# based on https://github.com/arduino-libraries/ArduinoBLE/blob/master/.github/workflows/compile-examples.yml +name: Build Lib Examples + +on: + + # Trigger workflow on every push and pull request + push: + pull_request: + + # Also run every 7 days to catch breakage caused by changes to external resources (libraries, platforms). + schedule: + # Minute, Hour, Day of Month, Month, Day of Week -> every 7 days at 9.15pm + - cron: '15 21 */7 * *' + +jobs: + + # Build for AVR + build-for-avr: + runs-on: ubuntu-latest + env: + SKETCHES_REPORTS_PATH: sketches-reports + strategy: + fail-fast: false + matrix: + board: + - fqbn: arduino:avr:mega # Arduino Mega2560 + artifact-name-suffix: arduino_avr_mega + - fqbn: arduino:avr:uno # Arduino Uno + artifact-name-suffix: arduino_avr_uno + steps: + - uses: actions/checkout@v4.2.2 # check-out this repo + - uses: arduino/compile-sketches@v1.1.2 # build Arduino examples + with: + github-token: ${{ secrets.GITHUB_TOKEN }} # required for private repos + fqbn: ${{ matrix.board.fqbn }} + libraries: | + - source-path: ./ + sketch-paths: | + - examples + cli-compile-flags: | + - --warnings="all" + - uses: actions/upload-artifact@v4.4.3 # upload test reports + with: + if-no-files-found: error + path: ${{ env.SKETCHES_REPORTS_PATH }} + name: sketches-report-${{ matrix.board.artifact-name-suffix }}