Setup build workflow #50
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: Arduino Core PSoC CI compile | |
# on which event should we start push, pull request or schedule dispatches | |
on: | |
- push | |
- pull_request | |
jobs: | |
# The build job compiles the sample code for different boards | |
build: | |
# we run this on self hosted runner, use labels to be more specific | |
# add specific names if there are some, otherwise self-hosted, X64, Linux are the default ones | |
runs-on: | |
- self-hosted | |
- X64 | |
- Linux | |
- PSoC | |
# which combination of sample code and boards should run | |
# for this example of 2 sample codes and 3 boards a total of 2x3=6 runners have to work. | |
# if we have only 4 runner then these 4 are started and the last 2 are waiting until they can start | |
strategy: | |
matrix: | |
# List of all examples in the lib to compile | |
example: [ | |
examples/testSketch/testSketch.ino | |
] | |
# board packages we want to run | |
# attention the matrix spans over the fqbn not platform so that we can choose different boards | |
# this example compiles each sample code for Arduino Uno, XMC2Go and XMC4700 boards | |
fqbn: [ | |
"infineon:psoc:CY8CKIT-062S2-AI-Kit" | |
] | |
# include additional information for each fqbn, in this case the platform name to install | |
include: | |
- fqbn: "infineon:psoc:CY8CKIT-062S2-AI-Kit" | |
platform: "infineon:psoc" | |
# These are the steps which should run for each combination of fqbn and example code | |
steps: | |
- name: Install/Update Arduino Platform | |
run: | | |
arduino-cli core update-index | |
arduino-cli core install ${{ matrix.platform }} --additional-urls https://github.com/Infineon/arduino-core-psoc/releases/latest/download/package_psoc_index.json | |
arduino-cli core list | |
- name: Remove latest installed platform version | |
run: | | |
cd ~/.arduino15/packages/infineon/hardware/psoc | |
rm -rf * | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
#with: | |
#submodules: true | |
#recursive-submodules: true | |
- name: Setup environment | |
run: | | |
export REPO="$(basename "$GITHUB_REPOSITORY")" | |
bash ./tools/dev-setup.sh git_submodule_setup | |
- name: copy/link repository to arduino path | |
run: | | |
mkdir ~/.arduino15/packages/infineon/hardware/psoc/0.1.0-build | |
cp -a ~/actions-runner/_work/arduino-core-psoc/arduino-core-psoc/* ~/.arduino15/packages/infineon/hardware/psoc/0.1.0-build | |
cd ~/.arduino15/packages/infineon/hardware/psoc/0.1.0-build | |
- name: copy/link arduino core api path | |
run: | | |
mkdir ~/.arduino15/packages/infineon/hardware/psoc/0.1.0-build/cores/psoc/api | |
cp -a ~/.arduino15/packages/infineon/hardware/psoc/0.1.0-build/extras/arduino-core-api/api/* ~/.arduino15/packages/infineon/hardware/psoc/0.1.0-build/cores/psoc/api | |
# Compile the sample code for the selected board and board support package with the arduino compiler | |
- name: Compile Sketch | |
run: | | |
arduino-cli compile --clean --verbose --fqbn ${{ matrix.fqbn }} ${{ matrix.example }} |