Skip to content

arduino-cli v1.0.x breaks arduino/compile-sketches action for Teensy boards #2658

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
3 tasks done
tfry-git opened this issue Jul 7, 2024 · 4 comments · Fixed by #2669
Closed
3 tasks done

arduino-cli v1.0.x breaks arduino/compile-sketches action for Teensy boards #2658

tfry-git opened this issue Jul 7, 2024 · 4 comments · Fixed by #2669
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@tfry-git
Copy link

tfry-git commented Jul 7, 2024

Describe the problem

Around early June, the arduino/compile-sketches-action (https://github.com/arduino/compile-sketches/) fails for the Teensy core (https://www.pjrc.com/teensy/package_teensy_index.json). The error message is:

The compilation itself seems to work, as before, but always ends with:

Opening Teensy Loader...
Unable find Teensy Loader. (p) Is the Teensy Loader application running?
quit

Both the above message, and the unsuccessful exit are new.

Testing the various components involved, this is neither due to updates in compile-sketches, nor it the core. However, downgrading arduino-cli to v0.35.3 fixes the issue.

It should be noted that an upload is absolutely not required at this point. We're essentially just running arduino-cli compile, here.

Further resources:

To reproduce

This probably needs to be run inside a github-action, where the Teensy loader is not available.

An example workflow shall contain:

steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Compile examples
        uses: arduino/compile-sketches@v1
        with:
          cli-version: 0.35.3  # may or may not be given, to toggle triggering the bug
          github-token: ${{ secrets.GITHUB_TOKEN }}
          fqbn: teensy:avr:teensy36
          platforms: |
              - name: teensy:avr
                source-url: https://www.pjrc.com/teensy/package_teensy_index.json
          sketch-paths: |
            - examples

Expected behavior

arduino-cli compile should compile, only, not attempt to contact the upload daemon.

Arduino CLI version

v1.0.x

Operating system

Linux

Operating system version

Ubuntu (via github actions docker)

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the nightly build
  • My report contains all necessary details
@tfry-git tfry-git added the type: imperfection Perceived defect in any part of project label Jul 7, 2024
@cmaglie cmaglie added this to the Arduino CLI v1.0.3 milestone Jul 12, 2024
@cmaglie cmaglie self-assigned this Jul 12, 2024
@per1234
Copy link
Contributor

per1234 commented Jul 12, 2024

Here is a more simplified demo workflow that reproduces the fault by using Arduino CLI directly rather than depending on the arduino/compile-sketches action:

on:
  push:

jobs:
  demo:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
        with:
          repository: arduino/arduino-cli

      - uses: actions/setup-go@v5
        with:
          go-version: 1.21

      - uses: arduino/setup-task@v2
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          version: 3.x

      - run: |
          task build

      - run: |
          ./arduino-cli core install --additional-urls https://www.pjrc.com/teensy/package_teensy_index.json teensy:avr
          ./arduino-cli sketch new "${{ runner.temp }}/Foo"

      - run: |
          ./arduino-cli compile --fqbn teensy:avr:teensy36 "${{ runner.temp }}/Foo"

@per1234 per1234 added the topic: code Related to content of the project itself label Jul 12, 2024
@cmaglie
Copy link
Member

cmaglie commented Jul 17, 2024

@tfry-git thanks for the bug report, and thanks @per1234 for the slimmed-down example.

After some testing, I found that while running under CI the latest CLI runs the Teensy loader, while the 0.35.x does not.
Instead in a desktop environment, the Teensy loader is always executed.

Investigating...

@cmaglie
Copy link
Member

cmaglie commented Jul 19, 2024

Fixed by #2669, it will be released on Arduino CLI 1.0.3.

@cmaglie cmaglie added the conclusion: resolved Issue was resolved label Jul 19, 2024
@cmaglie
Copy link
Member

cmaglie commented Jul 23, 2024

Arduino CLI 1.0.3 has been released, the gh action should run without issues now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
3 participants