Giter Site home page Giter Site logo

arduino / compile-sketches Goto Github PK

View Code? Open in Web Editor NEW
63.0 10.0 13.0 1.36 MB

GitHub Actions action that checks whether Arduino sketches compile and produces a report of data from the compilations

License: GNU General Public License v3.0

Python 100.00%
arduino continuous-integration ci github-actions tooling-team

compile-sketches's Introduction

arduino/compile-sketches action

Check Action Metadata status Check Files status Check General Formatting status Check License status Check Markdown status Check npm status Check Poetry status Check Prettier Formatting status Check Python status Check Taskfiles status Check ToC status Check Workflows status Check YAML status Spell Check status Sync Labels status Test Python status codecov

This action checks whether Arduino sketches compile and produces a report of data from the compilations.

Table of contents

Inputs

cli-version

The version of Arduino CLI to use.

Default: "latest"

fqbn

The fully qualified board name to use when compiling.

Default: "arduino:avr:uno"

If the board is from one of the platforms provided by Arduino's default package index, the board's platform dependency will be automatically detected and the latest version installed. For boards of platforms not in the default package index, previous versions, or other platform sources, the platform dependency must be defined via the platforms input.

platforms

YAML-format list of platform dependencies to install.

Default: The board's dependency will be automatically determined from the fqbn input and the latest version of that platform will be installed via Boards Manager.

If a platform dependency from a non-Boards Manager source of the same name as another Boards Manager source platform dependency is defined, they will both be installed, with the non-Boards Manager dependency overwriting the Boards Manager platform installation. This permits testing against a non-release version of a platform while using Boards Manager to install the platform's tools dependencies. Example:

platforms: |
  # Install the latest release of Arduino SAMD Boards and its toolchain via Boards Manager
  - name: "arduino:samd"
  # Install the platform from the root of the repository, replacing the BM installed platform
  - source-path: "."
    name: "arduino:samd"

Supported platform sources:

Boards Manager

Keys:

  • name - (required) platform name in the form of VENDOR:ARCHITECTURE (e.g., arduino:avr).
  • version - version of the platform to install.
    • Default: the latest version.
  • source-url - Boards Manager URL of the platform.
    • Default: Arduino's package index, which allows installation of all official platforms.
Local path

Keys:

  • source-path - (required) path to install as a platform. Relative paths are assumed to be relative to the root of the repository.
  • name - (required) platform name in the form of VENDOR:ARCHITECTURE (e.g., arduino:avr).
Repository

Keys:

  • source-url - (required) URL to clone the repository from. It must start with git:// or end with .git.
  • name - (required) platform name in the form of VENDOR:ARCHITECTURE (e.g., arduino:avr).
  • version - Git ref of the repository to checkout. The special version name latest will cause the latest tag to be used.
    • Default: the repository is checked out to the tip of the default branch.
  • source-path - path to install as a platform. Paths are relative to the root of the repository.
    • Default: root of the repository.
Archive download

