Skip to content

Commit ead5b42

Browse files
authored
Merge pull request #33 from arduino/update-8.0
Update for avrdude 8.0
2 parents 2a73b46 + 22d1d07 commit ead5b42

File tree

6 files changed

+146
-69
lines changed

6 files changed

+146
-69
lines changed

.github/workflows/check-markdown-task.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ on:
4141
jobs:
4242
run-determination:
4343
runs-on: ubuntu-latest
44+
permissions: {}
4445
outputs:
4546
result: ${{ steps.determination.outputs.result }}
4647
steps:
@@ -60,27 +61,29 @@ jobs:
6061
RESULT="false"
6162
fi
6263
63-
echo "::set-output name=result::$RESULT"
64+
echo "result=$RESULT" >> $GITHUB_OUTPUT
6465
6566
lint:
6667
needs: run-determination
6768
if: needs.run-determination.outputs.result == 'true'
6869
runs-on: ubuntu-latest
70+
permissions:
71+
contents: read
6972

7073
steps:
7174
- name: Checkout repository
72-
uses: actions/checkout@v3
75+
uses: actions/checkout@v4
7376

7477
- name: Setup Node.js
75-
uses: actions/setup-node@v3
78+
uses: actions/setup-node@v4
7679
with:
7780
node-version: ${{ env.NODE_VERSION }}
7881

7982
- name: Initialize markdownlint-cli problem matcher
80-
uses: xt0rted/markdownlint-problem-matcher@v1
83+
uses: xt0rted/markdownlint-problem-matcher@v3
8184

8285
- name: Install Task
83-
uses: arduino/setup-task@v1
86+
uses: arduino/setup-task@v2
8487
with:
8588
repo-token: ${{ secrets.GITHUB_TOKEN }}
8689
version: 3.x
@@ -92,21 +95,23 @@ jobs:
9295
needs: run-determination
9396
if: needs.run-determination.outputs.result == 'true'
9497
runs-on: ubuntu-latest
98+
permissions:
99+
contents: read
95100

96101
steps:
97102
- name: Checkout repository
98-
uses: actions/checkout@v3
103+
uses: actions/checkout@v4
99104

100105
- name: Setup Node.js
101-
uses: actions/setup-node@v3
106+
uses: actions/setup-node@v4
102107
with:
103108
node-version: ${{ env.NODE_VERSION }}
104109

105110
- name: Install Task
106-
uses: arduino/setup-task@v1
111+
uses: arduino/setup-task@v2
107112
with:
108113
repo-token: ${{ secrets.GITHUB_TOKEN }}
109114
version: 3.x
110115

111116
- name: Check links
112-
run: task --silent markdown:check-links
117+
run: task --silent markdown:check-links

.github/workflows/check-workflows-task.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Source: https://github.com/arduino/tooling-project-assets/blob/master/workflow-templates/check-workflows-task.md
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-workflows-task.md
22
name: Check Workflows
33

44
env:
@@ -28,21 +28,23 @@ on:
2828
jobs:
2929
validate:
3030
runs-on: ubuntu-latest
31+
permissions:
32+
contents: read
3133

3234
steps:
3335
- name: Checkout repository
34-
uses: actions/checkout@v3
36+
uses: actions/checkout@v4
3537

3638
- name: Setup Node.js
37-
uses: actions/setup-node@v3
39+
uses: actions/setup-node@v4
3840
with:
3941
node-version: ${{ env.NODE_VERSION }}
4042

4143
- name: Install Task
42-
uses: arduino/setup-task@v1
44+
uses: arduino/setup-task@v2
4345
with:
4446
repo-token: ${{ secrets.GITHUB_TOKEN }}
4547
version: 3.x
4648

4749
- name: Validate workflows
48-
run: task --silent ci:validate
50+
run: task --silent ci:validate

