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

Fix arduino_cron to actually build stuff #2837

Merged
merged 24 commits into from
Jun 27, 2024
Merged

Conversation

jepler
Copy link
Member

@jepler jepler commented Jun 21, 2024

Apparently since #2497, in which the extra 'checkout' line was lost, we have not actually been building the arduino artifacts during CI.

The line may have looked like a mistake or duplicate when the CI was revised, so I added a comment.

Please check the CI logs to see that there actually artifacts!

Apparently since adafruit#2497, in which the extra 'checkout' line was lost,
we have not actually been building the arduino artifacts during CI.

The line may have looked like a mistake or duplicate when the CI was
revised.
@jepler
Copy link
Member Author

jepler commented Jun 21, 2024

Unfortunately, due to having had ~13 months to bit rot, there are multiple examples/guide programs that do NOT build. Someone will need to go through case by case and fix them :-/

a couple examples:


Arduino_ADG728_Plotter.ino adafruit:nrf52:cplaynrf52840:softdevice=s140v6,debug=l0 built output
  Used platform  Version Path
  adafruit:nrf52 1.6.1   /home/runner/.arduino15/packages/adafruit/hardware/nrf52/1.6.1
  /home/runner/work/Adafruit_Learning_System_Guides/Adafruit_Learning_System_Guides/ADG72x_Examples/Arduino_ADG728_Plotter/Arduino_ADG728_Plotter.ino:5:10: fatal error: Adafruit_ADG72x.h: No such file or directory
      5 | #include <Adafruit_ADG72x.h>
        |          ^~~~~~~~~~~~~~~~~~~
  compilation terminated.
  Error during build: exit status 1
	Arduino_ADG729_Plotter.ino ❌

(my guess: new library needed but not installed?)

Pixel_Trinkey_FactoryTest.ino adafruit:nrf52:cplaynrf52840:softdevice=s140v6,debug=l0 built output
  Used library             Version Path
  Adafruit DotStar         1.2.5   /home/runner/Arduino/libraries/Adafruit_DotStar
  Adafruit BusIO           1.16.1  /home/runner/Arduino/libraries/Adafruit_BusIO
  SPI                      1.0     /home/runner/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/libraries/SPI
  Adafruit NeoPixel        1.12.2  /home/runner/Arduino/libraries/Adafruit_NeoPixel
  Adafruit TinyUSB Library 3.3.0   /home/runner/Arduino/libraries/Adafruit_TinyUSB_Library
  Wire                     1.0     /home/runner/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/libraries/Wire
  Used platform  Version Path
  adafruit:nrf52 1.6.1   /home/runner/.arduino15/packages/adafruit/hardware/nrf52/1.6.1
  /home/runner/work/Adafruit_Learning_System_Guides/Adafruit_Learning_System_Guides/Factory_Tests/Pixel_Trinkey_FactoryTest/Pixel_Trinkey_FactoryTest.ino:9:39: error: 'PIN_DATA' was not declared in this scope; did you mean 'HID_DATA'?
      9 | Adafruit_DotStar  dotstrip(NUMPIXELS, PIN_DATA, PIN_CLOCK, DOTSTAR_BRG);
        |                                       ^~~~~~~~
        |                                       HID_DATA
  /home/runner/work/Adafruit_Learning_System_Guides/Adafruit_Learning_System_Guides/Factory_Tests/Pixel_Trinkey_FactoryTest/Pixel_Trinkey_FactoryTest.ino:9:49: error: 'PIN_CLOCK' was not declared in this scope; did you mean 'NRF_CLOCK'?
      9 | Adafruit_DotStar  dotstrip(NUMPIXELS, PIN_DATA, PIN_CLOCK, DOTSTAR_BRG);
        |                                                 ^~~~~~~~~
        |                                                 NRF_CLOCK
  /home/runner/work/Adafruit_Learning_System_Guides/Adafruit_Learning_System_Guides/Factory_Tests/Pixel_Trinkey_FactoryTest/Pixel_Trinkey_FactoryTest.ino:10:39: error: 'PIN_DATA' was not declared in this scope; did you mean 'HID_DATA'?
     10 | Adafruit_NeoPixel neostrip(NUMPIXELS, PIN_DATA, NEO_GRB + NEO_KHZ800);
        |                                       ^~~~~~~~
        |                                       HID_DATA
  Multiple libraries were found for "Adafruit_TinyUSB.h"
    Used: /home/runner/Arduino/libraries/Adafruit_TinyUSB_Library
    Not used: /home/runner/.arduino15/packages/adafruit/hardware/nrf52/1.6.1/libraries/Adafruit_TinyUSB_Arduino
  Error during build: exit status 1

