adafruit / ci-arduino

A script that will install all of the common dependencies for testing Arduino library builds using Github Actions
MIT License
115 stars 73 forks source link

Fix ci build with esp32s2 boards #106

Closed hathach closed 3 years ago

hathach commented 3 years ago
SWITCHING TO esp32:esp32:adafruit_metro_esp32s2
Installing esp32:esp32 ✓
esp32:esp32 2.0.0     2.0.0  esp32
$ arduino-cli compile --help
Compiles Arduino sketches.

Usage:
  arduino-cli compile [flags]

Examples:
  arduino-cli compile -b arduino:avr:uno /home/user/Arduino/MySketch
  arduino-cli compile -b arduino:avr:uno --build-property "build.extra_flags=\"-DMY_DEFINE=\"hello world\"\"" /home/user/Arduino/MySketch
  arduino-cli compile -b arduino:avr:uno --build-property "build.extra_flags=-DPIN=2 \"-DMY_DEFINE=\"hello world\"\"" /home/user/Arduino/MySketch
  arduino-cli compile -b arduino:avr:uno --build-property build.extra_flags=-DPIN=2 --build-property "compiler.cpp.extra_flags=\"-DSSID=\"hello world\"\"" /home/user/Arduino/MySketch

@ladyada def test_examples_in_learningrepo(folderpath): isn't got updated, since it seems not to be used anymore. Should we remove it ?

brentru commented 3 years ago

@hathach Enabling shell=True when running a workflow that exports a UF2 seems to cause arduino-cli compileto produce a false positive where it "passes" a build, but produces no build artifacts.

ladyada commented 3 years ago

@brentru im workin on this right now - i was getting false positives!

ladyada commented 3 years ago
    colorview.ino ['arduino-cli', 'compile', '--warnings', 'all', '--fqbn', 'arduino:avr:uno', '/home/runner/work/Adafruit_TCS34725/Adafruit_TCS34725/examples/colorview']
0
Arduino Command Line Interface (arduino-cli).

Usage:
-cli [command]

Examples:
  arduino-cli <command> [flags...]

Available Commands:
  board           Arduino board commands.
  burn-bootloader Upload the bootloader.
  cache           Arduino cache commands.
  compile         Compiles Arduino sketches.
  completion      Generates completion scripts
  config          Arduino configuration commands.
  core            Arduino core operations.
  daemon          Run as a daemon on port 50051
  debug           Debug Arduino sketches.
  help            Help about any command
  lib             Arduino commands about libraries.
  outdated        Lists cores and libraries that can be upgraded
  sketch          Arduino CLI sketch commands.
  update          Updates the index of cores and libraries
  upgrade         Upgrades installed cores and libraries.
  upload          Upload Arduino sketches.
  version         Shows version number of Arduino CLI.

Flags:
      --additional-urls strings   Comma-separated list of additional URLs for the Boards Manager.
      --config-file string        The custom config file (if not specified the default will be used).
      --format string             The output format, can be {text|json}. (default "text")
  -h, --help                      help for arduino-cli
      --log-file string           Path to the file where logs will be written.
      --log-format string         The output format for the logs, can be {text|json}.
      --log-level string          Messages with this level and above will be logged. Valid levels are: trace, debug, info, warn, error, fatal, panic
  -v, --verbose                   Print the logs on the standard output.

ino-cli [command] --help" for more information about a command.
ladyada commented 3 years ago

@brentru ok try now, took me a few tries to figure it out

hathach commented 3 years ago

@brentru @ladyada seem like shell=True mess up with the command input and I am fooled to think false positive getting the esp32s2 passed. Sorry for the issue, was so desperate trying to get esp32s2 to build. I will other way to get esp32s2 build later on. Thanks Limor for fixing it.

ladyada commented 3 years ago

haha its ok - you can uncomment the print-outs when you work on it next, i think it can be made to work

brentru commented 3 years ago

@hathach Were S2 builds just taking a long time, or never completing?

hathach commented 3 years ago

@hathach Were S2 builds just taking a long time, or never completing?

It never complete before, now it got time out (60 seconds), I tried with 600 seconds, still time out. So I guess it won't ever complete. Will do more in-depth test later on.

brentru commented 3 years ago

@hathach Ok - I had the same behavior. The script does compile and generate a Uf2 for s2 with arduino-cli when invoked from my computer, not sure why it's running indefinitely on the CI. Ping me when you've tested it in-depth and I'll see if it passes with WipperSnapper.

https://github.com/adafruit/Adafruit_Wippersnapper_Arduino/runs/3769470738?check_suite_focus=true#step:8:38

hathach commented 3 years ago

@brentru sure, I will tag you to the PR, if I could mange to fix it :)