Skip to content

Commit 27b1cb5

Browse files
authored
Update build.yml
1 parent c5af77d commit 27b1cb5

File tree

1 file changed

+3
-36
lines changed

1 file changed

+3
-36
lines changed

.github/workflows/build.yml

+3-36
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,14 @@ env:
139139
container: |
140140
null
141141
job-transfer-artifact-suffix: ARM_64bit
142-
mergeable-channel-file: 'true'
142+
mergeable-channel-file: 'false'
143143
artifacts:
144-
- path: '*Linux_arm64.zip'
145-
name: Linux_arm64_zip
146-
- path: '*Linux_arm64.AppImage'
147-
name: Linux_arm64_app_image
144+
- path: '*ARM_64bit.tar.gz'
145+
name: ARM_64bit_tarball
148146
PAID_RUNNER_BUILD_DATA: |
149147
# This system was implemented to allow selective use of paid GitHub-hosted runners, due to the Apple Silicon runner
150148
# incurring a charge at that time. Free Apple Silicon runners are now available so the configuration was moved to
151149
# `BASE_BUILD_DATA`, but the system was left in place for future use.
152-
153150
jobs:
154151
run-determination:
155152
runs-on: ubuntu-latest
@@ -172,9 +169,7 @@ jobs:
172169
# There is no need to run the other jobs.
173170
RESULT="false"
174171
fi
175-
176172
echo "result=$RESULT" >> $GITHUB_OUTPUT
177-
178173
build-type-determination:
179174
needs: run-determination
180175
if: needs.run-determination.outputs.result == 'true'
@@ -211,13 +206,11 @@ jobs:
211206
is_nightly="false"
212207
channel_name="nightly"
213208
fi
214-
215209
echo "is-release=$is_release" >> $GITHUB_OUTPUT
216210
echo "is-nightly=$is_nightly" >> $GITHUB_OUTPUT
217211
echo "channel-name=$channel_name" >> $GITHUB_OUTPUT
218212
# Only attempt upload to Amazon S3 if the credentials are available.
219213
echo "publish-to-s3=${{ secrets.AWS_ROLE_ARN != '' }}" >> $GITHUB_OUTPUT
220-
221214
select-targets:
222215
needs: build-type-determination
223216
runs-on: ubuntu-latest
@@ -244,7 +237,6 @@ jobs:
244237
--output-format json \
245238
'[.[].config]'
246239
)"
247-
248240
artifact_matrix="$(
249241
(
250242
echo "${{ env.BASE_BUILD_DATA }}";
@@ -254,43 +246,35 @@ jobs:
254246
--output-format json \
255247
'map(.artifacts[] + (.config | pick(["job-transfer-artifact-suffix"])))'
256248
)"
257-
258249
# The build matrix produces two macOS jobs (x86 and ARM) so the "channel update info files"
259250
# generated by each must be merged.
260251
merge_channel_files="true"
261-
262252
else
263253
build_matrix="$(
264254
echo "${{ env.BASE_BUILD_DATA }}" | \
265255
yq \
266256
--output-format json \
267257
'[.[].config]'
268258
)"
269-
270259
artifact_matrix="$(
271260
echo "${{ env.BASE_BUILD_DATA }}" | \
272261
yq \
273262
--output-format json \
274263
'map(.artifacts[] + (.config | pick(["job-transfer-artifact-suffix"])))'
275264
)"
276-
277265
merge_channel_files="false"
278266
fi
279-
280267
# Set workflow step outputs.
281268
# See: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
282269
delimiter="$RANDOM"
283270
echo "build-matrix<<$delimiter" >> $GITHUB_OUTPUT
284271
echo "$build_matrix" >> $GITHUB_OUTPUT
285272
echo "$delimiter" >> $GITHUB_OUTPUT
286-
287273
delimiter="$RANDOM"
288274
echo "artifact-matrix<<$delimiter" >> $GITHUB_OUTPUT
289275
echo "$artifact_matrix" >> $GITHUB_OUTPUT
290276
echo "$delimiter" >> $GITHUB_OUTPUT
291-
292277
echo "merge-channel-files=$merge_channel_files" >> $GITHUB_OUTPUT
293-
294278
build:
295279
name: build (${{ matrix.config.name }})
296280
needs:
@@ -331,7 +315,6 @@ jobs:
331315
if: runner.os == 'Windows' && matrix.config.working-directory
332316
run: |
333317
if not exist "${{ matrix.config.working-directory }}" mklink /d "${{ matrix.config.working-directory }}" "C:\actions-runner\_work\arduino-ide\arduino-ide"
334-
335318
- name: Checkout
336319
uses: actions/checkout@v4
337320

