@@ -5,33 +5,74 @@ on: [push, pull_request]
55
66env :
77 SKETCHES_REPORTS_PATH : sketches-reports
8- SKETCHES_REPORTS_ARTIFACT_NAME : sketches-reports
8+ SKETCHES_REPORTS_ARTIFACT_PREFIX : sketches-reports-
99
1010jobs :
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+
1151 compile :
52+ needs : hide_bot_comments
1253 name : ${{ matrix.board.fqbn }}
13- runs-on : ubuntu-22 .04
54+ runs-on : ubuntu-24 .04
1455 timeout-minutes : 20
1556 strategy :
1657 fail-fast : false
1758 max-parallel : 20
1859 matrix :
1960 board :
20- - fqbn : " arduino:avr:uno"
61+ - fqbn : ' arduino:avr:uno'
2162 platform-name : arduino:avr
22- - fqbn : " arduino:avr:mega"
63+ - fqbn : ' arduino:avr:mega'
2364 platform-name : arduino:avr
24- - fqbn : " arduino:samd:mkr1000"
65+ - fqbn : ' arduino:samd:mkr1000'
2566 platform-name : arduino:samd
26- - fqbn : " esp8266:esp8266:generic"
67+ - fqbn : ' esp8266:esp8266:generic'
2768 platform-name : esp8266:esp8266
28- - fqbn : " esp8266:esp8266:d1_mini"
69+ - fqbn : ' esp8266:esp8266:d1_mini'
2970 platform-name : esp8266:esp8266
30- - fqbn : " esp32:esp32:esp32"
71+ - fqbn : ' esp32:esp32:esp32'
3172 platform-name : esp32:esp32
32- - fqbn : " esp32:esp32:lolin_s2_mini"
73+ - fqbn : ' esp32:esp32:lolin_s2_mini'
3374 platform-name : esp32:esp32
34- - fqbn : " esp32:esp32:lolin_c3_mini"
75+ - fqbn : ' esp32:esp32:lolin_c3_mini'
3576 platform-name : esp32:esp32
3677 # Fix custom platform url for board matrix.
3778 include :
4687 platforms : |
4788 - name: esp32:esp32
4889 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
5091
5192 steps :
5293 - uses : actions/checkout@v4
@@ -57,24 +98,28 @@ jobs:
5798 fqbn : ${{ matrix.board.fqbn }}
5899 enable-warnings-report : true
59100 enable-deltas-report : true
101+ github-token : ${{ secrets.GITHUB_TOKEN }}
60102 # 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"
61107 - name : Upload sketches report to workflow artifact.
62108 uses : actions/upload-artifact@v4
63109 with :
64- name : ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
110+ name : ${{ env.SKETCHES_REPORTS_ARTIFACT_PREFIX }}${{ env.UPLOAD_NAME }}
65111 path : ${{ env.SKETCHES_REPORTS_PATH }}
66112
67113 # When using a matrix to compile for multiple boards, it's necessary to use a separate job for the deltas report.
68114 report :
69115 needs : compile # Wait for the compile job to finish to get the data for the report.
70116 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
72118 steps :
73119 # This step is needed to get the size data produced by the compile jobs.
74120 - name : Download sketches reports artifact.
75121 uses : actions/download-artifact@v4
76122 with :
77- name : ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
78123 path : ${{ env.SKETCHES_REPORTS_PATH }}
79124
80125 - uses : arduino/report-size-deltas@v1
0 commit comments