-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* .github/workflows: Add build and release workflow. Signed-off-by: Ramya Subramanyam <ramya.subramanyam@infineon.com> * ./tools: Add script to prepare release package. Signed-off-by: Ramya Subramanyam <ramya.subramanyam@infineon.com> * ./development-instructions.rst: Fix path to the package. Signed-off-by: Ramya Subramanyam <ramya.subramanyam@infineon.com> * examples/testSketch: Add an example sketch for CI test. Signed-off-by: Ramya Subramanyam <ramya.subramanyam@infineon.com> * .github/workflows: Refactor the release and compile steps. Signed-off-by: Ramya Subramanyam <ramya.subramanyam@infineon.com> * ./platform.txt: Refactor platform text. Signed-off-by: Ramya Subramanyam <ramya.subramanyam@infineon.com> * ./Makefile: Dynamically get the path to MTB tools. Signed-off-by: Ramya Subramanyam <ramya.subramanyam@infineon.com> * tools/dev-setup.sh: Add support to call individual function from the dev setup script. Signed-off-by: Ramya Subramanyam <ramya.subramanyam@infineon.com> * .github/workflows: Fix the fbqn with new naming convention. Signed-off-by: Ramya Subramanyam <ramya.subramanyam@infineon.com> --------- Signed-off-by: Ramya Subramanyam <ramya.subramanyam@infineon.com>
- Loading branch information
1 parent
f75640c
commit 151b1ef
Showing
8 changed files
with
133 additions
and
36 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
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" | ||
] | ||
|
||
# include additional information for each fqbn, in this case the platform name to install | ||
include: | ||
- fqbn: "infineon:psoc:cy8ckit_062s2_ai" | ||
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 }} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
double number; | ||
double result; | ||
|
||
// the setup function runs once when you press reset or power the board | ||
void setup() { | ||
|
||
// Define a number to calculate the square root of | ||
number = 25.0; | ||
} | ||
|
||
// the loop function runs over and over again forever | ||
void loop() { | ||
// Loop to count from 0 to 100 | ||
for (int i = 0; i <= 100; i++) { | ||
result = sqrt(number); | ||
} | ||
} |
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
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
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
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