Skip to content

Fix ci build with esp32s2 boards #106

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

Merged
merged 2 commits into from
Sep 29, 2021
Merged

Fix ci build with esp32s2 boards #106

merged 2 commits into from
Sep 29, 2021

Conversation

hathach
Copy link
Member

@hathach hathach commented Sep 29, 2021

SWITCHING TO esp32:esp32:adafruit_metro_esp32s2
Installing esp32:esp32 ✓
esp32:esp32 2.0.0     2.0.0  esp32
  • change the input compile input to folderpath i.e example directory instead of path to .ino file. Since it is the preferred input of arduino-cli
$ 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 ?

use folder path i.e example dir instead of path to .ino file
@hathach hathach requested a review from ladyada September 29, 2021 12:40
@ladyada ladyada merged commit 5172372 into master Sep 29, 2021
@ladyada ladyada deleted the fix-esp32s2-build branch September 29, 2021 13:58
@brentru
Copy link
Member

brentru commented Oct 1, 2021

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

@ladyada
Copy link
Member

ladyada commented Oct 1, 2021

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

@ladyada
Copy link
Member

ladyada commented Oct 1, 2021

	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
Copy link
Member

ladyada commented Oct 1, 2021

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

@hathach
Copy link
Member Author

hathach commented Oct 1, 2021

@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
Copy link
Member

ladyada commented Oct 1, 2021

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

@brentru
Copy link
Member

brentru commented Oct 1, 2021

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

@hathach
Copy link
Member Author

hathach commented Oct 1, 2021

@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
Copy link
Member

brentru commented Oct 1, 2021

@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
Copy link
Member Author

hathach commented Oct 1, 2021

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

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