Skip to content

.arduino-ci.yml is case sensitive for platforms #261

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

Closed
RobTillaart opened this issue Jan 2, 2021 · 4 comments · Fixed by #256
Closed

.arduino-ci.yml is case sensitive for platforms #261

RobTillaart opened this issue Jan 2, 2021 · 4 comments · Fixed by #256

Comments

@RobTillaart
Copy link

Changed .arduino-ci.yml to uppercase for UNO see below, as this is a common way to write I propose to make the strings under platforms case independent

compile:
  # Choosing to run compilation tests on 2 different Arduino platforms
  platforms:
    - UNO          <<<<<<<<< UPPER CASE = common writing 
    - leonardo
    - due
    - zero

https://github.com/RobTillaart/MCP23017_RT/runs/1636467517 failed

Wildcard architecture in library.properties, using configured platforms... 
    UNO
    leonardo
    due
    zero
...Wildcard architecture in library.properties, using configured platforms      
Board package arduino:sam has a defined URL...                                 ✓
Installing board package arduino:sam...                                        ✓
Board package arduino:samd has a defined URL...                                ✓
Installing board package arduino:samd...                                       ✓
Board package arduino:avr has a defined URL...                                 ✓
Installing board package arduino:avr...                                        ✓
bundler: failed to load command: /action/bundle/ruby/2.6.0/bin/arduino_ci.rb (/action/bundle/ruby/2.6.0/bin/arduino_ci.rb)
NoMethodError: undefined method `[]' for nil:NilClass
  /action/bundle/ruby/2.6.0/bundler/gems/arduino_ci-d8a0a0bbd430/exe/arduino_ci.rb:462:in `block (2 levels) in perform_example_compilation_tests'
  /action/bundle/ruby/2.6.0/bundler/gems/arduino_ci-d8a0a0bbd430/exe/arduino_ci.rb:459:in `each'
  /action/bundle/ruby/2.6.0/bundler/gems/arduino_ci-d8a0a0bbd430/exe/arduino_ci.rb:459:in `block in perform_example_compilation_tests'
  /action/bundle/ruby/2.6.0/bundler/gems/arduino_ci-d8a0a0bbd430/exe/arduino_ci.rb:443:in `each'
  /action/bundle/ruby/2.6.0/bundler/gems/arduino_ci-d8a0a0bbd430/exe/arduino_ci.rb:443:in `perform_example_compilation_tests'
  /action/bundle/ruby/2.6.0/bundler/gems/arduino_ci-d8a0a0bbd430/exe/arduino_ci.rb:516:in `<top (required)>'
  /action/bundle/ruby/2.6.0/bin/arduino_ci.rb:23:in `load'
  /action/bundle/ruby/2.6.0/bin/arduino_ci.rb:23:in `<top (required)>'
RobTillaart added a commit to RobTillaart/MS5611 that referenced this issue Jan 2, 2021
* Add Arduino-CI
* no unit test yet - Arduino-CI/arduino_ci#261
@ianfixes
Copy link
Collaborator

ianfixes commented Jan 2, 2021

The main problem here is that YAML itself is not case sensitive. The platform names here refer to specific keys defined in the config default.yml.

It's an open question what the default should contain and how the platforms should be named -- one day I hope to be able to delegate all of this stuff to a backend.

@ianfixes
Copy link
Collaborator

ianfixes commented Jan 2, 2021

Just to explain this a bit better: to absolve myself of having to write definitions for every possible platform that someone might want to test, the config structure builds up package definitions, then adds platform definitions that refer to the packages. The unit testing and compilation testing config sections refer to those platform definitions.

Since the default.yml lives in the gem, there's (unfortunately) some distance between the platform definitions and the place where users will refer to them. So I had to pick a convention, and lowercase was it. Changing it now will have implications for all existing configurations currently in the wild.

I'm going to close this for now, if we reopen it then I'd prefer that it refer to a feature request in the arduino-cli backend or some other source that will contain (and maintain) an authoritative platform list.

@ianfixes ianfixes closed this as completed Jan 2, 2021
@RobTillaart
Copy link
Author

Thanks,
Please add one remark in the documentation about mandatory lower case
e.g. here - https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md#control-how-examples-are-compiled

@ianfixes
Copy link
Collaborator

ianfixes commented Jan 2, 2021

Absolutely

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 a pull request may close this issue.

2 participants