add support for Seeed XIAO BLE Plus #68
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 | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- ".github/workflows/compile-examples.yml" | |
- "cores/**" | |
- "libraries/**" | |
- "patches/**" | |
- "variants/**" | |
- "boards.txt" | |
- "platform.txt" | |
push: | |
paths: | |
- ".github/workflows/compile-examples.yml" | |
- "cores/**" | |
- "libraries/**" | |
- "patches/**" | |
- "variants/**" | |
- "boards.txt" | |
- "platform.txt" | |
jobs: | |
compile-examples: | |
runs-on: ubuntu-latest | |
env: | |
# sketch paths to compile (recursive) compatible with all boards | |
UNIVERSAL_SKETCH_PATHS: | | |
# - libraries/PDM | |
# - libraries/Scheduler | |
# - libraries/USBHID | |
SKETCHES_REPORTS_PATH: sketches-reports | |
strategy: | |
fail-fast: false | |
matrix: | |
board: | |
- fqbn: Seeeduino:nrf52:xiaonRF52840Sense | |
type: nrf52 | |
# Make board type-specific configurations | |
include: | |
- board: | |
type: nrf52 | |
platforms: | | |
# Use Boards Manager to install the latest release of the platform to get the toolchain | |
- source-url: "https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json" | |
name: "Seeeduino:nrf52" | |
# Overwrite the Board Manager installation with the local platform | |
- source-path: "./" | |
name: "Seeeduino:nrf52" | |
additional-sketch-paths: | | |
# - libraries/ThreadDebug | |
# - libraries/USBMSD/examples/Nano33BLE_FlashMassStorage | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
# 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@v2 | |
with: | |
repository: arduino/ArduinoCore-API | |
path: ArduinoCore-API | |
- name: Install ArduinoCore-API | |
run: | | |
mv "$GITHUB_WORKSPACE/ArduinoCore-API/api" "$GITHUB_WORKSPACE/cores/arduino" | |
rm -rf "$GITHUB_WORKSPACE/ArduinoCore-API/" | |
- name: Compile examples | |
uses: arduino/compile-sketches@v1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
fqbn: ${{ matrix.board.fqbn }} | |
platforms: ${{ matrix.platforms }} | |
sketch-paths: | | |
${{ env.UNIVERSAL_SKETCH_PATHS }} | |
${{ matrix.additional-sketch-paths }} | |
verbose: 'false' | |
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@v2 | |
with: | |
path: ${{ env.SKETCHES_REPORTS_PATH }} | |
name: ${{ env.SKETCHES_REPORTS_PATH }} | |
- name: Pack | |
run: | | |
cd ${{ github.workspace }} | |
VERSION=`grep version= platform.txt | sed 's/version=//g'` | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
PWD=`pwd` | |
FOLDERNAME=`basename $PWD` | |
cd .. | |
tar --transform "s|$FOLDERNAME|$FOLDERNAME-$VERSION|g" --exclude=extras/** --exclude=.git* --exclude=.github/* -cjf ArduinoCore-mbed-$VERSION.tar.bz2 $FOLDERNAME | |
cd - | |
mv ../ArduinoCore-mbed-$VERSION.tar.bz2 . | |
echo "PACKAGE=${{ github.workspace }}/ArduinoCore-mbed-$VERSION.tar.bz2" >> $GITHUB_ENV | |
- name: Upload package | |
uses: actions/upload-artifact@master | |
with: | |
name: ArduinoCore-mbed-${{env.VERSION}}.tar.bz2 | |
path: ${{env.PACKAGE}} |