(my guess: example not applicable to this microcontroller, needs a ".only" file?)

These named platforms (ch552, trrstrinkey_m0, shttrinkey_m0,
pixeltrinkey_m0) may not be correct and they need to be listed in
ci-arduino all_platforms.py and arduino_cron.yml to work. The main goal
is to get OTHER microcontroller builds to skip these examples.
@jepler
Copy link
Member Author

jepler commented Jun 21, 2024

OK, naming a doesn't-exist-yet platform doesn't work: "This example does not have a valid .platform.test.only file"

as long as ch552 is not a ci-arduino recognized board, it has to be a
"none.test.only" file. Rename these once the related issue is closed
in ci-arduino.
@BlitzCityDIY
Copy link
Collaborator

getting a weird error for the trrs trinkey:

  Used platform Version Path
  adafruit:samd 1.7.16  /home/runner/.arduino15/packages/adafruit/hardware/samd/1.7.16
  In file included from /home/runner/.arduino15/packages/adafruit/hardware/samd/1.7.16/cores/arduino/Arduino.h:80,
                   from /tmp/arduino/sketches/EC4347B5FB030BEAB16CB91172B92EB1/sketch/arduino_rainbow_neorgb.ino.cpp:1:
  /home/runner/.arduino15/packages/adafruit/hardware/samd/1.7.16/cores/arduino/delay.h:24:10: fatal error: variant.h: No such file or directory
     24 | #include "variant.h"
        |          ^~~~~~~~~~~
  compilation terminated.

otherwise it seems all of the other builds are passing. will look more into it tomorrow

@jepler
Copy link
Member Author

jepler commented Jun 25, 2024

I think a missing "variant.h" file means something about the board support is incomplete in arduino. normally there's a file called variant.h for each board

/home/jepler/.arduino15/packages/adafruit/hardware/samd/1.7.13/variants/trellis_m4/variant.h
/home/jepler/.arduino15/packages/adafruit/hardware/samd/1.7.13/variants/trinket_m0/variant.h
/home/jepler/.arduino15/packages/adafruit/hardware/samd/1.7.13/variants/zero_radio/variant.h

@BlitzCityDIY
Copy link
Collaborator

yes but what's strange is trrs does have a variant file: https://github.com/adafruit/ArduinoCore-samd/blob/master/variants/trrstrinkey_m0/variant.h

@jepler
Copy link
Member Author

jepler commented Jun 25, 2024

https://github.com/adafruit/ArduinoCore-samd/blob/9bb5b21093882f2f775c931d9650e5a2a2482f7f/boards.txt#L914

some places it's capitalized as TRRStrinkey

that might be OK on Windows, but Linux is always case sensitive about files.

Like, if Linux is told to include a folder called TRRStrinkey for headers during the build process, but what actually exists is trrstrinkey, it just won't work.

This problem would likely go unnoticed by windows & mac developers.

@BlitzCityDIY
Copy link
Collaborator

should there be a PR to the bsp to have everything match case then?

@jepler
Copy link
Member Author

jepler commented Jun 25, 2024

I think so. I did verify I get the same error locally on Linux when compiling a blink sketch for TRRStrinkey.

@jepler
Copy link
Member Author

jepler commented Jun 25, 2024

the uppercase version is also called out in ci-arduino so there may be 3 places to change

@BlitzCityDIY
Copy link
Collaborator

okay excellent, i can do the PR and see where we end up 🙂

@jepler
Copy link
Member Author

jepler commented Jun 25, 2024

tag me on it if you don't have linux for testing

@TheKitty
Copy link
Collaborator

image

i reverted the changes we did to the arduino core because it did not solve the issues here and was throwing errors on compiling. i'm thinking that since this is a larger issue and currently there are only two TRRS Trinkey Arduino scripts (basic demo and factory test) that for now we remove it from CI to resolve this PR and continue investigating after a merge so that the CI can be back in action
@BlitzCityDIY
Copy link
Collaborator

i reverted the changes we did to the arduino core because it did not solve the issues here and was throwing errors on compiling on my machine. i'm thinking that since this is a larger issue and currently there are only two TRRS Trinkey Arduino scripts (basic demo and factory test) that for now we remove it from CI to resolve this PR and continue investigating after a merge so that the CI can be back in action

@jepler jepler merged commit c1e1c6c into adafruit:main Jun 27, 2024
47 checks passed
@jepler
Copy link
Member Author

jepler commented Jun 27, 2024

thanks Liz!

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.

3 participants