From 17d52f5f4ecaea2f218fae765af5346efa32697d Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Thu, 17 Nov 2022 12:15:25 +0100 Subject: [PATCH 1/2] Adding CI build action --- .github/workflows/compile-examples.yml | 105 +++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 .github/workflows/compile-examples.yml diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml new file mode 100644 index 0000000..015918b --- /dev/null +++ b/.github/workflows/compile-examples.yml @@ -0,0 +1,105 @@ +name: Compile Examples + +on: + pull_request: + paths: + - ".github/workflows/compile-examples.yml" + - "examples/**" + - "src/**" + push: + paths: + - ".github/workflows/compile-examples.yml" + - "examples/**" + - "src/**" + +jobs: + build: + runs-on: ubuntu-latest + + env: + UNIVERSAL_LIBRARIES: | + - source-path: ./ + + SKETCHES_REPORTS_PATH: sketches-reports + + strategy: + fail-fast: false + + matrix: + board: + - fqbn: arduino:avr:uno + platforms: | + - name: arduino:avr + - fqbn: arduino:samd:mkr1000 + platforms: | + - name: arduino:samd + - fqbn: arduino:samd:mkrzero + platforms: | + - name: arduino:samd + - fqbn: arduino:samd:mkrwifi1010 + platforms: | + - name: arduino:samd + - fqbn: arduino:samd:mkrfox1200 + platforms: | + - name: arduino:samd + - fqbn: arduino:samd:mkrwan1300 + platforms: | + - name: arduino:samd + - fqbn: arduino:samd:mkrwan1310 + platforms: | + - name: arduino:samd + - fqbn: arduino:samd:mkrgsm1400 + platforms: | + - name: arduino:samd + - fqbn: arduino:samd:mkrnb1500 + platforms: | + - name: arduino:samd + - fqbn: arduino:samd:mkrvidor4000 + platforms: | + - name: arduino:samd + - fqbn: arduino:mbed_portenta:envie_m7 + platforms: | + - name: arduino:mbed_portenta + - fqbn: arduino:mbed_portenta:envie_m4 + platforms: | + - name: arduino:mbed_portenta + - fqbn: arduino:mbed_nano:nano33ble + platforms: | + - name: arduino:mbed_nano + - fqbn: arduino:mbed_nano:nanorp2040connect + platforms: | + - name: arduino:mbed_nano + - fqbn: arduino:mbed_edge:edge_control + platforms: | + - name: arduino:mbed_edge + - fqbn: esp32:esp32:esp32 + platforms: | + - name: esp32:esp32 + source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json + - fqbn: rp2040:rp2040:rpipico + platforms: | + - name: rp2040:rp2040 + source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install ESP32 platform dependencies + if: startsWith(matrix.board.fqbn, 'esp32:esp32') + run: pip3 install pyserial + + - name: Compile examples + uses: arduino/compile-sketches@v1 + with: + fqbn: ${{ matrix.board.fqbn }} + platforms: ${{ matrix.board.platforms }} + enable-deltas-report: true + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} + + - name: Save memory usage change report as artifact + if: github.event_name == 'pull_request' + uses: actions/upload-artifact@v3 + with: + name: ${{ env.SKETCHES_REPORTS_PATH }} + path: ${{ env.SKETCHES_REPORTS_PATH }} From eab8e8e29b216214be3a95471270549df59c8ad6 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Fri, 18 Nov 2022 09:31:09 +0100 Subject: [PATCH 2/2] Adding CI compile badge to README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 95dedc8..14fd32f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Multi Half-Bridge Arduino Library - +[![Compile Examples](https://github.com/Infineon/arduino-multi-half-bridge/workflows/Compile%20Examples/badge.svg)](https://github.com/Infineon/arduino-multi-half-bridge/actions?workflow=Compile+Examples) ![build-check](https://github.com/Infineon/arduino-multi-half-bridge/actions/workflows/build-check.yml/badge.svg) Arduino library of Infineon's Multi Half-Bridge IC controllers.