Small optimisation on const #175
Workflow file for this run
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: Compile Examples | |
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows | |
on: | |
push: | |
paths: | |
- ".github/workflows/**" | |
- "examples/**" | |
- "**.cpp" | |
- "**.h" | |
- "**.hpp" | |
pull_request: | |
paths: | |
- ".github/workflows/**" | |
- "examples/**" | |
- "**.cpp" | |
- "**.h" | |
- "**.hpp" | |
workflow_dispatch: | |
repository_dispatch: | |
jobs: | |
build: | |
name: ${{ matrix.board.fqbn }} | |
runs-on: ubuntu-latest | |
env: | |
SKETCHES_REPORTS_PATH: sketches-reports | |
strategy: | |
fail-fast: false | |
# Of course we'll want to add all supported arches. See https://github.com/arduino-libraries/ArduinoIoTCloud/blob/master/.github/workflows/compile-examples.yml for a complex multi-board setup | |
matrix: | |
board: | |
- fqbn: arduino:avr:uno | |
platforms: | | |
- name: arduino:avr | |
- fqbn: esp8266:esp8266:huzzah | |
type: 8266 | |
platforms: | | |
- name: esp8266:esp8266 | |
source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json | |
- fqbn: STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103C8 | |
platforms: | | |
- name: STMicroelectronics:stm32 | |
source-url: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json | |
- fqbn: arduino:mbed_giga:giga | |
platforms: | | |
- name: arduino:mbed_giga | |
# SAMD boards. There is also an Adrafruit fork of this core, and the two seem to have diverged, considerably. I have no idea on the differences. | |
- fqbn: arduino:samd:adafruit_circuitplayground_m0 | |
platforms: | | |
- name: arduino:samd | |
- fqbn: rp2040:rp2040:rpipico | |
type: rp2040 | |
platforms: | | |
- name: rp2040:rp2040 | |
source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Compile examples | |
uses: arduino/compile-sketches@v1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
fqbn: ${{ matrix.board.fqbn }} | |
platforms: ${{ matrix.board.platforms }} | |
# limit to only some sketches for now, while figuring out the workflow | |
sketch-paths: | | |
- examples/01.Basics | |
- examples/02.Control | |
- examples/06.Synthesis | |
libraries: | | |
- source-path: ./ | |
- name: PinChangeInterrupt | |
- name: MIDI Library | |
- name: Arduino_AdvancedAnalog | |
enable-deltas-report: true | |
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} | |
- name: Save sketches report as workflow artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
if-no-files-found: error | |
path: ${{ env.SKETCHES_REPORTS_PATH }} | |
name: sketches-reports-artifact | |
# When using a matrix to compile for multiple boards, it's necessary to use a separate job for the deltas report | |
report: | |
needs: build # Wait for the compile job to finish to get the data for the report | |
if: github.event_name == 'pull_request' # Only run the job when the workflow is triggered by a pull request | |
continue-on-error: true # Not the programmer's fault, if reporting fails | |
runs-on: ubuntu-latest | |
steps: | |
# This step is needed to get the size data produced by the compile jobs | |
- name: Download sketches reports artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: sketches-reports-artifact | |
path: ${{ env.SKETCHES_REPORTS_PATH }} | |
- uses: arduino/report-size-deltas@v1 | |
with: | |
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }} |