.github/workflows/release.yml

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
name: build (${{ matrix.config.os }}, ${{ matrix.config.arch }})
1919
runs-on:
2020
ubuntu-latest
21+
permissions:
22+
contents: read
2123
strategy:
2224
matrix:
2325
config:
@@ -53,25 +55,22 @@ jobs:
5355
id: get_tag_name
5456
run: |
5557
TAG="${GITHUB_REF##*/}"
56-
echo ::set-output name=AVRDUDE_TAG::v${TAG%%-*}
58+
echo "AVRDUDE_TAG=v${TAG%%-*}" >> $GITHUB_OUTPUT
59+
echo "ARDUINO_TAG=-${TAG#*-}" >> $GITHUB_OUTPUT
5760
5861
# this repo should contain only the patches that could not be upstreamed and the release CI nothing else
5962
- name: Checkout avrdude-packing repository
60-
uses: actions/checkout@v3
63+
uses: actions/checkout@v4
6164
with:
6265
path: avrdude-packing
6366

6467
- name: Checkout avrdude repository
65-
uses: actions/checkout@v3
68+
uses: actions/checkout@v4
6669
with:
6770
repository: avrdudes/avrdude
6871
ref: ${{ steps.get_tag_name.outputs.AVRDUDE_TAG }} # pay attention, the pathches could need updating
6972
path: ${{ env.PROJECT_NAME }}
7073

71-
- name: Set the version
72-
working-directory: avrdude-packing/patches/
73-
run: perl -pi -e "s/ARDUINO_VERSION_PLACEHOLDER/${GITHUB_REF##*/}/g" 0008-Append-arduino-to-version-string.patch
74-
7574
- name: Apply patches
7675
working-directory: ${{ env.PROJECT_NAME }}
7776
run: git apply -v ../avrdude-packing/patches/*.patch
@@ -88,11 +87,13 @@ jobs:
8887
run: |
8988
if [ "${{ matrix.config.os }}" = "macOS" ]; then
9089
# For darwin we disable the static flags (not supported by clang) and we make some adjustments
91-
cmake -DCMAKE_C_COMPILER=${{ matrix.config.cross_compiler }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cross_compiler }}++ -DCMAKE_AR=${{ matrix.config.ar }} -DCMAKE_LINKER=${{ matrix.config.ld}} -DCMAKE_EXE_LINKER_FLAGS="-L/opt/lib/${{ matrix.config.cross_compile }}/lib/" -DCMAKE_C_FLAGS="-I/opt/lib/${{ matrix.config.cross_compile }}/include -pthread -framework Foundation -framework IOKit -framework Cocoa -framework Security -DHAVE_USB_H" -DCMAKE_PREFIX_PATH=/opt/lib/${{ matrix.config.cross_compile }}/ -DHAVE_LIBFTDI="NO" -DUSE_STATIC_LIBS="ON" -B build/
90+
cmake -DCMAKE_C_COMPILER=${{ matrix.config.cross_compiler }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cross_compiler }}++ -DCMAKE_AR=${{ matrix.config.ar }} -DCMAKE_LINKER=${{ matrix.config.ld}} -DCMAKE_EXE_LINKER_FLAGS="-L/opt/lib/${{ matrix.config.cross_compile }}/lib/" -DCMAKE_C_FLAGS="-I/opt/lib/${{ matrix.config.cross_compile }}/include -pthread -framework Foundation -framework IOKit -framework Cocoa -framework Security -DHAVE_USB_H" -DCMAKE_PREFIX_PATH=/opt/lib/${{ matrix.config.cross_compile }}/ -DHAVE_LIBFTDI="NO" -DUSE_STATIC_LIBS="ON" -DEXTRA_VERSION=${{ env.ARDUINO_TAG }} -B build/
9291
else
93-
cmake -DCMAKE_C_COMPILER=${{ matrix.config.cross_compile }}-gcc -DCMAKE_CXX_COMPILER=${{ matrix.config.cross_compile }}-g++ -DCMAKE_EXE_LINKER_FLAGS="-static-libgcc -static-libstdc++" -DCMAKE_C_FLAGS="-I/opt/lib/${{ matrix.config.cross_compile }}/include/libusb-1.0/ -I/opt/lib/${{ matrix.config.cross_compile }}/include -pthread" -DCMAKE_PREFIX_PATH=/opt/lib/${{ matrix.config.cross_compile }}/ -DHAVE_LIBFTDI="NO" -DUSE_STATIC_LIBS="ON" -B build/
92+
cmake -DCMAKE_C_COMPILER=${{ matrix.config.cross_compile }}-gcc -DCMAKE_CXX_COMPILER=${{ matrix.config.cross_compile }}-g++ -DCMAKE_EXE_LINKER_FLAGS="-static-libgcc -static-libstdc++" -DCMAKE_C_FLAGS="-I/opt/lib/${{ matrix.config.cross_compile }}/include/libusb-1.0/ -I/opt/lib/${{ matrix.config.cross_compile }}/include -pthread" -DCMAKE_PREFIX_PATH=/opt/lib/${{ matrix.config.cross_compile }}/ -DHAVE_LIBFTDI="NO" -DUSE_STATIC_LIBS="ON" -DEXTRA_VERSION=${{ env.ARDUINO_TAG }} -B build/
9493
fi
9594
cmake --build build/ -v
95+
env:
96+
ARDUINO_TAG: ${{ steps.get_tag_name.outputs.ARDUINO_TAG }}
9697

9798
- name: Package
9899
working-directory: ${{ env.PROJECT_NAME }}
@@ -105,24 +106,26 @@ jobs:
105106
tar -czv ${{ env.PROJECT_NAME }}_${{ matrix.config.os }}_${{ matrix.config.arch }} -f ${{ env.PROJECT_NAME }}_${GITHUB_REF##*/}_${{ matrix.config.os }}_${{ matrix.config.arch }}.tar.gz
106107
107108
- name: Upload artifacts
108-
uses: actions/upload-artifact@v3
109+
uses: actions/upload-artifact@v4
109110
with:
110111
if-no-files-found: error
111-
name: ${{ env.ARTIFACT_NAME }}
112+
name: ${{ env.ARTIFACT_NAME }}_${{ matrix.config.os }}_${{ matrix.config.arch }}
112113
path: ${{ env.PROJECT_NAME }}/${{ env.PROJECT_NAME }}_*
113114

