Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.
/ report-size-trends Public archive

GitHub Actions action that records memory usage of Arduino sketches to a Google Sheets spreadsheet

License

Notifications You must be signed in to change notification settings

arduino/report-size-trends

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arduino/report-size-trends action

Tests Spell Check codecov


⚠ This project is no longer maintained. ⚠


This action records the memory usage of the Arduino sketches compiled by the arduino/compile-examples action to a Google Sheets spreadsheet.

Table of contents

Inputs

sketches-report-path

Path that contains the sketches report, as specified to the arduino/compile-examples action's sketches-report-path input.

Default: "sketches-reports"

google-key-file

Required Contents of the Google key file used to update the size trends report Google Sheets spreadsheet. This should be defined using a GitHub encrypted secret.

Create Google API credentials

  1. Open https://console.developers.google.com/project
  2. Click the "Create Project" button.
  3. In the "Project name" field, enter the name you want for your project.
  4. You don't need to select anything from the "Location" menu.
  5. Click the "Create" button.
  6. Wait for project creation to finish.
  7. Click the button with the three horizontal lines at the top left corner of the window.
  8. Hover the mouse pointer over "APIs & Services".
  9. Click "Library".
  10. Make sure the name of the project you created is selected from the dropdown menu at the top of the window.
  11. Click 'Google Sheets API".
  12. Click the "Enable" button.
  13. Click the "Create Credentials" button.
  14. From the "Which API are you using?" menu, select "Google Sheets API".
  15. From the "Where will you be calling the API from?" menu, select "Other non-UI".
  16. From the "What data will you be accessing?" options, select "Application data".
  17. From the "Are you planning to use this API with App Engine or Compute Engine?" options, select "No, I’m not using them".
  18. Click the "What credentials do I need?" button.
  19. In the "Service account name" field, enter the name you want to use for the service account.
  20. From the "Role" menu, select "Project > Editor".
  21. From the "Key type" options, select "JSON".
  22. Click the "Continue" button. The .json file containing your private key will be downloaded. Save this somewhere safe.

Configure Google Sheets spreadsheet access

  1. Open the downloaded Google API key file you created by following the "Create Google API credentials" instructions above.
  2. Copy the email address shown in the client_email field.
  3. Open Google Sheets: https://docs.google.com/spreadsheets
  4. Under "Start a new spreadsheet", click "Blank".
  5. Click the "Share" button at the top right corner of the window.
  6. If you haven't already, give your spreadsheet a name.
  7. Paste the client_email email address into the "Enter names or email addresses..." field.
  8. Click the email address in the auto-complete dropdown that appears under the email "Enter names or email addresses..." field.
  9. From the permissions menu to the right of the field containing the email, select "Editor"
  10. Uncheck the box next to "Notify people".
  11. Click the "Share" button.

Create key secret

  1. Open the downloaded Google API key file you created by following the "Create Google API credentials" instructions above.
  2. Copy the entire contents of the file to the clipboard.
  3. Open the GitHub page of the repository you are configuring the GitHub Actions workflow for.
  4. Click the "Settings" tab.
  5. From the menu on the left side of the window, click "Secrets".
  6. Click the "New secret" button.
  7. In the "Name" field, enter the variable name you want to use for your secret. This secret is what you will use in the arduino/report-size-trends action's google-key-file input in your GitHub Actions workflow configuration file. For example, if you named the secret GOOGLE_KEY_FILE, the input would look like google-key-file: ${{ secrets.GOOGLE_KEY_FILE }}.
  8. In the "Value" field, paste the contents of the key file.
  9. Click the "Add secret" button.

spreadsheet-id

Required The ID of the Google Sheets spreadsheet to write the memory usage trends data to. The URL of your spreadsheet will look something like:

https://docs.google.com/spreadsheets/d/15WOp3vp-6AnTnWlNWaNWNl61Fe_j8UJhIKE0rVdV-7U/edit#gid=0

In this example, the spreadsheet ID is 15WOp3vp-6AnTnWlNWaNWNl61Fe_j8UJhIKE0rVdV-7U.

sheet-name

The sheet name in the Google Sheets spreadsheet used for the memory usage trends report.

Default: "Sheet1"

Example usage

- uses: arduino/compile-sketches@main
# Publish size trends report on each push to the main branch
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
  uses: arduino/report-size-trends@main
  with:
    google-key-file: ${{ secrets.GOOGLE_KEY_FILE }}
    spreadsheet-id: 15WOp3vp-6AnTnWlNWaNWNl61Fe_j8UJhIKE0rVdV-7U

About

GitHub Actions action that records memory usage of Arduino sketches to a Google Sheets spreadsheet

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Contributors 3

  •  
  •  
  •