Skip to content
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

Could not access include Directiory #330

Closed
3 tasks done
hasenradball opened this issue Nov 22, 2024 · 2 comments
Closed
3 tasks done

Could not access include Directiory #330

hasenradball opened this issue Nov 22, 2024 · 2 comments
Assignees
Labels
type: support OT: Request for help using the project

Comments

@hasenradball
Copy link

Describe the problem

Hi dear Arduino Team,

I want to add a include directory for a arduino compile sketch workflow file.
workflow file

I want to make the include directory available for the search path for includes to be able to use
#include ”wifi_secrets.h”

How can I add this in the workflow file?

To reproduce

see workflow which is linked.

Expected behavior

the include directory include can be used.

'arduino/compile-sketches' version

latest

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details
@hasenradball hasenradball added the type: imperfection Perceived defect in any part of project label Nov 22, 2024
@per1234 per1234 self-assigned this Nov 22, 2024
@per1234 per1234 added type: support OT: Request for help using the project and removed type: imperfection Perceived defect in any part of project labels Nov 22, 2024
@per1234
Copy link
Collaborator

per1234 commented Nov 22, 2024

Hi @hasenradball. You were somewhat close to getting it at one point (hasenradball/ESP32-C3-Examples@8164f10). You will find it more productive to study the documentation for the action instead of inventing syntax at random.

As you maybe guessed at one point during your development of the workflow, you can accomplish your goal by using the action's cli-compile-flags input. I submitted the necessary change here:

hasenradball/ESP32-C3-Examples#1

--- a/.github/workflows/compile_examples.yml
+++ b/.github/workflows/compile_examples.yml
@@ -39,5 +39,6 @@ jobs:
             ./examples/wifiTest/wifiTest.ino
             ./examples/readAM2302-Sensor/readAM2302-Sensor.ino
             ./examples/timerInterrupt/timerInterrupt.ino
-          build-property: |
-            build.extra_flags="-I ${{ github.workspace }}/include"
+          cli-compile-flags: |
+            - --library
+            - "${{ github.workspace }}/include"

However, I think you should consider whether this is the correct approach. If you intend this project to be useful to the Arduino community, consider how much difficulty they might have getting those sketches to compile. Do you think every one of them should have to compile the sketches using Arduino CLI with a special flag? Or do you only intend for the project to be used with PlatformIO? If so, you would be better off using PlatformIO in your workflow instead of this action.

@per1234 per1234 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 22, 2024
@hasenradball
Copy link
Author

Hi @per1234 Thanks si much for your comment.
This is actually used for PIO, so thats a good point you mentioned.
Did you have a example for a pio workflow in mind.
Haven‘ t seen actually one for PIO.

Thank you for your Support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: support OT: Request for help using the project
Projects
None yet
Development

No branches or pull requests

2 participants