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

Adding all WiFi enabled boards as CI build target. #32

Merged
merged 4 commits into from
Mar 19, 2020

Conversation

aentinger
Copy link
Contributor

@aentinger aentinger commented Mar 19, 2020

Adding MKR1000, NANO 33 IOT and ESP8266 as CI build targets

@aentinger aentinger force-pushed the add-all-cloud-boards-to-ci branch 2 times, most recently from da93eb4 to 554b271 Compare March 19, 2020 12:41
@aentinger
Copy link
Contributor Author

@per1234 Do you see a way to either exclude building the examples for MKR NB/GSM/WAN or a way to upgrade the examples so that they can be used meaningful with at least MKR NB and GSM?

@per1234
Copy link
Contributor

per1234 commented Mar 19, 2020

Do you see a way to either exclude building the examples for MKR NB/GSM/WAN

Do you mean you want to only build certain examples for those boards, and only the WiFi examples for the WiFi boards?

a way to upgrade the examples so that they can be used meaningful with at least MKR NB and GSM?

I'd guess it could be done with some heavy use of preprocessor conditionals but that could end up making the examples pretty unfriendly to beginners.

@aentinger
Copy link
Contributor Author

Do you mean you want to only build certain examples for boards, and only the WiFi examples for the WiFi boards?

What this PR is doing right now is just to build for WiFi boards. But I'd like to build at least the library for all boards (so one yet to be designed sketch for all boards) and all the WiFi examples to be built for WiFi boards only.

I'd guess it could be done with some heavy use of preprocessor conditionals but that could end up making the examples pretty unfriendly to beginners.

I'm afraid so too. Let's just not do that.

@per1234
Copy link
Contributor

per1234 commented Mar 19, 2020

The only way I can think with the existing compile-examples action is to use an alternate entrypoint to delete the examples you don't want to compile in each step:

     - name: Compile universal examples for official Arduino boards
       if: startsWith(matrix.fqbn, '"esp8266:esp8266') != true
       uses: arduino/actions/libraries/compile-examples@master
       with:
         fqbn: ${{ matrix.fqbn }}
         libraries: ${{ env.LIBRARIES }}
         entrypoint: /github/workspace/.github/workflows/wrapper-script-that-deletes-wifi-examples.sh
     - name: Compile WiFi examples for official Arduino WiFi boards
       if: startsWith(matrix.fqbn, '"esp8266:esp8266') != true && (matrix.fqbn == 'arduino:samd:mkr1000' || matrix.fqbn == 'arduino:samd:mkrwifi1010' || matrix.fqbn == 'arduino:samd:nano_33_iot' || matrix.fqbn == 'arduino:megaavr:uno2018')
       uses: arduino/actions/libraries/compile-examples@master
       with:
         fqbn: ${{ matrix.fqbn }}
         libraries: ${{ env.LIBRARIES }}
         entrypoint: /github/workspace/.github/workflows/wrapper-script-that-deletes-universal-examples.sh
     - name: compile-examples for ESP8266 boards
       if: startsWith(matrix.fqbn, '"esp8266:esp8266')
       uses: arduino/actions/libraries/compile-examples@master
       with:
         fqbn: ${{ matrix.fqbn }}
         entrypoint: /github/workspace/.github/workflows/install-python-wrapper.sh

I might be slightly off in my syntax, but you get the idea.

This seems like an issue we're going to be running into a lot with the compile-examples action. It would probably be a good idea to try to figure out a way to make it more flexible in this respect so we don't have to make the workflow configuration so messy with these hacky workarounds.

@aentinger
Copy link
Contributor Author

Thank you for your suggestion. Can I ask to look into a generalised solution for this situation when you have time (this is rather low-prio from my point of view). I'll go ahead and limit this PR to WiFi boards.

@aentinger aentinger changed the title Adding all Arduino IoT Cloud supported boards as CI build target. Adding all WiFi enabled boards as CI build target. Mar 19, 2020
@per1234
Copy link
Contributor

per1234 commented Mar 19, 2020

OK, will do.

@aentinger
Copy link
Contributor Author

Thank you 👍 ... if the PR is otherwise good with you I'd merge it in?

@aentinger aentinger merged commit 4f855f2 into master Mar 19, 2020
@aentinger aentinger deleted the add-all-cloud-boards-to-ci branch March 19, 2020 14:44
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.

None yet

2 participants