⚠ 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.
Path that contains the sketches report, as specified to the arduino/compile-examples
action's sketches-report-path input.
Default: "sketches-reports"
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.
- Open https://console.developers.google.com/project
- Click the "Create Project" button.
- In the "Project name" field, enter the name you want for your project.
- You don't need to select anything from the "Location" menu.
- Click the "Create" button.
- Wait for project creation to finish.
- Click the button with the three horizontal lines at the top left corner of the window.
- Hover the mouse pointer over "APIs & Services".
- Click "Library".
- Make sure the name of the project you created is selected from the dropdown menu at the top of the window.
- Click 'Google Sheets API".
- Click the "Enable" button.
- Click the "Create Credentials" button.
- From the "Which API are you using?" menu, select "Google Sheets API".
- From the "Where will you be calling the API from?" menu, select "Other non-UI".
- From the "What data will you be accessing?" options, select "Application data".
- From the "Are you planning to use this API with App Engine or Compute Engine?" options, select "No, I’m not using them".
- Click the "What credentials do I need?" button.
- In the "Service account name" field, enter the name you want to use for the service account.
- From the "Role" menu, select "Project > Editor".
- From the "Key type" options, select "JSON".
- Click the "Continue" button. The .json file containing your private key will be downloaded. Save this somewhere safe.
- Open the downloaded Google API key file you created by following the "Create Google API credentials" instructions above.
- Copy the email address shown in the
client_email
field. - Open Google Sheets: https://docs.google.com/spreadsheets
- Under "Start a new spreadsheet", click "Blank".
- Click the "Share" button at the top right corner of the window.
- If you haven't already, give your spreadsheet a name.
- Paste the
client_email
email address into the "Enter names or email addresses..." field. - Click the email address in the auto-complete dropdown that appears under the email "Enter names or email addresses..." field.
- From the permissions menu to the right of the field containing the email, select "Editor"
- Uncheck the box next to "Notify people".
- Click the "Share" button.
- Open the downloaded Google API key file you created by following the "Create Google API credentials" instructions above.
- Copy the entire contents of the file to the clipboard.
- Open the GitHub page of the repository you are configuring the GitHub Actions workflow for.
- Click the "Settings" tab.
- From the menu on the left side of the window, click "Secrets".
- Click the "New secret" button.
- 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'sgoogle-key-file
input in your GitHub Actions workflow configuration file. For example, if you named the secretGOOGLE_KEY_FILE
, the input would look likegoogle-key-file: ${{ secrets.GOOGLE_KEY_FILE }}
. - In the "Value" field, paste the contents of the key file.
- Click the "Add secret" button.
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
.
The sheet name in the Google Sheets spreadsheet used for the memory usage trends report.
Default: "Sheet1"
- 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