Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GitHub Actions action that comments on pull requests with a report of change in memory usage of Arduino sketches

License

NotificationsYou must be signed in to change notification settings

arduino/report-size-deltas

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Check Markdown statusCheck npm statusCheck Poetry statusCheck Prettier Formatting statusCheck Python statusCheck Taskfiles statusCheck ToC statusIntegration TestsSpell Check statusSync Labels statusTest Python statuscodecov

This action comments on the pull request with a report on the resulting change in memory usage of theArduino sketches compiled by thearduino/compile-sketches action. This should be run from ascheduled workflow.

sample report

Table of contents

Inputs

sketches-reports-source

Default: "sketches-reports"

The action can be used in two ways:

Run from a scheduled workflow

Recommended for public repositories.

The use of ascheduled workflow is necessary in order for the action to have thewrite permissions required to comment on pull requests submitted from forks.

In this usage, thesketches-reports-source input defines the regular expression matching the names of the workflow artifacts that contain the memory usage data, as specified to theactions/upload-artifact action via itsname input.

The regular expression syntax isthat of the Pythonre module.

Run from the same workflow as thearduino/compile-sketches action

Recommended for private repositories.

If configured to trigger on a short interval, the scheduled workflow method can use a lot of GitHub Actions minutes, quickly using up the limited allotment provided by GitHub for private repositories (public repositories get unlimited free minutes). For this reason, it may be preferable to only run the action as needed.

In order to get reports for pull requests from forks, the"Send write tokens to workflows from fork pull requests" setting must be enabled.

If the "Send write tokens to workflows from fork pull requests" setting is not enabled but the"Run workflows from fork pull requests" setting is enabled, the workflow should be configured to only run the action when the pull request is not from a fork (if: github.event.pull_request.head.repo.full_name == github.repository). This will prevent workflow job failures that would otherwise be caused when the report creation failed due to not having the necessary write permissions.

In this usage, thesketches-reports-source defines the path to the folder containing the memory usage data, as specified to theactions/download-artifact action via itspath input.

The path is searched recursively for sketches report files.

github-token

GitHub access token used to comment the memory usage comparison results to the PR thread.

Default:GITHUB_TOKEN

Example usage

Scheduled workflow

on:schedule:    -cron:"*/5 * * * *"jobs:build:runs-on:ubuntu-lateststeps:      -uses:arduino/report-size-deltas@v1

This must be used in conjunction with a workflow that runs thearduino/compile-sketches action and uploads the resulting sketches report to aworkflow artifact:

on:[push, pull_request]jobs:compile:runs-on:ubuntu-lateststeps:      -uses:actions/checkout@v4      -uses:arduino/compile-sketches@v1with:enable-deltas-report:true      -uses:actions/upload-artifact@v4with:name:sketches-reportspath:sketches-reports

A more advanced example is available intheFAQ.


Workflow triggered bypull_request event

on:[push, pull_request]jobs:compile:runs-on:ubuntu-lateststeps:      -uses:actions/checkout@v4      -uses:arduino/compile-sketches@v1with:enable-deltas-report:true      -uses:arduino/report-size-deltas@v1# Only run the action when the workflow is triggered by a pull request.if:github.event_name == 'pull_request'

A more advanced example is available intheFAQ.


Additional resources

About

GitHub Actions action that comments on pull requests with a report of change in memory usage of Arduino sketches

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Contributors6


[8]ページ先頭

©2009-2025 Movatter.jp