114115
notarize-macos:
115116
runs-on: macos-latest
116117
needs: build
118+
permissions:
119+
contents: read
117120

118121
steps:
119122
- name: Checkout repository
120-
uses: actions/checkout@v3
123+
uses: actions/checkout@v4
121124

122125
- name: Download artifacts
123-
uses: actions/download-artifact@v3
126+
uses: actions/download-artifact@v4
124127
with:
125-
name: ${{ env.ARTIFACT_NAME }}
128+
name: ${{ env.ARTIFACT_NAME }}_macOS_64bit
126129
path: ${{ env.DIST_DIR }}
127130

128131
- name: Import Code-Signing Certificates
@@ -173,26 +176,30 @@ jobs:
173176
-C ${{ env.DIST_DIR }}/ ${{ env.PROJECT_NAME }}_macOS_64bit/
174177
175178
- name: Upload artifacts
176-
uses: actions/upload-artifact@v3
179+
uses: actions/upload-artifact@v4
177180
with:
178181
if-no-files-found: error
179-
name: ${{ env.ARTIFACT_NAME }}
182+
name: ${{ env.ARTIFACT_NAME }}_macOS_64bit
180183
path: ${{ env.DIST_DIR }}
181-
184+
overwrite: true
185+
182186
create-release:
183187
runs-on:
184188
ubuntu-latest
189+
permissions:
190+
contents: write
185191
needs: [build, notarize-macos]
186192

187193
steps:
188194
- name: Checkout repository # we need package_index.template
189-
uses: actions/checkout@v3
195+
uses: actions/checkout@v4
190196

191197
- name: Download artifact
192-
uses: actions/download-artifact@v3
198+
uses: actions/download-artifact@v4
193199
with:
194-
name: ${{ env.ARTIFACT_NAME }}
200+
pattern: ${{ env.ARTIFACT_NAME }}*
195201
path: ${{ env.DIST_DIR }}
202+
merge-multiple: true
196203

