Skip to content

Commit 27c9244

Browse files
committed
fix(ci): update upload name
- update os - add actionlint - hide old reports on PR
1 parent 34c3070 commit 27c9244

File tree

5 files changed

+99
-26
lines changed

5 files changed

+99
-26
lines changed

.github/workflows/autoreview.yml

+14-5
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,29 @@ name: autoreview
22
on: [ pull_request ]
33

44
jobs:
5+
actionlint:
6+
name: reviewdog/actionlint
7+
runs-on: ubuntu-24.04
8+
steps:
9+
- uses: actions/checkout@v4
10+
with:
11+
sparse-checkout: |
12+
.github
13+
- uses: reviewdog/action-actionlint@v1
514
misspellcheck:
615
name: reviewdog/misspell
7-
runs-on: ubuntu-22.04
16+
runs-on: ubuntu-24.04
817
steps:
918
- uses: actions/checkout@v4
1019
- name: Run misspell with reviewdog
1120
uses: reviewdog/action-misspell@v1
1221
with:
1322
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1423
reporter: github-pr-check
15-
#locale: "US"
24+
#locale: 'US'
1625
remarklintcheck:
1726
name: reviewdog/remark-lint
18-
runs-on: ubuntu-22.04
27+
runs-on: ubuntu-24.04
1928
steps:
2029
- uses: actions/checkout@v4
2130
- name: install remark presets
@@ -27,7 +36,7 @@ jobs:
2736
reporter: github-pr-check
2837
codespellcheck:
2938
name: codespell
30-
runs-on: ubuntu-22.04
39+
runs-on: ubuntu-24.04
3140
steps:
3241
- uses: actions/checkout@v4
3342
- uses: codespell-project/actions-codespell@v2
@@ -36,4 +45,4 @@ jobs:
3645
check_hidden: true
3746
#ignore_words_file: .codespellignore
3847
only_warn: true
39-
uri_ignore_words_list: "*"
48+
uri_ignore_words_list: '*'

.github/workflows/pages.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@ name: Build documentation and deploy to Pages
22

33
on:
44
push:
5-
branches: ["master"]
5+
branches: ['master']
66
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
77

88
# Allow one concurrent deployment
99
concurrency:
10-
group: "pages"
10+
group: 'pages'
1111
cancel-in-progress: true
1212

1313
jobs:
1414
# Build job
1515
build:
1616
# At a minimum this job should upload artifacts using actions/upload-pages-artifact
1717
# Specify runner + deployment step
18-
runs-on: ubuntu-latest
18+
runs-on: ubuntu-24.04
1919
steps:
2020
- uses: actions/checkout@v4
2121
- name: Set up Python
2222
uses: actions/setup-python@v5
2323
with:
24-
python-version: "3.12"
25-
cache: "pip"
26-
cache-dependency-path: "./doc/requirements.txt"
24+
python-version: '3.12'
25+
cache: 'pip'
26+
cache-dependency-path: './doc/requirements.txt'
2727
- name: Install dependencies
2828
run: |
2929
pip install -r doc/requirements.txt
@@ -42,6 +42,7 @@ jobs:
4242
deploy:
4343
# Add a dependency to the build job
4444
needs: build
45+
if: github.repository_owner == 'OSSLibraries'
4546

4647
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
4748
permissions:

.github/workflows/test.arduino-compile-examples.yml

+59-14
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,74 @@ on: [push, pull_request]
55

66
env:
77
SKETCHES_REPORTS_PATH: sketches-reports
8-
SKETCHES_REPORTS_ARTIFACT_NAME: sketches-reports
8+
SKETCHES_REPORTS_ARTIFACT_PREFIX: sketches-reports-
99

1010
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+
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:
@@ -46,7 +87,7 @@ jobs:
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

.github/workflows/test.arduino-lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on: [push, pull_request]
55

66
jobs:
77
arduino-lint:
8-
runs-on: ubuntu-22.04
8+
runs-on: ubuntu-24.04
99
timeout-minutes: 20
1010
steps:
1111
- uses: actions/checkout@v4

.github/workflows/test.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
on:
2+
issues:
3+
types: [opened]
4+
5+
jobs:
6+
apply-label:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/github-script@v7
10+
with:
11+
github-token: ${{ secrets.GITHUB_TOKEN }}
12+
script: |
13+
github.rest.issues.addLabels({
14+
issue_number: context.issue.number,
15+
owner: context.repo.owner,
16+
repo: context.repo.repo,
17+
labels: ['Triage']
18+
})

0 commit comments

Comments
 (0)