Skip to content

Commit d7b5dee

Browse files
committed
Revert to workflow template
1 parent 36c40d3 commit d7b5dee

File tree

1 file changed

+44
-25
lines changed

1 file changed

+44
-25
lines changed
Lines changed: 44 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,70 @@
1+
# Source: https://github.com/per1234/.github/blob/main/workflow-templates/compile-examples.md
12
name: Compile Examples
23

3-
on:
4+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
5+
on:
46
push:
5-
branches: [main]
7+
paths:
8+
- ".github/workflows/compile-examples.ya?ml"
9+
- "library.properties"
10+
- "examples/**"
11+
- "src/**"
612
pull_request:
7-
branches: [main]
8-
# Scheduled trigger checks for breakage caused by changes to external resources (libraries, platforms)
13+
paths:
14+
- ".github/workflows/compile-examples.ya?ml"
15+
- "library.properties"
16+
- "examples/**"
17+
- "src/**"
918
schedule:
10-
# run every Tuesday at 3 AM UTC
11-
- cron: "0 3 * * 2"
12-
# workflow_dispatch event allows the workflow to be triggered manually
13-
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch
19+
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms).
20+
- cron: "0 8 * * TUE"
1421
workflow_dispatch:
15-
# repository_dispatch event allows the workflow to be triggered via the GitHub API
16-
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch
1722
repository_dispatch:
1823

19-
env:
20-
SKETCHES_REPORTS_PATH: sketches-reports
21-
SKETCHES_REPORTS_ARTIFACT_NAME: sketches-reports
22-
2324
jobs:
24-
compile-examples:
25+
build:
26+
name: ${{ matrix.board.fqbn }}
2527
runs-on: ubuntu-latest
28+
permissions: {}
29+
30+
env:
31+
SKETCHES_REPORTS_PATH: sketches-reports
32+
33+
strategy:
34+
fail-fast: false
35+
36+
matrix:
37+
board:
38+
# TODO: Add list of boards to compile for here:
39+
- fqbn: arduino:mbed_portenta:envie_m7
40+
# TODO: Define the board's platform dependencies here.
41+
# See: https://github.com/arduino/compile-sketches#platforms
42+
platforms: |
43+
- name: arduino:mbed_portenta
2644
2745
steps:
2846
- name: Checkout repository
2947
uses: actions/checkout@v3
3048

31-
- name: Compile example sketches
49+
- name: Compile examples
3250
uses: arduino/compile-sketches@v1
3351
with:
34-
fqbn: arduino:mbed_portenta:envie_m7
35-
platforms: |
36-
- name: arduino:mbed_portenta
52+
github-token: ${{ secrets.GITHUB_TOKEN }}
53+
fqbn: ${{ matrix.board.fqbn }}
54+
platforms: ${{ matrix.board.platforms }}
3755
libraries: |
38-
- source-path: https://github.com/arduino-libraries/Arduino_POSIXStorage/
56+
# Install the library from the local path.
57+
- source-path: ./
58+
# Additional library dependencies can be listed here.
59+
# See: https://github.com/arduino/compile-sketches#libraries
3960
sketch-paths: |
40-
- examples
61+
- examples
4162
enable-deltas-report: true
42-
enable-warnings-report: true
4363
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
44-
github-token: ${{ secrets.GITHUB_TOKEN }}
4564

46-
- name: Save memory usage change report as artifact
65+
- name: Save sketches report as workflow artifact
4766
uses: actions/upload-artifact@v3
4867
with:
4968
if-no-files-found: error
5069
path: ${{ env.SKETCHES_REPORTS_PATH }}
51-
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
70+
name: ${{ env.SKETCHES_REPORTS_PATH }}

0 commit comments

Comments
 (0)