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

Compiling .ino files #11

Merged
merged 4 commits into from
May 2, 2023
Merged

Compiling .ino files #11

merged 4 commits into from
May 2, 2023

Conversation

laupow
Copy link
Collaborator

@laupow laupow commented May 1, 2023

Story details: https://app.shortcut.com/particle/story/117875

I embedded code from https://github.com/particle-iot/buildpack-wiring-preprocessor to mirror the cloud compiler's preprocessing step.

Do we have any other places that use this code @suda? I'm ok embedding the cparser code this way.

depends on #10

@laupow laupow requested review from suda and keeramis May 1, 2023 21:04
Base automatically changed from feature/sc-117794/use-build-targets-api to main May 2, 2023 10:37
@laupow laupow force-pushed the feature/sc-117875/compiling-ino-files branch from a4f6695 to d13a5ff Compare May 2, 2023 10:40
@keeramis
Copy link

keeramis commented May 2, 2023

@laupow thanks for the changes. Overall as I scanned through, the PR looks good to me. Does it make sense for me to test this locally and if yes, could you please point me to any testing instructions that I can try to use?

@laupow
Copy link
Collaborator Author

laupow commented May 2, 2023

@keeramis Yeah, it's likely a good idea to test a ino firmware. I tested two different apps myself.

To test these changes locally, you can checkout this branch and then run the steps over here:

https://github.com/particle-iot/compile-action/blob/main/DEVELOPMENT.md

For the npm start command, replace the sources path in INPUT_SOURCES-FOLDER=test/fixtures/single-file-firmware with a path to some firmware on your computer that is ino files (not cpp files). You'll need Docker running on your machine to successfully compile.

I added a copy of Tinker and this PR adds some checks to make sure Tinker (in an ino file) compiles

@laupow laupow force-pushed the feature/sc-117875/compiling-ino-files branch from b672de6 to 44776c2 Compare May 2, 2023 16:13
Copy link

@keeramis keeramis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected. 👍

  • INPUT_DEVICE-OS-VERSION=default gives the default/most relevant device-os version for that platform (ex: electron points to 2.3.1, tracker points to 4.0.2, p2 points to 5.3.1)
  • INPUT_DEVICE-OS-VERSION=latest_lts gives it's LTS version is available (ex: electron points to 2.3.1, tracker points to 4.0.2, p2 gives an error)
  • INPUT_DEVICE-OS-VERSION=latest gives the latest (ex: electron points to 3.3.1, tracker points to 5.3.1)

@laupow laupow merged commit 786b827 into main May 2, 2023
@laupow laupow deleted the feature/sc-117875/compiling-ino-files branch May 2, 2023 19:48
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