-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Arduino library CI #41
Draft
peternewman
wants to merge
13
commits into
mathertel:master
Choose a base branch
from
peternewman:patch-6
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
9c3a3da
Add check-arduino
peternewman 7aa01b4
Rename check-arduino.yml to .github/workflows/check-arduino.yml
peternewman 1174872
Create compile-examples.yml
peternewman 0f228a7
Create report-size-deltas.yml
peternewman 96fac8c
Not an official Arduino lib
peternewman 6312de6
Fix a typo
peternewman d71a5a2
Don't build on the platforms that don't work
peternewman 7bb5673
Merge branch 'mathertel:master' into patch-6
peternewman 1fa80a1
Correct a comment
peternewman b4c55ed
Superseded by https://github.com/mathertel/DmxSerial2/blob/master/.gi…
peternewman fb012e3
Port some changes from #35
peternewman 061c608
Explicitly list the sketches to compile as the search doesn't seem to…
peternewman f6e3e55
Try and fix the sketch searching
peternewman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: Compile Examples | ||
|
||
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows | ||
on: | ||
push: | ||
paths: | ||
- ".github/workflows/compile-examples.yml" | ||
- "examples/**" | ||
- "src/**" | ||
pull_request: | ||
paths: | ||
- ".github/workflows/compile-examples.yml" | ||
- "examples/**" | ||
- "src/**" | ||
schedule: | ||
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms). | ||
- cron: "0 8 * * TUE" | ||
workflow_dispatch: | ||
repository_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.board.fqbn }} | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
SKETCHES_REPORTS_PATH: sketches-reports | ||
|
||
strategy: | ||
fail-fast: false | ||
|
||
matrix: | ||
board: | ||
- fqbn: arduino:avr:nano | ||
platforms: | | ||
- name: arduino:avr | ||
- fqbn: arduino:avr:mega | ||
platforms: | | ||
- name: arduino:avr | ||
- fqbn: arduino:avr:leonardo | ||
platforms: | | ||
- name: arduino:avr | ||
# No serial port/incorrect serial config | ||
#- fqbn: arduino:megaavr:nona4809 | ||
# platforms: | | ||
# - name: arduino:megaavr | ||
# No EEPROM library in all the below | ||
#- fqbn: arduino:sam:arduino_due_x_dbg | ||
# platforms: | | ||
# - name: arduino:sam | ||
#- fqbn: arduino:samd:mkrzero | ||
# platforms: | | ||
# - name: arduino:samd | ||
#- fqbn: arduino:mbed_portenta:envie_m4 | ||
# platforms: | | ||
# - name: arduino:mbed_portenta | ||
#- fqbn: arduino:mbed_portenta:envie_m7 | ||
# platforms: | | ||
# - name: arduino:mbed_portenta | ||
#- fqbn: arduino:mbed_nano:nano33ble | ||
# platforms: | | ||
# - name: arduino:mbed_nano | ||
#- fqbn: arduino:mbed_nano:nanorp2040connect | ||
# platforms: | | ||
# - name: arduino:mbed_nano | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Compile examples | ||
uses: arduino/compile-sketches@v1 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
fqbn: ${{ matrix.board.fqbn }} | ||
platforms: ${{ matrix.board.platforms }} | ||
libraries: | | ||
# Install the library from the local path. | ||
- source-path: ./ | ||
# Additional library dependencies can be listed here. | ||
# See: https://github.com/arduino/compile-sketches#libraries | ||
sketch-paths: | | ||
- examples | ||
enable-deltas-report: true | ||
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} | ||
|
||
- name: Save sketches report as workflow artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
if-no-files-found: error | ||
path: ${{ env.SKETCHES_REPORTS_PATH }} | ||
name: ${{ env.SKETCHES_REPORTS_PATH }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Report Size Deltas | ||
|
||
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows | ||
on: | ||
push: | ||
paths: | ||
- ".github/workflows/report-size-deltas.yml" | ||
schedule: | ||
# Run at the minimum interval allowed by GitHub Actions. | ||
# Note: GitHub Actions periodically has outages which result in workflow failures. | ||
# In this event, the workflows will start passing again once the service recovers. | ||
- cron: "*/5 * * * *" | ||
workflow_dispatch: | ||
repository_dispatch: | ||
|
||
jobs: | ||
report: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Comment size deltas reports to PRs | ||
uses: arduino/report-size-deltas@v1 | ||
with: | ||
# The name of the workflow artifact created by the sketch compilation workflow | ||
sketches-reports-source: sketches-reports | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this file needs to be separate as it's got a different schedule.