@@ -5,33 +5,74 @@ on: [push, pull_request]
5
5
6
6
env :
7
7
SKETCHES_REPORTS_PATH : sketches-reports
8
- SKETCHES_REPORTS_ARTIFACT_NAME : sketches-reports
8
+ SKETCHES_REPORTS_ARTIFACT_PREFIX : sketches-reports-
9
9
10
10
jobs :
11
+ hide_bot_comments :
12
+ runs-on : ubuntu-24.04
13
+ steps :
14
+ - uses : actions/checkout@v4
15
+ - name : Hide outdated bot comments
16
+ if : github.event_name == 'pull_request'
17
+ uses : actions/github-script@v7
18
+ with :
19
+ github-token : ${{ secrets.GITHUB_TOKEN }}
20
+ script : |
21
+ const issue_number = context.issue.number;
22
+ const owner = context.repo.owner;
23
+ const repo = context.repo.repo;
24
+
25
+ github.rest.issues.listComments({
26
+ owner,
27
+ repo,
28
+ issue_number,
29
+ per_page: 100
30
+ }).then(response => {
31
+ response.data.forEach(comment => {
32
+ if (comment.user.login === 'github-actions[bot]' && comment.user.type === 'Bot') {
33
+ const commentId = comment.node_id;
34
+ github.graphql(`
35
+ mutation($commentId: ID!) {
36
+ minimizeComment(input: {
37
+ subjectId: $commentId,
38
+ classifier: OUTDATED
39
+ }) {
40
+ minimizedComment {
41
+ isMinimized
42
+ minimizedReason
43
+ }
44
+ }
45
+ }
46
+ `, { commentId: commentId });
47
+ }
48
+ });
49
+ });
50
+
11
51
compile :
52
+ needs : hide_bot_comments
12
53
name : ${{ matrix.board.fqbn }}
13
- runs-on : ubuntu-22 .04
54
+ runs-on : ubuntu-24 .04
14
55
timeout-minutes : 20
15
56
strategy :
16
57
fail-fast : false
17
58
max-parallel : 20
18
59
matrix :
19
60
board :
20
- - fqbn : " arduino:avr:uno"
61
+ - fqbn : ' arduino:avr:uno'
21
62
platform-name : arduino:avr
22
- - fqbn : " arduino:avr:mega"
63
+ - fqbn : ' arduino:avr:mega'
23
64
platform-name : arduino:avr
24
- - fqbn : " arduino:samd:mkr1000"
65
+ - fqbn : ' arduino:samd:mkr1000'
25
66
platform-name : arduino:samd
26
- - fqbn : " esp8266:esp8266:generic"
67
+ - fqbn : ' esp8266:esp8266:generic'
27
68
platform-name : esp8266:esp8266
28
- - fqbn : " esp8266:esp8266:d1_mini"
69
+ - fqbn : ' esp8266:esp8266:d1_mini'
29
70
platform-name : esp8266:esp8266
30
- - fqbn : " esp32:esp32:esp32"
71
+ - fqbn : ' esp32:esp32:esp32'
31
72
platform-name : esp32:esp32
32
- - fqbn : " esp32:esp32:lolin_s2_mini"
73
+ - fqbn : ' esp32:esp32:lolin_s2_mini'
33
74
platform-name : esp32:esp32
34
- - fqbn : " esp32:esp32:lolin_c3_mini"
75
+ - fqbn : ' esp32:esp32:lolin_c3_mini'
35
76
platform-name : esp32:esp32
36
77
# Fix custom platform url for board matrix.
37
78
include :
46
87
platforms : |
47
88
- name: esp32:esp32
48
89
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
49
- version: 2.0.14
90
+ version: 3.1.0
50
91
51
92
steps :
52
93
- uses : actions/checkout@v4
@@ -57,24 +98,28 @@ jobs:
57
98
fqbn : ${{ matrix.board.fqbn }}
58
99
enable-warnings-report : true
59
100
enable-deltas-report : true
101
+ github-token : ${{ secrets.GITHUB_TOKEN }}
60
102
# This step is needed to pass the size data to the report job.
103
+ - name : Create upload name.
104
+ run : |
105
+ VALID_NAME=$(echo "${{ matrix.board.fqbn }}" | sed 's/:/-/g')
106
+ echo "UPLOAD_NAME=$VALID_NAME" >> "$GITHUB_ENV"
61
107
- name : Upload sketches report to workflow artifact.
62
108
uses : actions/upload-artifact@v4
63
109
with :
64
- name : ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
110
+ name : ${{ env.SKETCHES_REPORTS_ARTIFACT_PREFIX }}${{ env.UPLOAD_NAME }}
65
111
path : ${{ env.SKETCHES_REPORTS_PATH }}
66
112
67
113
# When using a matrix to compile for multiple boards, it's necessary to use a separate job for the deltas report.
68
114
report :
69
115
needs : compile # Wait for the compile job to finish to get the data for the report.
70
116
if : github.event_name == 'pull_request' # Only run the job when the workflow is triggered by a pull request.
71
- runs-on : ubuntu-latest
117
+ runs-on : ubuntu-24.04
72
118
steps :
73
119
# This step is needed to get the size data produced by the compile jobs.
74
120
- name : Download sketches reports artifact.
75
121
uses : actions/download-artifact@v4
76
122
with :
77
- name : ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
78
123
path : ${{ env.SKETCHES_REPORTS_PATH }}
79
124
80
125
- uses : arduino/report-size-deltas@v1
0 commit comments