197204
- name: Identify Prerelease
198205
# This is a workaround while waiting for create-release action
@@ -201,7 +208,7 @@ jobs:
201208
run: |
202209
wget -q -P /tmp https://github.com/fsaintjacques/semver-tool/archive/3.2.0.zip
203210
unzip -p /tmp/3.2.0.zip semver-tool-3.2.0/src/semver >/tmp/semver && chmod +x /tmp/semver
204-
if [[ "$(/tmp/semver get prerel "${GITHUB_REF/refs\/tags\//}")" ]]; then echo "::set-output name=IS_PRE::true"; fi
211+
if [[ "$(/tmp/semver get prerel "${GITHUB_REF/refs\/tags\//}")" ]]; then echo "IS_PRE=true" >> $GITHUB_OUTPUT; fi
205212
206213
- name: Generate package index entry
207214
run: |

.github/workflows/sync-labels.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@ env:
2424
jobs:
2525
check:
2626
runs-on: ubuntu-latest
27+
permissions:
28+
contents: read
2729

2830
steps:
2931
- name: Checkout repository
30-
uses: actions/checkout@v3
32+
uses: actions/checkout@v4
3133

3234
- name: Download JSON schema for labels configuration file
3335
id: download-schema
34-
uses: carlosperate/download-file-action@v1
36+
uses: carlosperate/download-file-action@v2
3537
with:
3638
file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/arduino-tooling-gh-label-configuration-schema.json
3739
location: ${{ runner.temp }}/label-configuration-schema
@@ -55,6 +57,7 @@ jobs:
5557
download:
5658
needs: check
5759
runs-on: ubuntu-latest
60+
permissions: {}
5861

5962
strategy:
6063
matrix:
@@ -64,24 +67,28 @@ jobs:
6467
- universal.yml
6568
- tooling.yml
6669

70+
6771
steps:
6872
- name: Download
69-
uses: carlosperate/download-file-action@v1
73+
uses: carlosperate/download-file-action@v2
7074
with:
7175
file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }}
7276

7377
- name: Pass configuration files to next job via workflow artifact
74-
uses: actions/upload-artifact@v3
78+
uses: actions/upload-artifact@v4
7579
with:
7680
path: |
7781
*.yaml
7882
*.yml
7983
if-no-files-found: error
80-
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
84+
name: ${{ env.CONFIGURATIONS_ARTIFACT }}-${{ matrix.filename }}
8185

8286
sync:
8387
needs: download
8488
runs-on: ubuntu-latest
89+
permissions:
90+
contents: read
91+
issues: write
8592

8693
steps:
8794
- name: Set environment variables
@@ -103,21 +110,22 @@ jobs:
103110
run: |
104111
# Use of this flag in the github-label-sync command will cause it to only check the validity of the
105112
# configuration.
106-
echo "::set-output name=flag::--dry-run"
113+
echo "flag=--dry-run" >> $GITHUB_OUTPUT
107114
108115
- name: Checkout repository
109-
uses: actions/checkout@v3
116+
uses: actions/checkout@v4
110117

111118
- name: Download configuration files artifact
112-
uses: actions/download-artifact@v3
119+
uses: actions/download-artifact@v4
113120
with:
114-
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
121+
pattern: ${{ env.CONFIGURATIONS_ARTIFACT }}-*
122+
merge-multiple: true
115123
path: ${{ env.CONFIGURATIONS_FOLDER }}
116124

117125
- name: Remove unneeded artifact
118-
uses: geekyeggo/delete-artifact@v1
126+
uses: geekyeggo/delete-artifact@v5
119127
with:
120-
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
128+
name: ${{ env.CONFIGURATIONS_ARTIFACT }}-*
121129

122130
- name: Merge label configuration files
123131
run: |
@@ -136,4 +144,4 @@ jobs:
136144
github-label-sync \
137145
--labels "${{ env.MERGED_CONFIGURATION_PATH }}" \
138146
${{ steps.dry-run.outputs.flag }} \
139-
${{ github.repository }}
147+
${{ github.repository }}

0 commit comments

Comments
 (0)