diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 9772ee2..be89f63 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -272,6 +272,7 @@ jobs: with: path: output/dist/cuvslam-docs-${{ needs.check-changes.outputs.package_version }}.tar.gz archive: false + overwrite: true retention-days: 30 if-no-files-found: error @@ -294,6 +295,7 @@ jobs: output/eval/kpi_*.json output/eval/kpi_*.json.table output/eval/kpi_*.json.drift + overwrite: true retention-days: 1 if-no-files-found: warn @@ -303,6 +305,7 @@ jobs: with: name: ${{ env.EVAL_REPORT_ARTIFACT }}-${{ needs.check-changes.outputs.package_version }}-${{ matrix.platform }}-cuda${{ matrix.cuda }}-ubuntu${{ matrix.ubuntu }} path: output/eval/stats/**/report_*.pdf + overwrite: true retention-days: 1 if-no-files-found: warn @@ -315,6 +318,7 @@ jobs: output/cpp-test-results.xml output/python-test-output.txt output/test-summary.txt + overwrite: true retention-days: 1 if-no-files-found: warn @@ -324,6 +328,7 @@ jobs: with: path: output/dist/cuvslam-cpp-${{ needs.check-changes.outputs.package_version }}-${{ matrix.platform }}-cuda${{ matrix.cuda }}-ubuntu${{ matrix.ubuntu }}.tar.gz archive: false + overwrite: true retention-days: 30 if-no-files-found: error @@ -333,6 +338,7 @@ jobs: with: path: output/wheel/*.whl archive: false + overwrite: true retention-days: 30 if-no-files-found: error @@ -349,7 +355,9 @@ jobs: contents: read steps: - name: Download test result artifacts - if: needs.check-changes.outputs.should_build == 'true' + if: >- + needs.check-changes.outputs.should_build == 'true' && + needs.build-and-test.result == 'success' continue-on-error: true uses: actions/download-artifact@v8 with: @@ -357,7 +365,9 @@ jobs: path: artifacts/test-results - name: Download KPI staging artifacts - if: needs.check-changes.outputs.should_build == 'true' + if: >- + needs.check-changes.outputs.should_build == 'true' && + needs.build-and-test.result == 'success' continue-on-error: true uses: actions/download-artifact@v8 with: @@ -365,7 +375,9 @@ jobs: path: artifacts/kpis - name: Download evaluation report staging artifacts - if: needs.check-changes.outputs.should_build == 'true' + if: >- + needs.check-changes.outputs.should_build == 'true' && + needs.build-and-test.result == 'success' continue-on-error: true uses: actions/download-artifact@v8 with: @@ -412,6 +424,17 @@ jobs: exit 0 fi + if [ "${{ needs.build-and-test.result }}" != "success" ]; then + { + echo "Artifact consolidation is deferred until all matrix jobs succeed." + echo "Per-configuration staging artifacts are retained for selective job reruns." + echo "" + } >> "$REPORT" + echo "has_test_results=false" >> "$GITHUB_OUTPUT" + echo "has_reports=false" >> "$GITHUB_OUTPUT" + exit 0 + fi + test_config_count=0 TEST_ARTIFACT_PREFIX="${TEST_RESULTS_ARTIFACT}-${PACKAGE_VERSION}-" for testdir in artifacts/test-results/${TEST_ARTIFACT_PREFIX}*; do @@ -517,6 +540,7 @@ jobs: with: name: test-results-${{ needs.check-changes.outputs.package_version }} path: consolidated/test-results/ + overwrite: true retention-days: 30 if-no-files-found: error @@ -552,12 +576,13 @@ jobs: with: path: consolidated/cuvslam-evaluation-${{ needs.check-changes.outputs.package_version }}.tar.gz archive: false + overwrite: true retention-days: 30 if-no-files-found: error - name: Delete staging artifacts id: finalize-artifacts - if: always() + if: always() && needs.build-and-test.result == 'success' uses: actions/github-script@v7 env: PACKAGE_VERSION: ${{ needs.check-changes.outputs.package_version }}