From 10d8a5f33007d67f24dce446829a0fb6548446dd Mon Sep 17 00:00:00 2001 From: Shun Hasegawa Date: Wed, 16 Oct 2024 13:03:45 +0900 Subject: [PATCH 1/4] upload/download-artifact@v2 is deprecated and fails, see https://github.blog/changelog/2024-02-13-deprecation-notice-v1-and-v2-of-the-artifact-actions/ --- .github/workflows/compile-examples.yml | 2 +- .github/workflows/compile-muxto.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index 07382034..b5db7607 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -148,7 +148,7 @@ jobs: sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} - name: Save memory usage change report as artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: path: ${{ env.SKETCHES_REPORTS_PATH }} name: ${{ env.SKETCHES_REPORTS_PATH }} diff --git a/.github/workflows/compile-muxto.yml b/.github/workflows/compile-muxto.yml index 881699af..b8c3542f 100644 --- a/.github/workflows/compile-muxto.yml +++ b/.github/workflows/compile-muxto.yml @@ -70,14 +70,14 @@ jobs: sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} - name: Save firmware binary as workflow artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: if-no-files-found: error path: ${{ env.BINARY_OUTPUT_PATH }}/${{ env.BINARY_FILENAME }} name: ${{ env.BINARY_ARTIFACT_NAME }} - name: Save sketches report as workflow artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: if-no-files-found: error path: ${{ env.SKETCHES_REPORTS_PATH }} @@ -89,7 +89,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download binary artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: ${{ env.BINARY_ARTIFACT_NAME }} From 715d01021a348ab455fdd093d54e329ea4f88d17 Mon Sep 17 00:00:00 2001 From: Shun Hasegawa Date: Wed, 16 Oct 2024 13:34:38 +0900 Subject: [PATCH 2/4] Unique artifact names for matrix versions, see https://github.com/simonw/shot-scraper/issues/141 --- .github/workflows/compile-examples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index b5db7607..948e06b1 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -151,4 +151,4 @@ jobs: uses: actions/upload-artifact@v4 with: path: ${{ env.SKETCHES_REPORTS_PATH }} - name: ${{ env.SKETCHES_REPORTS_PATH }} + name: ${{ env.SKETCHES_REPORTS_PATH }}-${{ matrix.board.fqbn }} From 5530e05f5fc7f2a2191dc52ef1653281f6f1e81d Mon Sep 17 00:00:00 2001 From: Shun Hasegawa Date: Wed, 16 Oct 2024 13:56:34 +0900 Subject: [PATCH 3/4] Colon cannot be used in artifact names --- .github/workflows/compile-examples.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index 948e06b1..5f36568d 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -147,8 +147,16 @@ jobs: enable-deltas-report: 'true' sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} + # Generate unique artifact name without colon + - name: Generate artifact name + env: + FQBN: ${{ matrix.board.fqbn }} + id: artifact-namer + run: | + ARTIFACT_NAME="${{ env.SKETCHES_REPORTS_PATH }}-${FQBN//:/_}" + echo "name=$ARTIFACT_NAME" >> "$GITHUB_OUTPUT" - name: Save memory usage change report as artifact uses: actions/upload-artifact@v4 with: path: ${{ env.SKETCHES_REPORTS_PATH }} - name: ${{ env.SKETCHES_REPORTS_PATH }}-${{ matrix.board.fqbn }} + name: ${{ steps.artifact-namer.outputs.name }} From b594a113ff883e30a7bc319e451d6850b5149437 Mon Sep 17 00:00:00 2001 From: Shun Hasegawa Date: Wed, 16 Oct 2024 17:27:52 +0900 Subject: [PATCH 4/4] Fix compile-muxto with Fab_SAM_Arduino:samd@1.12.0 --- .github/workflows/compile-muxto.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/compile-muxto.yml b/.github/workflows/compile-muxto.yml index b8c3542f..8163ddd9 100644 --- a/.github/workflows/compile-muxto.yml +++ b/.github/workflows/compile-muxto.yml @@ -32,17 +32,19 @@ jobs: board: - fqbn: arduino:samd:muxto:float=default,config=enabled,clock=internal_usb,timer=timer_732Hz,bootloader=4kb,serial=two_uart,usb=cdc platforms: | - # Install MattairTech_Arduino:samd via Boards Manager for the toolchain - - name: MattairTech_Arduino:samd - source-url: https://www.mattairtech.com/software/arduino/package_MattairTech_index.json - # This needs to match with the version of MattairTech_Arduino:samd the Arduino fork is based on in order to get the right tool versions - version: 1.6.17 + # Install Fab_SAM_Arduino:samd via Boards Manager for the toolchain + - name: Fab_SAM_Arduino:samd + source-url: https://raw.githubusercontent.com/qbolsee/ArduinoCore-fab-sam/master/json/package_Fab_SAM_index.json + # Originally, we installed MattairTech_Arduino:samd@1.6.17 to get the right tool versions because the Arduino fork is based on it. + # However, MattairTech_Arduino:samd is no longer available. + # So we use its successor, Fab_SAM_Arduino:samd, and modify the Arduino fork to work with 1.12.0 + version: 1.12.0 # Install officila samd version for compiler support - name: arduino:samd # Install the platform with MuxTO support - name: arduino:samd - source-url: https://github.com/arduino/ArduinoCore-samd.git - version: muxto + source-url: https://github.com/pazeshun/ArduinoCore-samd.git + version: muxto-fab-sam steps: - name: Set environment variables