@@ -352,7 +335,6 @@ jobs:
352335
install \
353336
--global \
354337
"yarn@${{ env.YARN_VERSION }}"
355-
356338
- name: Install Python 3.x
357339
if: fromJSON(matrix.config.container) == null && runner.name != 'WINDOWS-SIGN-PC'
358340
uses: actions/setup-python@v5
@@ -392,15 +374,12 @@ jobs:
392374
export CSC_KEY_PASSWORD="${{ secrets[matrix.config.certificate-password-secret] }}"
393375
export CSC_FOR_PULL_REQUEST=true
394376
fi
395-
396377
npx node-gyp install
397378
yarn install
398-
399379
yarn --cwd arduino-ide-extension build
400380
yarn --cwd electron-app rebuild
401381
yarn --cwd electron-app build
402382
yarn --cwd electron-app package
403-
404383
# Both macOS jobs generate a "channel update info file" with same path and name. The second job to complete would
405384
# overwrite the file generated by the first in the workflow artifact.
406385
- name: Stage channel file for merge
@@ -414,11 +393,9 @@ jobs:
414393
mv \
415394
"${{ env.BUILD_ARTIFACTS_PATH }}/${{ needs.build-type-determination.outputs.channel-name }}-mac.yml" \
416395
"${staged_channel_files_path}/${{ needs.build-type-determination.outputs.channel-name }}-mac-${{ runner.arch }}.yml"
417-
418396
# Set workflow environment variable for use in other steps.
419397
# See: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
420398
echo "STAGED_CHANNEL_FILES_PATH=$staged_channel_files_path" >> "$GITHUB_ENV"
421-
422399
- name: Upload staged-for-merge channel file artifact
423400
uses: actions/upload-artifact@v4
424401
if: >
@@ -440,7 +417,6 @@ jobs:
440417
shell: cmd
441418
run: |
442419
rmdir /s /q "${{ matrix.config.working-directory }}\${{ env.BUILD_ARTIFACTS_PATH }}"
443-
444420
merge-channel-files:
445421
needs:
446422
- build-type-determination
@@ -454,7 +430,6 @@ jobs:
454430
run: |
455431
# See: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
456432
echo "CHANNEL_FILES_PATH=${{ runner.temp }}/channel-files" >> "$GITHUB_ENV"
457-
458433
- name: Checkout
459434
uses: actions/checkout@v4
460435

@@ -493,7 +468,6 @@ jobs:
493468
run: |
494469
sudo apt-get update
495470
sudo apt-get install -y libx11-dev libxkbfile-dev libsecret-1-dev
496-
497471
- name: Install dependencies
498472
run: yarn
499473

@@ -503,7 +477,6 @@ jobs:
503477
./scripts/merge-channel-files.js \
504478
--channel "${{ needs.build-type-determination.outputs.channel-name }}" \
505479
--input "${{ env.CHANNEL_FILES_PATH }}"
506-
507480
- name: Upload merged channel files job transfer artifact
508481
uses: actions/upload-artifact@v4
509482
with:
@@ -570,16 +543,13 @@ jobs:
570543
fi
571544
fi
572545
echo -e "$BODY"
573-
574546
# Set workflow step output
575547
# See: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
576548
DELIMITER="$RANDOM"
577549
echo "BODY<<$DELIMITER" >> $GITHUB_OUTPUT
578550
echo "$BODY" >> $GITHUB_OUTPUT
579551
echo "$DELIMITER" >> $GITHUB_OUTPUT
580-
581552
echo "$BODY" > CHANGELOG.txt
582-
583553
- name: Upload changelog job transfer artifact
584554
if: needs.build-type-determination.outputs.is-nightly == 'true'
585555
uses: actions/upload-artifact@v4
@@ -630,7 +600,6 @@ jobs:
630600
- name: Publish Nightly [S3]
631601
run: |
632602
aws s3 sync ${{ env.ARTIFACTS_FOLDER }} s3://${{ secrets.DOWNLOADS_BUCKET }}/arduino-ide/nightly
633-
634603
release:
635604
needs:
636605
- build-type-determination
@@ -668,7 +637,6 @@ jobs:
668637
id: tag_name
669638
run: |
670639
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
671-
672640
- name: Publish Release [GitHub]
673641
uses: svenstaro/[email protected]
674642
with:
@@ -690,7 +658,6 @@ jobs:
690658
if: needs.build-type-determination.outputs.publish-to-s3 == 'true'
691659
run: |
692660
aws s3 sync ${{ env.ARTIFACTS_FOLDER }} s3://${{ secrets.DOWNLOADS_BUCKET }}/arduino-ide
693-
694661
clean:
695662
# This job must run after all jobs that use the transfer artifact.
696663
needs:

0 commit comments

Comments
 (0)