Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 32 additions & 13 deletions .github/workflows/package_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,17 @@ jobs:
with:
name: test-data
path: test-data/
overwrite: true
retention-days: 1

- name: Archive build environment
uses: actions/upload-artifact@v7
with:
name: build-env
name: build-env.tar.zstd
path: ~/build-env.tar.zstd
retention-days: 1
archive: false
overwrite: true
retention-days: 1



Expand Down Expand Up @@ -245,33 +247,40 @@ jobs:
ls reports/* >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV

# Preprare an archive of the built binaries (and build dir on failure)
[ "${{ job.status }}" == "failure" ] && FULL_BUILD_DIR="build/${{ matrix.variant }}/"
# Preprare an archive of the built binaries (and build dir on failure).
# Prefix the name with 'failed-' if the build failed, so that it is not removed.
BINARIES_FILE=binaries-${ARTIFACT_TAG}.tar.zstd
if [ "${{ job.status }}" == "failure" ] ; then
FULL_BUILD_DIR="build/${{ matrix.variant }}/"
BINARIES_FILE=failed-${BINARIES_FILE}
fi
echo "BINARIES_FILE=${BINARIES_FILE}" >> $GITHUB_ENV
sed -e '/^#/d' boards.local.txt > boards.local_${{ matrix.variant }}.txt
tar chf - \
firmwares/*${{ matrix.variant }}* \
variants/${{ matrix.variant }}/ \
boards.local_${{ matrix.variant }}.txt \
cores/arduino/api/ \
${FULL_BUILD_DIR} \
| zstd > binaries-${ARTIFACT_TAG}.tar.zstd
| zstd > ${BINARIES_FILE}

- name: Archive board binaries
if: ${{ steps.restore-env.outcome == 'success' && !cancelled() }}
uses: actions/upload-artifact@v7
with:
# prefix the name with 'failed-' if the build failed, so that it is not removed
name: ${{ format('{0}binaries-{1}', (job.status == 'failure') && 'failed-' || '', env.ARTIFACT_TAG) }}
path: binaries-${{ env.ARTIFACT_TAG }}.tar.zstd
retention-days: 7 # for failed build inspection
name: ${{ env.BINARIES_FILE }}
path: ${{ env.BINARIES_FILE }}
archive: false
overwrite: true
retention-days: 7 # for failed build inspection

- name: Archive build reports
if: ${{ steps.restore-env.outcome == 'success' && !cancelled() }}
uses: actions/upload-artifact@v7
with:
name: build-report-${{ env.ARTIFACT_TAG }}
path: ${{ env.REPORT_FILES }}
overwrite: true
retention-days: 1


Expand Down Expand Up @@ -330,6 +339,7 @@ jobs:
name: ${{ env.CORE_ARTIFACT }}
path: distrib/${{ env.CORE_ARTIFACT }}
archive: false
overwrite: true

- name: Archive artifact ID
run: |
Expand All @@ -339,6 +349,7 @@ jobs:
with:
name: artifact-id-${{ matrix.artifact }}
path: ${{ matrix.artifact }}.id
overwrite: true



Expand Down Expand Up @@ -408,6 +419,7 @@ jobs:
name: ${{ env.PACKAGE_INDEX_FILE }}
path: ${{ env.PACKAGE_INDEX_FILE }}
archive: false
overwrite: true

- name: Display final URL in the summary
run: |
Expand Down Expand Up @@ -539,6 +551,7 @@ jobs:
with:
name: test-report-${{ env.ARTIFACT_TAG }}
path: sketches-reports/*
overwrite: true
retention-days: 1


Expand Down Expand Up @@ -614,6 +627,7 @@ jobs:
with:
name: build-metadata
path: build_info.json
overwrite: true
retention-days: 1

# upload comment request artifact (will be retrieved by leave_pr_comment.yml)
Expand All @@ -623,6 +637,7 @@ jobs:
with:
name: comment-request
path: comment-request/
overwrite: true
retention-days: 1

# upload size delta report artifact (will be retrieved by report_size_deltas.yml)
Expand All @@ -632,26 +647,29 @@ jobs:
with:
name: sketches-reports
path: sketches-reports/
overwrite: true
retention-days: 1

# upload new official test size artifact (for AWS storage)
- name: Archive sketch size information
uses: actions/upload-artifact@v7
if: ${{ github.event_name == 'push' }}
with:
name: size-reports
name: size-reports-${{ needs.build-env.outputs.CORE_HASH }}.tar.bz2
path: size-reports-${{ needs.build-env.outputs.CORE_HASH }}.tar.bz2
retention-days: 1
archive: false
overwrite: true
retention-days: 1

# upload input set of build reports artifact (for CI debugging)
- name: Archive input test reports
uses: actions/upload-artifact@v7
with:
name: build-reports
name: build-reports-${{ needs.build-env.outputs.CORE_HASH }}.tar.bz2
path: build-reports-${{ needs.build-env.outputs.CORE_HASH }}.tar.bz2
retention-days: 1
archive: false
overwrite: true
retention-days: 1

# The last line makes the job fail if the 'result' file does not contain "PASSED".
# No further actions are allowed in case of error.
Expand Down Expand Up @@ -774,6 +792,7 @@ jobs:
with:
name: snippets-${{ env.CORE_TAG }}
path: snippets/
overwrite: true



Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/package_tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,15 @@ jobs:
path: |
distrib/*.tar.gz
distrib/*.zip
overwrite: true
retention-days: 7

- name: Upload JSON snippet
uses: actions/upload-artifact@v7
with:
name: snippet-${{ matrix.tool }}-${{ matrix.version }}
path: snippets/
overwrite: true

# Upload the built tool packages to the S3 bucket for public distribution.

Expand Down
2 changes: 1 addition & 1 deletion extra/ci_collect_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def log_test(artifact, board, sketch, link_mode, exceptions, status, issues, job

reports = report_data.get('boards', [{}])[0].get('sketches', [])
if not reports:
log_test(artifact, board, 'CI test', '', [], FAILURE, "Test report for {link_mode} is empty, check CI log.", job_link)
log_test(artifact, board, 'CI test', '', [], FAILURE, f"Test report for {link_mode} is empty, check CI log.", job_link)
continue # Skip to the next board

# Iterate through individual sketch reports
Expand Down
2 changes: 1 addition & 1 deletion extra/ci_generate_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def print_summary():
f_print(f"<td align='center'>{res.status.board_icon}</td>")
if res.status == FAILURE:
f_print(f"<td colspan='5'>")
f_print("<br>".join(f"{test.issues[0]} (<a href='{test.job_link}'>full log</a>)" for test in res.tests))
f_print("<br>".join(f"{test.issues[0]} (<a href='{test.job_link}'>full log</a>)" for test in res.tests if test.status == FAILURE and test.issues))
f_print("</td></tr>")
continue

Expand Down
Loading