diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml new file mode 100644 index 0000000..ba65448 --- /dev/null +++ b/.github/workflows/compile-examples.yml @@ -0,0 +1,61 @@ +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: + SKETCHES_REPORTS_PATH: sketches-reports + LIBRARIES: | + # Install the library from the local path. + - source-path: ./ + - name: Arduino_APDS9960 + - name: ArduinoBLE + - name: WiFiNINA + - name: INA2xx + - name: Arduino_BMI270_BMM150 + - name: BSEC Software Library + - name: Arduino_GroveI2C_Ultrasonic + - name: OneWireNg + + strategy: + fail-fast: false + + matrix: + board: + - fqbn: arduino:mbed_nano:nanorp2040connect + platforms: | + - name: arduino:mbed_nano + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Compile examples + uses: arduino/compile-sketches@main + with: + fqbn: ${{ matrix.board.fqbn }} + platforms: ${{ matrix.board.platforms }} + libraries: ${{ env.LIBRARIES }} + enable-deltas-report: true + github-token: ${{ secrets.GITHUB_TOKEN }} + 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 }} diff --git a/README.md b/README.md index 2e6a854..80c3703 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ Arduino_ScienceKitCarrier ========================= +[![Compile Examples](https://github.com/arduino-libraries/Arduino_ScienceKitCarrier/workflows/Compile%20Examples/badge.svg)](https://github.com/arduino-libraries/Arduino_ScienceKitCarrier/actions?workflow=Compile+Examples) [![Check Arduino](https://github.com/arduino-libraries/Arduino_ScienceKitCarrier/actions/workflows/check-arduino.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_ScienceKitCarrier/actions/workflows/check-arduino.yml) [![Spell Check](https://github.com/arduino-libraries/Arduino_ScienceKitCarrier/workflows/Spell%20Check/badge.svg)](https://github.com/arduino-libraries/Arduino_ScienceKitCarrier/actions?workflow=Spell+Check) [![Spell Check](https://github.com/arduino-libraries/Arduino_ScienceKitCarrier/workflows/Sync%20Labels/badge.svg)](https://github.com/arduino-libraries/Arduino_ScienceKitCarrier/actions?workflow=Sync+Labels)