Skip to content

Fix that malloc() doesn't return a null pointer for too large allocations #190

Fix that malloc() doesn't return a null pointer for too large allocations

Fix that malloc() doesn't return a null pointer for too large allocations #190

name: Compile Examples
on:
pull_request:
paths:
- ".github/workflows/compile-examples.yml"
- "cores/**"
- "extras/**"
- "libraries/**"
- "variants/**"
- "boards.txt"
- "platform.txt"
push:
paths:
- ".github/workflows/compile-examples.yml"
- "cores/**"
- "extras/**"
- "libraries/**"
- "variants/**"
- "boards.txt"
- "platform.txt"
jobs:
compile-test:
runs-on: ubuntu-latest
permissions: {}
env:
# sketch paths to compile (recursive) for all boards
UNIVERSAL_SKETCH_PATHS: |
- libraries/AnalogWave
- libraries/Arduino_CAN/examples/CANRead
- libraries/Arduino_CAN/examples/CANWrite
- libraries/Arduino_FreeRTOS
- libraries/EEPROM
- libraries/RTC/examples/RTC_AutomaticExample
- libraries/RTC/examples/RTC_PeriodicExample
- libraries/RTC/examples/Test_RTC
- libraries/SoftwareSerial
- libraries/WDT
strategy:
fail-fast: false
matrix:
board: [
{"fqbn": "arduino:renesas_portenta:portenta_c33"},
{"fqbn": "arduino:renesas_uno:minima"},
{"fqbn": "arduino:renesas_uno:unor4wifi"},
{"fqbn": "arduino-git:renesas:portenta_c33"},
{"fqbn": "arduino-git:renesas:minima"},
{"fqbn": "arduino-git:renesas:unor4wifi"},
]
# make board type-specific customizations to the matrix jobs
include:
- board:
fqbn: "arduino:renesas_portenta:portenta_c33"
additional-sketch-paths: |
- libraries/WiFi
- libraries/UsbMsd
- libraries/UsbHostMsd
- libraries/Storage
- libraries/SSLClient
- libraries/SE05X
- libraries/Ethernet
- libraries/Arduino_CAN/examples/CAN1Read
- libraries/Arduino_CAN/examples/CAN1Write
- libraries/RTC/examples/RTC_NTPSync
- libraries/RTC/examples/RTC_Alarm
- board:
fqbn: "arduino-git:renesas:portenta_c33"
additional-sketch-paths: |
- libraries/WiFi
- libraries/UsbMsd
- libraries/UsbHostMsd
- libraries/Storage
- libraries/SSLClient
- libraries/SE05X
- libraries/Ethernet
- libraries/Arduino_CAN/examples/CAN1Read
- libraries/Arduino_CAN/examples/CAN1Write
- libraries/RTC/examples/RTC_NTPSync
- libraries/RTC/examples/RTC_Alarm
- board:
fqbn: "arduino:renesas_uno:unor4wifi"
additional-sketch-paths: |
- libraries/WiFiS3
- libraries/OTAUpdate
- board:
fqbn: "arduino-git:renesas:unor4wifi"
additional-sketch-paths: |
- libraries/WiFiS3
- libraries/OTAUpdate
steps:
- name: Checkout repository
uses: actions/checkout@v3
# The source files are in a subfolder of the ArduinoCore-API repository, so it's not possible to clone it directly to the final destination in the core
- name: Checkout ArduinoCore-API
uses: actions/checkout@v3
with:
repository: arduino/ArduinoCore-API
path: extras/ArduinoCore-API
- name: Check if API should be compiled in the core
id: checkapi
run: |
if [[ $(grep -r api platform.txt) ]]; then echo "::set-output name=IS_API::true"; fi
- name: Install ArduinoCore-API
run: rm "$GITHUB_WORKSPACE/cores/arduino/api" && mv "$GITHUB_WORKSPACE/extras/ArduinoCore-API/api" "$GITHUB_WORKSPACE/cores/arduino"
if: steps.checkapi.outputs.IS_API == 'true'
- name: Checkout Basic examples
uses: actions/checkout@v3
with:
repository: arduino/arduino-examples
path: examples
- name: Submodule update
run: git submodule init && git submodule update
- name: List files in core
run: tree extras/
- name: Compile examples
uses: arduino/compile-sketches@v1
with:
fqbn: ${{ matrix.board.fqbn }}
libraries: |
- name: Keyboard
- name: Mouse
- name: Servo
- name: LiquidCrystal
- name: CapacitiveSensor
- name: Ethernet
- name: ArduinoHttpClient
- name: NTPClient
- name: ArduinoMqttClient
- name: Stepper
- name: SD
- name: Arduino_JSON
- name: ArduinoBLE
- name: Firmata
- name: ArduinoModbus
- name: ArduinoDMX
- name: ArduinoRS485
- name: ArduinoIoTCloud
platforms: |
# Use Board Manager to install the latest release of Arduino Renesas Boards to get the toolchain
- name: "arduino:renesas_uno"
- name: "arduino:renesas_portenta"
# Overwrite the Board Manager installation with the local platform
- source-path: "./"
name: "arduino-git:renesas"
sketch-paths: |
${{ env.UNIVERSAL_SKETCH_PATHS }}
${{ matrix.additional-sketch-paths }}
enable-deltas-report: 'false'
verbose: 'true'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Save memory usage change report as artifact
uses: actions/upload-artifact@v3
with:
name: sketches-reports
path: sketches-reports