Keys:

  • source-url - (required) download URL for the archive (e.g., https://github.com/arduino/ArduinoCore-avr/archive/master.zip).
  • name - (required) platform name in the form of VENDOR:ARCHITECTURE (e.g., arduino:avr).
  • source-path - path to install as a platform. Paths are relative to the root folder of the archive, or the root of the archive if it has no root folder.
    • Default: root folder of the archive.

libraries

YAML-format list of library dependencies to install.

Default: "- source-path: ./" This causes the repository to be installed as a library. If there are no library dependencies and you want to override the default, set the libraries input to an empty list (- libraries: '[]').

Libraries are installed under the Arduino user folder at ~/Arduino/libraries.

Note: when the deprecated space-separated list format of this input is used, the repository under test will always be installed as a library.

Supported library sources:

Library Manager

Keys:

  • name - (required) name of the library, as defined in the name field of its library.properties metadata file.
  • version - version of the library to install.
    • Default: the latest version.

Notes:

  • The library will be installed to a folder matching its name, but with any spaces replaced by _.
  • If the library's author defined dependencies, those libraries will be installed automatically.
Local path

Keys:

  • source-path - (required) path to install as a library. Relative paths are assumed to be relative to the root of the repository.
  • destination-name - folder name to install the library to.
    • Default: the folder will be named according to the source repository or subfolder name.
Repository

Keys:

  • source-url - (required) URL to clone the repository from. It must start with git:// or end with .git.
  • version - Git ref of the repository to checkout. The special version name latest will cause the latest tag to be used.
    • Default: the tip of the default branch.
  • source-path - path to install as a library. Paths are relative to the root of the repository.
    • Default: root of the repository.
  • destination-name - folder name to install the library to.
    • Default: named according to the source repository or subfolder name.
Archive download

Keys:

  • source-url - (required) download URL for the archive (e.g., https://github.com/arduino-libraries/Servo/archive/master.zip).
  • source-path - path to install as a library. Paths are relative to the root folder of the archive, or the root of the archive if it has no root folder.
    • Default: root folder of the archive.
  • destination-name - folder name to install the library to.
    • Default: named according to the source archive or subfolder name.

sketch-paths

YAML-format list of paths containing sketches to compile. These paths will be searched recursively.

Default: "- examples"

cli-compile-flags

YAML-format list of flags to add to the Arduino CLI command used to compile the sketches. For the available flags, see the Arduino CLI command reference.

Default: ""

verbose

Set to true to show verbose output in the log.

Default: false

sketches-report-path

Path in which to save a JSON formatted file containing data from the sketch compilations. Should be used only to store reports. Relative paths are relative to GITHUB_WORKSPACE. The folder will be created if it doesn't already exist.

This report is used by the arduino/report-size-deltas action.

Default: "sketches-reports"

github-token

GitHub access token used to get information from the GitHub API. Only needed for private repositories with enable-deltas-report set to true. It will be convenient to use ${{ secrets.GITHUB_TOKEN }}.

Default: ""

enable-deltas-report

Set to true to cause the action to determine the change in memory usage and compiler warnings of the compiled sketches.

If the workflow is triggered by a pull_request event, the comparison is between the pull request branch and the tip of the pull request's base branch.

If the workflow is triggered by a push event, the comparison is between the pushed commit and its immediate parent.

The deltas will be displayed in the GitHub Actions build log.

This report may be used with the arduino/report-size-deltas action.

Default: false

How it works

The sketch is first compiled with the repository in $GITHUB_WORKSPACE at the state it was at before the action's step. Data from the compilation is recorded in the sketches report. Next, a [git checkout] to the Git ref used as the base of the comparison is done and the compilation + data recording process repeated. The delta is the change in the data between the two compilations.

Dependencies defined via the libraries or platforms inputs are installed via symlinks, meaning dependencies from local paths under $GITHUB_WORKSPACE reflect the deltas checkouts even though they are installed outside $GITHUB_WORKSPACE.

enable-warnings-report

Set to true to cause the action to record the compiler warning count for each sketch compilation in the sketches report.

Default: false

Example usage

- uses: arduino/compile-sketches@v1
  with:
    fqbn: "arduino:avr:uno"
    libraries: |
      - name: Servo
      - name: Stepper
        version: 1.1.3

Additional resources

compile-sketches's People

Contributors

2bndy5 avatar aentinger avatar dependabot[bot] avatar giulcioffi avatar per1234 avatar rotzbua avatar sandeepmistry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

compile-sketches's Issues

Rate limiting failures have started appearing frequently in the past few weeks

Describe the problem

It appears that github is being more aggressive about rate limiting, just happened in the past few weeks, but now to get a run to pass, I often have to rerun failed jobs several times for my cores.
The error output ends with this, which implies that there is a way to make an authenticated request. I see nothing in the documentation of compile-sketches that suggests that this is supported. It should be, because github seems to be trying to force people to authenticate actions (For quite a while I've occasionally had installation failures for the same reason, but those were few and far between and livewithable. It is no longer liverwithable. Every single attempt at running compile examples results in failures of this form, and it camoflages actual problems with the core.

The error ends in:
github.GithubException.RateLimitExceededException: 403 {"message": "API rate limit exceeded for 52.179.102.209. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)", "documentation_url": "https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"}
Error: Process completed with exit code 1.

To reproduce

See the is example of a run that failed like this.

Expected behavior

I would like the rate limit to not be reached. Either throttle the routines, or provide a mechanism and document it to use the "authenticated requests" that the error message mentions

'arduino/compile-sketches' version

arduino/compile-sketches@main

Additional context

it seems that they're moving in the direction of severely curtailing anyone who doesn't authenticate, (i imagine because they're seeing abuse), but with little fluency in yaml (i'm much better at AVR assembly than this newfangled stuff - my brain only has a 16-bit address space; that's why I never liked the ATmega2560) and with difficulty understanding how the hell the whole scheme is supposed to work I was unsuccessful at getting another much simpler CI script that wanted a token (I don't know if that's the same thing) what it wanted.

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details

Ability to exclude specific examples in a matrix build

Describe the request

Almost all of the (many) examples in my library are meant to work on all supported boards. However, there are a few exceptions that are specific to a certain platform.

I am aware that I can define a "positive" matrix to the effect of "sketches A and B should be compiled for all platforms, but sketch C should only be compiled for AVR". However, this approach is a) pretty verbose, where dozens of examples are involved, and b) just waiting to get outdated as new examples are added/removed.

What I would like to be able to do, therefore, is to exclude certain sketches from a path, i.e. "all sketches should be compiled for all platforms, except sketch C should be excluded on RP2040". I'm thinking of perhaps a "exclude-sketch-paths" to be applied after "sketch-paths".

Describe the current behavior

sketch-paths input allows to define a (recursive) positive whitelist of examples to compile, but there does not seem to be an exclude-sketch-paths counterpart.

'arduino/compile-sketches' version

v1.1.0

Additional context

No response

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest version
  • My request contains all necessary details

Ability to prep build environment without building

Describe the request

For my use case I need to be able to modify files in an installed library before the build takes place.

For example, tft_eSPI is a popular library for different displays, but it requires the user to update a User_Setup.h file inside the library. From the library Readme:

The screen controller, interface pins and library configuration settings must be defined inside the library. They can NOT be defined in the Arduino sketch.

In order to use the library I would need to:

  • install the library
  • copy a custom User_Setup.h into the library
  • compile the code

Unless I'm missing something (And I could be, i'm pretty new to Arduino CLI and Github actions), I don't think that's possible with the current setup?

Describe the current behavior

I don't see how to achieve this with current options/flags

'arduino/compile-sketches' version

latest

Additional context

Thanks so much for the work on this, I've already started to use for some of my libraries to test examples!

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest version
  • My request contains all necessary details

Import relevant commit history from experimental repository

The initial development work on the action was done in a repository used to host actions while they are in their unstable, experimental stage of development. The valuable commit history should be imported into the dedicated repository for the action.


All commits relevant to this action were filtered from the full history of that repository using the excellent newren/git-filter-repo:

git clone https://github.com/newren/git-filter-repo
cd git-filter-repo
# checkout latest tag
git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
export PATH="$PATH:$PWD"
cd ..
git clone https://github.com/arduino/actions
cd actions
git filter-repo --path LICENSE \
                --path .github/workflows/libraries_compile-examples.yml \
                --path .github/workflows/spell-check.yml \
                --path etc/codespell-ignore-words-list.txt \
                --path libraries/compile-examples --path-rename libraries/compile-examples/: \
                --message-callback 'return message.split(b"libraries/compile-examples:", maxsplit=1)[1].strip()[:1].upper() + message.split(b"libraries/compile-examples:", maxsplit=1)[1].strip()[1:] if message.startswith(b"libraries/compile-examples:") else message.strip()'

Since it's not possible to add this commit history to the repository via a pull request, I have pushed it to a development branch.
https://github.com/arduino/compile-sketches/tree/per1234/development-initial-import

This development branch should be reviewed. Once it is approved, I'll push it to the primary main branch.


I have also submitted a PR to update the CI workflows. You can see from the CI runs on that PR that all checks are still passing after the import:
https://github.com/arduino/compile-sketches/pull/1/checks

Note: the initial run of the Spell Check workflow on the per1234/development-initial-import branch is expected to fail because that run was from the unchanged imported workflow that is still configured for the experimental repository.


Note: this is only an initial import. The outdated parts of the documentation will be updated in a PR soon to come after the import is approved.

compile-sketches reporting 403 when trying to download arduino-cli

Describe the problem

When trying to run the compile-sketches action, all actions fail and the traceback indicates that this is due to a 403 when attempting to access the URL for the Arduino CLI.

Traceback (most recent call last):
  File "/home/runner/work/_actions/arduino/compile-sketches/main/compilesketches/compilesketches.py", line 1717, in <module>
    main()  # pragma: no cover
    ^^^^^^
  File "/home/runner/work/_actions/arduino/compile-sketches/main/compilesketches/compilesketches.py", line 63, in main
    compile_sketches.compile_sketches()
  File "/home/runner/work/_actions/arduino/compile-sketches/main/compilesketches/compilesketches.py", line 216, in compile_sketches
    self.install_arduino_cli()
  File "/home/runner/work/_actions/arduino/compile-sketches/main/compilesketches/compilesketches.py", line 253, in install_arduino_cli
    self.install_from_download(
  File "/home/runner/work/_actions/arduino/compile-sketches/main/compilesketches/compilesketches.py", line 290, in install_from_download
    with contextlib.closing(thing=urllib.request.urlopen(url=url)) as file_pointer:
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/urllib/request.py", line 525, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/urllib/request.py", line 634, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/urllib/request.py", line 563, in error
    return self._call_chain(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/urllib/request.py", line 496, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/urllib/request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

To reproduce

Attempt to run the compile-sketches action.

Expected behavior

Sketches compile.

'arduino/compile-sketches' version

Same error both with v1 and main

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details

cli-compile-flags

Describe the problem

It passes 3 args instead of 1

To reproduce

Use my workflow here:
https://github.com/tkbstudios/tinet-bridge-esp8266/blob/fbe894329d2dda1708ccbb220f5946b48cc9888f/.github/workflows/build-and-release.yaml

Expected behavior

Build it and save the .bin file in the sketch folder

'arduino/compile-sketches' version

1.1.0

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details

Sketches with `#include Math.h` do not compile via GH Action (but do locally)

Describe the problem

If a sketch has #include "Math.h", the arduino/compile-sketches GitHub Action will return fatal error: Math.h: No such file or directory. However, the same sketch compiles and executes locally as expected.

  /home/runner/work/nicla-sense-me-fw/nicla-sense-me-fw/Arduino_BHY2/examples/Magnetometer/Magnetometer.ino:17:10: fatal error: Math.h: No such file or directory
   #include "Math.h"
            ^~~~~~~~
  compilation terminated.
  
  Used library Version Path
  Arduino_BHY2 1.0.6   /home/runner/work/nicla-sense-me-fw/nicla-sense-me-fw/Arduino_BHY2
  ArduinoBLE   1.3.6   /home/runner/Arduino/libraries/ArduinoBLE
  
  Used platform      Version Path
  arduino:mbed_nicla 4.1.3   /home/runner/.arduino15/packages/arduino/hardware/mbed_nicla/4.1.3
  Error during build: exit status 1

To reproduce

  1. Compile the sketch below for the Nicla Sense ME locally. It should compile, and magnetometer data is received over the Serial connection
/*
 * This example shows how to use the access the magnetometer data and send it over serial.
 * 
 * Every 1 second, this sketch will send the heading of the magnetometer over serial.
 * by calculating the arctangent between the x and y axis and multiplied in a conversion
 * factor to convert the headings from radians to degrees.
 * 
 * Instructions:
 * 1. Upload this sketch to your Nicla Sense ME board.
 * 2. Open the Serial Monitor at a baud rate of 115200.
 * 3. The heading of the magnetometer will be printed to the serial monitor.
 * 
 * Initial author: @mcmchris
 */

#include "Arduino_BHY2.h"
#include "Math.h"

SensorXYZ magnetometer(SENSOR_ID_MAG);

float heading = 0;
unsigned long previousMillis = 0;  // will store last time the sensor was updated
const long interval = 1000;

void setup() {
  Serial.begin(115200);
  BHY2.begin();
  magnetometer.begin();
}

void loop() {
  BHY2.update();
  unsigned long currentMillis = millis();
  if (currentMillis - previousMillis >= interval) {
    previousMillis = currentMillis;
    heading = round(atan2(magnetometer.x(), magnetometer.y()) * 180.0 / PI);
    Serial.println(String(heading) + "º");
  }
}
  1. Run this GitHub Workflow, which includes this section
      - name: Compile examples
        uses: arduino/compile-sketches@v1
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          fqbn: ${{ matrix.board.fqbn }}
          platforms: ${{ matrix.board.platforms }}
          libraries: |
            # Board-specific libraries
            ${{ matrix.bhy2-libraries }}
            ${{ matrix.bhy2host-libraries }}
            ${{ matrix.board.libraries }}
            ${{ matrix.arduinoiotcloud-libraries }}
            ${{ matrix.blebridge-libraries }}
          sketch-paths: |
            ${{ matrix.bhy2-sketch-paths }}
            ${{ matrix.bhy2host-sketch-paths }}
            ${{ matrix.arduinoiotcloud-sketch-paths }}
            ${{ matrix.blebridge-sketch-paths }}
          enable-deltas-report: true
          sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
  1. The error regarding Math.h is displayed here

Expected behavior

If a sketch is able to compile locally and Math.h is found, then I also expect the CLI to do the same and not give an error.

'arduino/compile-sketches' version

    uses: arduino/compile-sketches@v1

Additional context

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details

Allow FQBN to be defined in build profile alone

Describe the request

For a given sketch.yml build profile, when the fqbn: is specified inside it, then this should be accounted for by the compile-sketches.

This is one example of a sketch.yml file, in which the fqbn is specified.

profiles:
  envie_m7:
    notes: Portenta H7 family & Portenta Machine Control
    fqbn: arduino:mbed_portenta:envie_m7
    platforms:
      - platform: arduino:mbed_portenta (4.1.1)
    libraries:
      - Arduino_USBHostMbed5 (0.3.1)
      - Arduino_POSIXStorage (1.2.0)
      - Arduino_UnifiedStorage (1.1.0)
      - ArduinoRS485 (1.0.5)

Describe the current behavior

Currently, the compile-sketches workflow disregards the specified fqbn: inside the sketch.yml file. For this step:

- name: Compile examples
  uses: arduino/compile-sketches@v1
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    enable-deltas-report: true
    sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
    cli-compile-flags: |
      - --profile=${{ matrix.board.name }}

We get a build error, inline with the default values of the fqbn entry

  Error during build: Platform 'arduino:avr' not found: platform not installed

See here for a full log.


An interim solution (proposed by @per1234 ) is to manually specify the fqbn like this.

- name: Compile examples
        uses: arduino/compile-sketches@v1
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          enable-deltas-report: true
          sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
          cli-compile-flags: |
            - --profile=${{ matrix.board.name }}
          fqbn: ${{ matrix.board.fqbn }}

While this does result in a correct build (see here), it does not abide to the DRY principles. Additionally, this makes it difficult to link the build profile to the workflow (which is the reason for using the sketch.yml) in the first place.

'arduino/compile-sketches' version

latest

Additional context

When running arduino-cli compile --profile envie_m7 locally, the fqbn is automatically selected from inside the sketch.yml file as expected.

Verbose output

PS C:\Users\Ali Jahangiri\Documents\GitHub\Arduino_UnifiedStorage\examples\AdvancedUSBInternalOperations> arduino-cli compile --profile envie_m7 --verbose

FQBN: arduino:mbed_portenta:envie_m7
Using board 'envie_m7' from platform in folder: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e
Using core 'arduino' from platform in folder: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e

Detecting libraries used...
C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_arm-none-eabi-gcc_7-2017q4_7b7be9f526b2cb64/bin/arm-none-eabi-g++ -c -w -g3 -nostdlib @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/defines.txt @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/cxxflags.txt -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_PORTENTA_H7_M7 -DARDUINO_ARCH_MBED_PORTENTA -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7 -DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino/api/deprecated -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino/api/deprecated-avr-comp -iprefixC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/../PORTENTA_H7_M7/includes.txt C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\sketch\AdvancedUSBInternalOperations.ino.cpp -o nul
Alternatives for Arduino_UnifiedStorage.h: [[email protected]]
ResolveLibrary(Arduino_UnifiedStorage.h)
  -> candidates: [[email protected]]
C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_arm-none-eabi-gcc_7-2017q4_7b7be9f526b2cb64/bin/arm-none-eabi-g++ -c -w -g3 -nostdlib @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/defines.txt @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/cxxflags.txt -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_PORTENTA_H7_M7 -DARDUINO_ARCH_MBED_PORTENTA -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage\src -DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino/api/deprecated -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino/api/deprecated-avr-comp -iprefixC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/../PORTENTA_H7_M7/includes.txt C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\sketch\AdvancedUSBInternalOperations.ino.cpp -o nul
Alternatives for Arduino_POSIXStorage.h: [[email protected]]
ResolveLibrary(Arduino_POSIXStorage.h)
  -> candidates: [[email protected]]
C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_arm-none-eabi-gcc_7-2017q4_7b7be9f526b2cb64/bin/arm-none-eabi-g++ -c -w -g3 -nostdlib @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/defines.txt @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/cxxflags.txt -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_PORTENTA_H7_M7 -DARDUINO_ARCH_MBED_PORTENTA -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage\src -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_POSIXStorage_1.2.0_e7053177655041b1\Arduino_POSIXStorage\src -DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino/api/deprecated -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino/api/deprecated-avr-comp -iprefixC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/../PORTENTA_H7_M7/includes.txt C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\sketch\AdvancedUSBInternalOperations.ino.cpp -o nul
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage\src\Arduino_UnifiedStorage.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage\src\Folder.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage\src\InternalStorage.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage\src\Partitioning.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage\src\SDStorage.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage\src\UFile.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage\src\USBStorage.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_POSIXStorage_1.2.0_e7053177655041b1\Arduino_POSIXStorage\src\Arduino_POSIXStorage.cpp
Alternatives for Arduino_USBHostMbed5.h: [[email protected]]
ResolveLibrary(Arduino_USBHostMbed5.h)
  -> candidates: [[email protected]]
Alternatives for SDMMCBlockDevice.h: [[email protected]]
ResolveLibrary(SDMMCBlockDevice.h)
  -> candidates: [[email protected]]
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHost\USBDeviceConnected.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHost\USBEndpoint.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHost\USBHost.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHost3GModule\WANDongle.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHost3GModule\WANDongleSerialPort.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHostHID\USBHostKeyboard.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHostHID\USBHostMouse.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHostHub\USBHostHub.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHostMIDI\USBHostMIDI.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHostMSD\USBHostMSD.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\USBHostSerial\USBHostSerial.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\targets\TARGET_STM\USBEndpoint_STM.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src\targets\TARGET_STM\USBHALHost_STM.cpp
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\libraries\Portenta_SDCARD\src\BSP.c
Using cached library dependencies for file: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\libraries\Portenta_SDCARD\src\SDMMCBlockDevice.cpp
Generating function prototypes...
C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_arm-none-eabi-gcc_7-2017q4_7b7be9f526b2cb64/bin/arm-none-eabi-g++ -c -w -g3 -nostdlib @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/defines.txt @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/cxxflags.txt -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_PORTENTA_H7_M7 -DARDUINO_ARCH_MBED_PORTENTA -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage\src -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_POSIXStorage_1.2.0_e7053177655041b1\Arduino_POSIXStorage\src -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5\src -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\libraries\Portenta_SDCARD\src -DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino/api/deprecated -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino/api/deprecated-avr-comp -iprefixC:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\cores\arduino @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\variants\PORTENTA_H7_M7/../PORTENTA_H7_M7/includes.txt C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\sketch\AdvancedUSBInternalOperations.ino.cpp -o C:\Users\Ali Jahangiri\AppData\Local\Temp\4173928976\sketch_merged.cpp
C:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\Ali Jahangiri\AppData\Local\Temp\4173928976\sketch_merged.cpp
Compiling sketch...
"C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_arm-none-eabi-gcc_7-2017q4_7b7be9f526b2cb64/bin/arm-none-eabi-g++" -c -w -g3 -nostdlib "@C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\variants\\PORTENTA_H7_M7/defines.txt" "@C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\variants\\PORTENTA_H7_M7/cxxflags.txt" -MMD -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -DARDUINO=10607 -DARDUINO_PORTENTA_H7_M7 -DARDUINO_ARCH_MBED_PORTENTA -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=0 "-IC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\cores\\arduino" "-IC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\variants\\PORTENTA_H7_M7" "-IC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\\Arduino_UnifiedStorage\\src" "-IC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\Arduino_POSIXStorage_1.2.0_e7053177655041b1\\Arduino_POSIXStorage\\src" "-IC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\\Arduino_USBHostMbed5\\src" "-IC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\libraries\\Portenta_SDCARD\\src" -DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 "-IC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\cores\\arduino/api/deprecated" "-IC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\cores\\arduino/api/deprecated-avr-comp" "-iprefixC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\cores\\arduino" "@C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\variants\\PORTENTA_H7_M7/../PORTENTA_H7_M7/includes.txt" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\sketch\\AdvancedUSBInternalOperations.ino.cpp" -o "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\sketch\\AdvancedUSBInternalOperations.ino.cpp.o"
Compiling libraries...
Compiling library "Arduino_UnifiedStorage"
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_UnifiedStorage\Arduino_UnifiedStorage.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_UnifiedStorage\Folder.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_UnifiedStorage\UFile.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_UnifiedStorage\InternalStorage.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_UnifiedStorage\USBStorage.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_UnifiedStorage\SDStorage.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_UnifiedStorage\Partitioning.cpp.o
Compiling library "Arduino_POSIXStorage"
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_POSIXStorage\Arduino_POSIXStorage.cpp.o
Compiling library "Arduino_USBHostMbed5"
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHost\USBDeviceConnected.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHost\USBEndpoint.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHostHID\USBHostKeyboard.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\targets\TARGET_STM\USBEndpoint_STM.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHostMIDI\USBHostMIDI.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHost\USBHost.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\targets\TARGET_STM\USBHALHost_STM.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHost3GModule\WANDongle.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHostHub\USBHostHub.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHostMSD\USBHostMSD.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHostSerial\USBHostSerial.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHostHID\USBHostMouse.cpp.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Arduino_USBHostMbed5\USBHost3GModule\WANDongleSerialPort.cpp.o
Compiling library "Portenta_SDCARD"
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Portenta_SDCARD\BSP.c.o
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\libraries\Portenta_SDCARD\SDMMCBlockDevice.cpp.o
Compiling core...
Using previously compiled file: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\50F344C94FE0893975B4D48C211CFA9C\core\variant.cpp.o
Using precompiled core: C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\cores\arduino_mbed_portenta_envie_m7_82d9f75b7c30def42734a5d8276820eb\core.a
Linking everything together...
"C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_arm-none-eabi-gcc_7-2017q4_7b7be9f526b2cb64/bin/arm-none-eabi-g++" -E -P -x c -DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\variants\\PORTENTA_H7_M7/linker_script.ld" -o "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C/linker_script.ld"
"C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_arm-none-eabi-gcc_7-2017q4_7b7be9f526b2cb64/bin/arm-none-eabi-g++" "-LC:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C" -Wl,--gc-sections -w -Wl,--as-needed -DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 "@C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\variants\\PORTENTA_H7_M7/ldflags.txt" "-TC:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C/linker_script.ld" "-Wl,-Map,C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C/AdvancedUSBInternalOperations.ino.map" --specs=nosys.specs -o "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C/AdvancedUSBInternalOperations.ino.elf" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\sketch\\AdvancedUSBInternalOperations.ino.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_UnifiedStorage\\Arduino_UnifiedStorage.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_UnifiedStorage\\Folder.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_UnifiedStorage\\InternalStorage.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_UnifiedStorage\\Partitioning.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_UnifiedStorage\\SDStorage.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_UnifiedStorage\\UFile.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_UnifiedStorage\\USBStorage.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_POSIXStorage\\Arduino_POSIXStorage.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHost3GModule\\WANDongle.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHost3GModule\\WANDongleSerialPort.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHostHID\\USBHostKeyboard.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHostHID\\USBHostMouse.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHostHub\\USBHostHub.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHostMIDI\\USBHostMIDI.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHostMSD\\USBHostMSD.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHostSerial\\USBHostSerial.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHost\\USBDeviceConnected.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHost\\USBEndpoint.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\USBHost\\USBHost.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\targets\\TARGET_STM\\USBEndpoint_STM.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Arduino_USBHostMbed5\\targets\\TARGET_STM\\USBHALHost_STM.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Portenta_SDCARD\\BSP.c.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\libraries\\Portenta_SDCARD\\SDMMCBlockDevice.cpp.o" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C\\core\\variant.cpp.o" -Wl,--whole-archive "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C/..\\..\\cores\\arduino_mbed_portenta_envie_m7_82d9f75b7c30def42734a5d8276820eb\\core.a" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\\variants\\PORTENTA_H7_M7/libs/libmbed.a" -Wl,--no-whole-archive -Wl,--start-group -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys -Wl,--end-group
"C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_arm-none-eabi-gcc_7-2017q4_7b7be9f526b2cb64/bin/arm-none-eabi-objcopy" -O binary "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C/AdvancedUSBInternalOperations.ino.elf" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C/AdvancedUSBInternalOperations.ino.bin"
"C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\internal\\arduino_arm-none-eabi-gcc_7-2017q4_7b7be9f526b2cb64/bin/arm-none-eabi-objcopy" -O ihex -R .eeprom "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C/AdvancedUSBInternalOperations.ino.elf" "C:\\Users\\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\50F344C94FE0893975B4D48C211CFA9C/AdvancedUSBInternalOperations.ino.hex"
C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\bootloaders\PORTENTA_H7\portentah7_bootloader_mbed_hs_v2.elf syntax error: no colon char on the first line character at line 1 

Using library Arduino_UnifiedStorage at version 1.1.0 in folder: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage
Using library Arduino_POSIXStorage at version 1.2.0 in folder: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_POSIXStorage_1.2.0_e7053177655041b1\Arduino_POSIXStorage
Using library Arduino_USBHostMbed5 at version 0.3.1 in folder: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5
Using library Portenta_SDCARD at version 1.0 in folder: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\libraries\Portenta_SDCARD

Used library           Version Path
Arduino_UnifiedStorage 1.1.0   C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_UnifiedStorage_1.1.0_cf85c666c400970f\Arduino_UnifiedStorage
Arduino_POSIXStorage   1.2.0   C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_POSIXStorage_1.2.0_e7053177655041b1\Arduino_POSIXStorage
Arduino_USBHostMbed5   0.3.1   C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\Arduino_USBHostMbed5_0.3.1_cd6938f29a024044\Arduino_USBHostMbed5
Portenta_SDCARD        1.0     C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e\libraries\Portenta_SDCARD

Used platform         Version Path
arduino:mbed_portenta 4.1.1   C:\Users\Ali Jahangiri\AppData\Local\Arduino15\internal\arduino_mbed_portenta_4.1.1_3aaf240e6bca340e

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest version
  • My request contains all necessary details

Compile ESP8266 Platform examples => esp8266 installation fails

Describe the problem

I created a workflow file together with git copilot, and got this:

But it seems the is a mistake with the esp8266 installation.
The esp platform installation fails.

Can anyone help here?


name: Compile Examples

on: [push, pull_request]

jobs:
  build-arduino:
    runs-on: ubuntu-latest
    if: contains(github.event.head_commit.message, '[arduino]')
    steps:
      - uses: actions/checkout@v3
      - uses: arduino/compile-sketches@v1
        with:
          libraries: |
            - source-path: ./

  build-esp8266:
    runs-on: ubuntu-latest
    if: contains(github.event.head_commit.message, '[esp8266]')
    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Install Arduino CLI
        uses: arduino/setup-arduino-cli@v1

      - name: Install ESP8266 platform
        run: |
          arduino-cli core update-index
          arduino-cli core install esp8266:esp8266

      - name: Compile code
        run: |
          arduino-cli compile --fqbn esp8266:esp8266:d1_mini ./examples/Wemos_D1_mini_AM2302_Sensor_Array_Example/Wemos_D1_mini_AM2302_Sensor_Array_Example.ino
          
builtin:[email protected] 0 B / 1.63 MiB    0.00%
builtin:[email protected] downloaded
Installing builtin:[email protected]...
Skipping tool configuration....
builtin:[email protected] installed

Downloading index: package_index.tar.bz2 0 B / 57.83 KiB    0.00%
Downloading index: package_index.tar.bz2 downloaded
Invalid argument passed: Found 0 platform for reference "esp8266:esp8266":

Error: Process completed with exit code 7.

To reproduce

every time when an esp example is pushed

Expected behavior

no error in installation

'arduino/compile-sketches' version

v1

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details

output compile time for each sketch

I had a thought that might be useful for workflow maintainers: Output the time it takes to compile an individual sketch. It might also instigate optimization for sketches that take longer to compile, but that is subject to sketch author's intentions.

There's currently no way of looking at a completed workflow's log and determine which sketch(s) cost more minutes (rather important for private repos). Compared to PlatformIO's CI capability, each sketch is compiled separately as individual jobs, thus the compile time is displayed as part of the job's runtime (not an exact measurement but helpful). Furthermore, PIO output does include how long it took to compile a sketch. Since this action compiles several sketches in 1 job, the job's runtime is cumulative and less representative of an individual sketch's compile time.

Support for --build-property

This action is a very interesting project.

Woud like to use this and also the report size delta action, but i think there is no option to pass multiple --build-property to the compile option.
I use this, to pass defines and specify the compiler path.

May support for this options can be added, my python isn't good enough to make a pr.

Support for ESP32

Hello,

Considering that the ESP32 folks seem to have built their own here:
https://github.com/espressif/arduino-esp32/actions/workflows/push.yml

Is the official arduino compile-sketches going to support ESP32 as well? Considering there is some special compilers/tools needed.

I'm asking as I'm trying to get this going here:
https://github.com/Blueprint-Foundry/Shelly/actions/workflows/compile-test.yml
However I am fairly new to Github actions, and don't want to dig in the wrong direction if ESP32 is fundamentally not supported yet.

Cheers :)

Deprecation warning

Describe the problem

When using the action the following warning appears:

The set-output command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

There are some mentions of set-output in this action that should probably be taken care of.

To reproduce

Use the action, check the output warnings.

Expected behavior

No warnings appear during action execution.

'arduino/compile-sketches' version

1.0.1

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details

[Feature] Support Platform.local.txt

Hi there.
By using platform.local.txt file, we can override properties defined in platform.txt or define new properties without modifying platform.txt, as you know.
If the action supports platform-file section to import custom platform.local.txt file, it would be more flexible and powerful.
Regards.

Library not included, when `source-path:` points to private repo

Describe the problem

I want to check that the examples in library A compile correctly prior to public release. However, library A is dependant upon library B. Both libraries are private.

The compile-sketches-private.yml workflow works for library B, but not library A.

To reproduce

  1. Create two private repos. Let's call them LibA and LibB. LibB has no external dependancies, outside what is inside the library manager. LibA however is dependant upon LibB (i.e. has #include "LibB" in the example sketches)
  2. Copy the compile-sketches-private.yml workflow to the .github/workflows folder in each repo. Configure the fqbn: and add libraies from the library manager (e.g. libraries: - name: Servo)
  3. Inside the compile-sketches-private.yml for LibA, refer to LibB as follows:
 libraries: |
            # Install the library from the local path.
            - source-path: ./
            - source-path: https://github.com/arduino-libraries/LibB
  1. When running the workflow, I get a message stating the following:
Error: Library source path: https:/github.com/arduino-libraries/LibB doesn't exist
Error: Process completed with exit code 1.

Expected behavior

Private libraries to which my account (or the organisation hosting it) have access to should be acceptable entries to source-path:

'arduino/compile-sketches' version

per1234/.github@b7b3433

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details

Support for latest Mac and Windows OS

Describe the request

It is possible to let this action runs under

  • windows-latest
  • macos-latest

Describe the current behavior

I have tried the following set up, gives many errors

    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]

'arduino/compile-sketches' version

main / v1.1.0

Additional context

No response

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest version
  • My request contains all necessary details

Cannot build a sketch for esp8266

Describe the problem

The workflow sets up a python environment, with all of the necessary dependencies, but then tries to execute a completely different (and non existent) hard coded version of python to do the build:

Action setup
  creating virtual environment...
  installing poetry from spec 'poetry==1.4.0'...
  done! ✨ 🌟 ✨
    installed package poetry 1.4.0, installed using Python 3.11.2
    These apps are now globally available
      - poetry
  Creating virtualenv compilesketches-jE1jbGsw-py3.11 in /home/runner/.cache/pypoetry/virtualenvs
  Installing dependencies from lock file
  Package operations: 19 installs, 0 updates, 0 removals
    • Installing pycparser (2.21)
    • Installing cffi (1.15.1)
    • Installing certifi (2022.12.7)
    • Installing charset-normalizer (3.1.0)
    • Installing cryptography (40.0.1)
    • Installing idna (3.4)
    • Installing smmap (5.0.0)
    • Installing urllib3 (1.26.15)
    • Installing wrapt (1.15.0)
    • Installing deprecated (1.2.13)
    • Installing gitdb (4.0.10)
    • Installing pyjwt (2.6.0)
    • Installing pynacl (1.5.0)
    • Installing requests (2.28.2)
    • Installing gitpython (3.1.31)
    • Installing pygithub (1.58.1)
    • Installing pyserial (3.5)
    • Installing pyyaml (6.0)
    • Installing semver (2.13.0)
  Installing the current project: compilesketches (0.0.0)
Run # Run action
  # Run action
  poetry run \
    python compilesketches/compilesketches.py
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    UNIVERSAL_LIBRARIES: - name: Websockets
  - name: ESPAsyncTCP
  
    SKETCHES_REPORTS_PATH: sketches-reports
    pythonLocation: /opt/hostedtoolcache/Python/3.11.2/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.2/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.2/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.2/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.2/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.2/x64/lib
    INPUT_CLI-VERSION: latest
    INPUT_FQBN: esp8266:esp8266:esp8285
    INPUT_LIBRARIES: - name: Websockets
  - name: ESPAsyncTCP
  
    INPUT_PLATFORMS: - name: esp8266:esp8266
    source-url: https://github.com/esp8266/Arduino.git
    version: 3.1.2
  
    INPUT_SKETCH-PATHS: ./
    INPUT_CLI-COMPILE-FLAGS: 
    INPUT_VERBOSE: false
    INPUT_GITHUB-TOKEN: 
    INPUT_ENABLE-DELTAS-REPORT: true
    INPUT_ENABLE-WARNINGS-REPORT: true
    INPUT_SKETCHES-REPORT-PATH: sketches-reports
  
Compiling sketch: .
  Used platform   Version Path
  esp8266:esp8266 3.1.2   /home/runner/Arduino/hardware/esp8266/esp8266
  Error during build: fork/exec /home/runner/Arduino/hardware/esp8266/esp8266/tools/python3/python3: no such file or directory
Error: Compilation failed
Error: One or more compilations failed
Error: Process completed with exit code 1.

To reproduce

Compile any sketch for esp8266.

Expected behavior

I expect the workflow to see if my sketch builds, not fail before the build process has even begun.

'arduino/compile-sketches' version

arduino/compile-sketches@v1

Additional context

This is my workflow yaml file, did I make a stupid mistake here?

name: Compile Sketch

# The workflow will run on Saturday's at 2:30am UTC & every push and pull request to the repository 
on:
  schedule:
    - cron: "30 2 * * 6"
  push:
  pull_request:

jobs:
  compile-sketch:
    runs-on: ubuntu-latest

    strategy:
      fail-fast: false

      matrix:
        board:
          - fqbn: esp8266:esp8266:nodemcu
          - fqbn: esp8266:esp8266:esp8285
        core:
          - version: 3.1.2
          - version: 3.0.2

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

      - name: Compile examples
        uses: arduino/compile-sketches@v1
        with:
          platforms: |
            - name: esp8266:esp8266
              source-url: https://github.com/esp8266/Arduino.git
              version: ${{ matrix.core.version }}
          fqbn: ${{ matrix.board.fqbn }}
          libraries: |
            - name: Websockets
            - name: ESPAsyncTCP
          sketch-paths: ./

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details

Improve documentation of data format of dependency inputs

Describe the problem

Supplying the board source-url for the BM .json file via the platform scheme documented does not work.

I searched through the python file to get it working and appended the URL to the fqbn field in my action file and it worked.

Please update the docs, or make the code match the docs.

To reproduce

Attempt to use a 3rd party board given the instructions in the action documentation.

This failed and gave an error indicating the information was parsed incorrectly.

      - name: Compile Arduino Sketches
        uses: arduino/compile-sketches@v1
        with:
          fqbn: 'adafruit:samd:adafruit_feather_m4_can'
          platforms:  |
            - name: "adafruit:samd"
            - source-url: "https://adafruit.github.io/arduino-board-index/package_adafruit_index.json"
          libraries: |
            - name: CAN Adafruit Fork
            - name: SafeString

This worked:

- name: Compile Arduino Sketches
        uses: arduino/compile-sketches@v1
        with:
          fqbn: 'adafruit:samd:adafruit_feather_m4_can https://adafruit.github.io/arduino-board-index/package_adafruit_index.json'
          libraries: |
            - name: CAN Adafruit Fork
            - name: SafeString

Expected behavior

Explained above.

'arduino/compile-sketches' version

v1.0.1

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details

Spaces in FQBN are not supported

Describe the problem

Using an FQBN with spaces, like "Heltec-esp32:Heltec ESP32 Series Dev-boards:esp32" fails with Invalid FQBN: not an FQBN: Heltec-esp32:Heltec.

Escaping like "Heltec-esp32:Heltec\\ ESP32\\ Series\\ Dev-boards:esp32" fails with Invalid FQBN: not an FQBN: Heltec-esp32:Heltec\

To reproduce

jobs:
  compile:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        fqbn:
          - "Heltec-esp32:Heltec ESP32 Series Dev-boards:esp32"
    steps:
      - uses: arduino/compile-sketches@v1
        with:
          fqbn: ${{ matrix.fqbn }}
          platforms: |
            - name: "Heltec ESP32 Series Dev-boards:esp32"
              version: "0.0.6"
              source-url: https://resource.heltec.cn/download/package_heltec_esp32_index.json

Expected behavior

It should not fail.

'arduino/compile-sketches' version

v1

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details

Incorrect and insufficient documentation of `cli-compile-args` input data format

Describe the problem

config;

name: Compile Sketch

# The workflow will run on every push and pull request to the repository
on:
  push:
    paths:
      - '.github/workflows/sketches.yaml'
      - '*.ino'
      - '*.cpp'
      - '*.h'
  pull_request:
    paths:
      - '.github/workflows/sketches.yaml'
      - '*.ino'
      - '*.cpp'
      - '*.h'

jobs:
  compile-sketch:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        # variants listed in Defines.h:11
        variant: [ 0, 1 , 2, 3 ]

    steps:
      # This step makes the contents of the repository available to the workflow
      - name: Checkout repository
        uses: actions/checkout@v2

      # For more information: https://github.com/arduino/compile-sketches#readme
      - name: Compile sketch
        uses: arduino/compile-sketches@v1
        with:
          # The default is to compile for the Arduino Uno board. If you want to compile for other boards, use the `fqbn` input.
          fqbn: arduino:avr:mega
          sketch-paths: |
            # Configure the action to search all folders under the root of the repository for sketches and compile them.
            # This is formatted as a YAML list, which makes it possible to have multiple sketch paths if needed.
            - ./main.ino
          cli-compile-flags: |
            - --build-property build.extra_flags=-VARIANT_SELECTED=${{ matrix.variant }}

To reproduce

# Run action
  poetry run \
    python compilesketches/compilesketches.py
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.11.2/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.2/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.2/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.2/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.2/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.2/x64/lib
    INPUT_CLI-VERSION: latest
    INPUT_FQBN: arduino:avr:mega
    INPUT_LIBRARIES: - source-path: ./
    INPUT_PLATFORMS: 
    INPUT_SKETCH-PATHS: # Configure the action to search all folders under the root of the repository for sketches and compile them.
  # This is formatted as a YAML list, which makes it possible to have multiple sketch paths if needed.
  - ./main.ino
  
    INPUT_CLI-COMPILE-FLAGS: - --build-property build.extra_flags=-VARIANT_SELECTED=0
    INPUT_VERBOSE: false
    INPUT_GITHUB-TOKEN: 
    INPUT_ENABLE-DELTAS-REPORT: false
    INPUT_ENABLE-WARNINGS-REPORT: false
    INPUT_SKETCHES-REPORT-PATH: sketches-reports
Compiling sketch: .
  Error: unknown flag: --build-property build.extra_flags
  Usage:
    arduino-cli compile [flags]
  
  Examples:
    /home/runner/bin/arduino-cli compile -b arduino:avr:uno /home/user/Arduino/MySketch
    /home/runner/bin/arduino-cli compile -b arduino:avr:uno --build-property "build.extra_flags=\"-DMY_DEFINE=\"hello world\"\"" /home/user/Arduino/MySketch
    /home/runner/bin/arduino-cli compile -b arduino:avr:uno --build-property "build.extra_flags=-DPIN=2 \"-DMY_DEFINE=\"hello world\"\"" /home/user/Arduino/MySketch
    /home/runner/bin/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
  
  
  Flags:
        --board-options strings                 List of board options separated by commas. Or can be used multiple times for multiple options.
        --build-cache-path string               Builds of 'core.a' are saved into this path to be cached and reused.
        --build-path string                     Path where to save compiled files. If omitted, a directory will be created in the default temporary path of your OS.
        --build-property stringArray            Override a build property with a custom value. Can be used multiple times for multiple properties.
        --clean                                 Optional, cleanup the build folder and do not use any cached build.
        --discovery-timeout duration            Max time to wait for port discovery, e.g.: 30s, 1m (default 1s)
        --dump-profile                          Create and print a profile configuration from the build.
        --encrypt-key string                    The name of the custom encryption key to use to encrypt a binary during the compile process. Used only by the platforms that support it.
    -e, --export-binaries                       If set built binaries will be exported to the sketch folder.
    -b, --fqbn string                           Fully Qualified Board Name, e.g.: arduino:avr:uno
    -h, --help                                  help for compile
        --keys-keychain string                  The path of the dir to search for the custom keys to sign and encrypt a binary. Used only by the platforms that support it.
        --libraries strings                     Path to a collection of libraries. Can be used multiple times or entries can be comma separated.
        --library strings                       Path to a single library’s root folder. Can be used multiple times or entries can be comma separated.
        --only-compilation-database             Just produce the compilation database, without actually compiling. All build commands are skipped except pre* hooks.
        --optimize-for-debug                    Optional, optimize compile output for debugging, rather than for release.
        --output-dir string                     Save build artifacts in this directory.
    -p, --port string                           Upload port address, e.g.: COM3 or /dev/ttyACM2
        --preprocess                            Print preprocessed code to stdout instead of compiling.
    -m, --profile string                        Sketch profile to use
    -P, --programmer string                     Programmer to use, e.g: atmel_ice
    -l, --protocol string                       Upload port protocol, e.g: serial
        --quiet                                 Optional, suppresses almost every output.
        --show-properties string[="expanded"]   Show build properties. The properties are expanded, use "--show-properties=unexpanded" if you want them exactly as they are defined. (default "disabled")
        --sign-key string                       The name of the custom signing key to use to sign a binary during the compile process. Used only by the platforms that support it.
    -u, --upload                                Upload the binary after the compilation.
    -t, --verify                                Verify uploaded binary after the upload.
        --warnings string                       Optional, can be: none, default, more, all. Used to tell gcc which warning level to use (-W flag). (default "none")
  
  Global 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 for the logs, can be: text, json, jsonmini, yaml (default "text")
        --log                       Print the logs on the standard output.
        --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
        --no-color                  Disable colored output.
  
  unknown flag: --build-property build.extra_flags
  
Error: Compilation failed
Error: One or more compilations failed
Error: Process completed with exit code 1.

Expected behavior

Matrix builds from flags provided

'arduino/compile-sketches' version

@v1

Additional context

I tried to see if it's a string thing with a double yaml.load but it seems fine;

import yaml
cli = yaml.load(wf["jobs"]["compile-sketch"]["steps"][1]["with"]["cli-compile-flags"], Loader=yaml.SafeLoader)
cli
['--build-property build.extra_flags=-VARIANT_SELECTED=${{ matrix.variant }}']

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details

compile-sketches uses gnu++11...

Describe the problem

My sketches need to set gnu++17 instead of gnu++11 in the platform.txt file.

How to do the same when compiling on GitHub?

To reproduce

Compile some sketches with a c++17 feature, not available in c++11.

Expected behavior

It should be possible to overwrite the c++ version used to compile.

'arduino/compile-sketches' version

latest

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details

could a runner's cache be supported?

This question is what made me think of the #59 suggestion because it would aid in reducing the action's runtime. My intention is to make use of actions/cache@v3.

Initially, I thought to install the python src of this action as a step then execute the python code as another step, but it looks like that would be skipping the action's setup script.

So, this question seems dependent on where the cache-able assets exist (in the docker container's FS or the runner's FS). When I say "cache-able assets", I mean the Arduino cores (builtin or externally fetched like the ATTinyCore). I don't think that caching the size-delta reports would be applicable/helpful. Maybe the ArduinoCLI tool could also apply to the cache...

Automatically load libraries from `depends` field in `library.propreties`

Describe the request

When a library is declared in the depends field of library.properties, it is included as part of the compilation.

In other words, when the following is part of library.properties

depends=Arduino_POSIXStorage,ArduinoRS485,Arduino_USBHostMbed5

Then this should be redundent in the comple-examples.yml workflow

libraries: |
    - name: Arduino_USBHostMbed5
    - name: Arduino_POSIXStorage
    - name: ArduinoRS485

Describe the current behavior

The dependant libraries need to be defined in the compile-sketches.yml workflow, regardless of what is defined inside the library.properties file of the library.

'arduino/compile-sketches' version

latest

Additional context

Inside the IDE, when a library is declared in the depends field of library.properties and is not installed the user is prompted to install them. This prevents dependancies issues when using the library functions or examples. As shown in this screenshot provided by @jcarolinares
image

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest version
  • My request contains all necessary details

compilesketches.py error before compile that related to recent update

Describe the problem

I have use this action to do CI check for all examples. However, it gives me errors found in py files. I have tried last week passed action to re-run the error also comes out. I guess it related with some code recent update used by this GitHub actions. I have tried with main and v1.1.0, neither can work. Found the arduino-cli has an update today. Maybe it is the update cause the issue.

https://github.com/ambiot/ambpro2_arduino/actions/runs/9492771613/job/26160846238

File "/home/runner/work/_actions/arduino/compile-sketches/main/compilesketches/compilesketches.py", line 563, in get_platform_installation_path
if installed_platform[self.cli_json_key("core list", "ID")] == platform[self.dependency_name_key]:
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: string indices must be integers, not 'str'

To reproduce

basic/default use of the action

Expected behavior

Can run compilesketches with no process error.

'arduino/compile-sketches' version

main / v1.1.0

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details

Library version is not working

Describe the problem

For my project, I need to use libraries with specific versions (not the recent ones). So, I prepared the workflow with a list of libraries (even with dependencies):

          libraries: |
            - name: WiFiManager
              version: 2.0.16-rc.2
            - name: ArduinoJson
              version: 6.21.3
            - name: ESPDateTime
              version: 1.0.4
            - name: SD
              version: 1.2.4
            - name: Adafruit seesaw Library
              version: 1.7.3
            - name: Adafruit BusIO
              version: 1.14.4
            - name: Adafruit GFX Library
              version: 1.11.7
            - name: Adafruit ST7735 and ST7789 Library
              version: 1.10.3
            - name: U8g2_for_Adafruit_GFX
              version: 1.8.0
            - name: DoubleResetDetector
              version: 1.0.3

But for some reason I see this replacing in logs:
Replacing Adafruit GFX [email protected] with Adafruit GFX [email protected]...
Replacing Adafruit seesaw [email protected] with Adafruit seesaw [email protected]...

Running command: /home/runner/bin/arduino-cli lib install Adafruit ST7735 and ST7789 [email protected] --log-level warn --verbose 
   Already installed Adafruit [email protected]
  Already installed Adafruit ST7735 and ST7789 [email protected]
  Already installed [email protected]
  Downloading Adafruit GFX [email protected]...
  Adafruit GFX [email protected] Adafruit GFX [email protected] already downloaded
  Installing Adafruit GFX [email protected]...
  Replacing Adafruit GFX [email protected] with Adafruit GFX [email protected]...
  Installed Adafruit GFX [email protected]
  Downloading Adafruit seesaw [email protected]...
  
  Adafruit seesaw [email protected] 0 B / 122.88 KiB    0.00%
  Adafruit seesaw [email protected] downloaded
  Installing Adafruit seesaw [email protected]...
  Replacing Adafruit seesaw [email protected] with Adafruit seesaw [email protected]...
  Installed Adafruit seesaw [email protected]

Maybe it's my mistake in configuration, but I don't know how to force using the specific versions.

Any ideas?

To reproduce

Try to use a specific version of a dependency. In my case, Adafruit GFX [email protected] for Adafruit ST7735 and ST7789 [email protected]

Expected behavior

Compiling the project with specific versions of the libraries.

'arduino/compile-sketches' version

1.1.0

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.