Skip to content

Add test-compile #169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 20, 2020
Merged

Add test-compile #169

merged 1 commit into from
May 20, 2020

Conversation

ArminJo
Copy link

@ArminJo ArminJo commented May 20, 2020

Hello Andy,
I thougt you may appeciate to have automated test-compile for all the libraries in the board package 😀 .
Here it is.
I had to add 20 excludes in order to compile successfully. Maybe these examples (or the according variants.h) can be modified to have these examples also compiling successfully for the board.

Or the examples may have an

#if defined(ARDUINO_AM_AP3_SFE_BB_ARTEMIS_NANO)
#error This example is not intended to run on the Artemin Nano board
#endif

But this can be done later...

This is the complete exclude list, as can be seen in the TestCompile.yml file

          - arduino-boards-fqbn: SparkFun:apollo3:artemis
            examples-exclude: Example4_analogRead,LowPower_WithWork,Example2_Serial,Example2_MoreSPIPorts,Example6_19servos,Example7_29servos

          - arduino-boards-fqbn: SparkFun:apollo3:amap3redboard
            examples-exclude: Example2_MoreSPIPorts

          - arduino-boards-fqbn: SparkFun:apollo3:amap3nano
            examples-exclude: Example6_19servos,Example7_29servos

          - arduino-boards-fqbn: SparkFun:apollo3:amap3atp
            examples-exclude: Example4_analogRead,Example6_19servos

          - arduino-boards-fqbn: SparkFun:apollo3:edge
            examples-exclude: Example4_analogRead,LowPower_WithWork,Example2_Serial,Example6_19servos,Example7_29servos
          - arduino-boards-fqbn: SparkFun:apollo3:edge2
            examples-exclude: Example4_analogRead,LowPower_WithWork,Example2_Serial,Example1_SPI,Example6_19servos,Example7_29servos

Best regards
Armin

@oclyke
Copy link
Contributor

oclyke commented May 20, 2020

Hi @ArminJo, this is cool! I have never used GitHub actions so I am a little confused about how this actually performs the tests. Is it testing using Arduino CLI? Is that somehow contained in the concept of the matrix?

Or is it simpler than that - e.g. trying to compile .cpp files without the context of the Arduino core's platform.txt?

I would like to merge your PR and I am just trying to make sure I understand it first. Thanks!

@ArminJo
Copy link
Author

ArminJo commented May 20, 2020

Hi Owen,
first you can see the output at https://github.com/ArminJo/Arduino_Apollo3/runs/693797859?check_suite_focus=true
The matrix determines how much jobs are in parallel and is used to setup individual parameter sets for each job.
The parameters are echoed at the beginning of each Compile all examples step.
The installation of the specified board package (including the platform.txt) you can see here.

The action is documented here and installs and uses arduino-cli to compile all *.ino files. In case of errors you can see the complete compile output in the Compile all examples step.
If it is successful it is only a green check.

If you have more questions, do not hesitate, but be aware, that we have 11 pm here in Europe, and therefore you may get the answer tomorrow.

@oclyke
Copy link
Contributor

oclyke commented May 20, 2020

Aha - that info is very helpful. The link: https://github.com/ArminJo/arduino-test-compile explains where a lot of the magic is coming from (along with the line uses: ArminJo/arduino-test-compile@v2)

I'm so glad that you shared this with us!

Last request: would you be willing to target the release-candidate branch with your PR? We've adopted a new process of keeping 'master' even with the latest release available in the Arduino Board Manager.

Can't wait to have this test capability

@ArminJo
Copy link
Author

ArminJo commented May 20, 2020

How can I retarget the PR or must I create a new one?
update: I found the way.

@ArminJo ArminJo changed the base branch from master to release-candidate May 20, 2020 21:15
@oclyke oclyke merged commit c9b0ea9 into sparkfun:release-candidate May 20, 2020
@oclyke
Copy link
Contributor

oclyke commented May 20, 2020

Great, thank you again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants