Update compile.yml #11
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: | |
push: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Install Arduino CLI manually | |
- name: Install Arduino CLI | |
run: | | |
wget -qO- https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_64bit.tar.gz | tar -xvz | |
sudo mv arduino-cli /usr/local/bin/ | |
arduino-cli version || exit 1 | |
# Ensure that Bash is used for compatibility with the prebuild script | |
- name: Ensure Bash Shell | |
run: sudo ln -sf /bin/bash /bin/sh | |
# Checkout the repository | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Add custom package index URL and update core index | |
- name: Configure Arduino CLI | |
run: | | |
arduino-cli config init | |
arduino-cli config set board_manager.additional_urls https://github.com/SolderedElectronics/Dasduino-Board-Definitions-for-Arduino-IDE/raw/master/package_Dasduino_Boards_index.json | |
arduino-cli core update-index | |
# Install the required platform | |
- name: Install Arduino Core | |
run: | | |
arduino-cli core install Inkplate_Motion:stm32 | |
# Compile all examples and include the current repository as a library | |
- name: Compile examples | |
run: | | |
set -e # Exit immediately if a command exits with a non-zero status | |
for sketch in $(find examples -name '*.ino'); do | |
echo "Compiling $sketch" | |
arduino-cli compile \ | |
--fqbn Inkplate_Motion:stm32:Inkplate6Motion \ | |
--libraries "./" \ | |
"$sketch" \ | |
--warnings all \ | |
--verbose | |
done |