|
88 | 88 | results_artifact: fenics_results_linear-elastic-plate-with-hole |
89 | 89 | rocrate_filename: Fenics-RoCrate.zip |
90 | 90 | plot_filename: fenics-element-size-vs-stress-plot.pdf |
91 | | - |
92 | 91 | steps: |
93 | 92 | - name: Checkout repo content |
94 | 93 | uses: actions/checkout@v2 |
@@ -133,4 +132,43 @@ jobs: |
133 | 132 | with: |
134 | 133 | name: ${{ matrix.tool_slug }}-element-size-vs-stress-plot |
135 | 134 | path: ${{ matrix.plot_filename }} |
| 135 | + |
| 136 | + - name: Upload ${{ matrix.software_name }} aggregate RO-Crate artifact |
| 137 | + uses: actions/upload-artifact@v4 |
| 138 | + with: |
| 139 | + name: ${{ matrix.tool_slug }}-aggregate-rocrate |
| 140 | + path: ${{ matrix.rocrate_filename }} |
| 141 | + |
| 142 | + - name: Upload ${{ matrix.software_name }} RO-Crate Zip file onto RoHub |
| 143 | + id: rohub_upload |
| 144 | + shell: bash -l {0} |
| 145 | + continue-on-error: true |
| 146 | + run: | |
| 147 | + LOG_FILE="${GITHUB_WORKSPACE}/rohub_upload_${{ matrix.tool_slug }}_error.log" |
| 148 | +
|
| 149 | + OUTPUT="$( |
| 150 | + python benchmarks/common/upload_provenance.py \ |
| 151 | + --provenance_folderpath "./${{ matrix.rocrate_filename }}" \ |
| 152 | + --benchmark_name "linear-elastic-plate-with-hole-${{ matrix.tool_slug }}" \ |
| 153 | + --username "${{ secrets.ROHUB_USERNAME }}" \ |
| 154 | + --password "${{ secrets.ROHUB_PASSWORD }}" \ |
| 155 | + 2>&1 |
| 156 | + )" |
| 157 | + PYTHON_EXIT_CODE=$? |
| 158 | +
|
| 159 | + if [ "$PYTHON_EXIT_CODE" -eq 0 ]; then |
| 160 | + echo "RoHub upload succeeded" |
| 161 | + rm -f "$LOG_FILE" || true |
| 162 | + else |
| 163 | + echo "=== RoHub upload failed, writing log to $LOG_FILE ===" |
| 164 | + printf '%s\n' "$OUTPUT" | tee "$LOG_FILE" |
| 165 | + fi |
| 166 | +
|
| 167 | + - name: Upload ${{ matrix.software_name }} RoHub error log |
| 168 | + if: always() |
| 169 | + uses: actions/upload-artifact@v4 |
| 170 | + with: |
| 171 | + name: ${{ matrix.tool_slug }}-rohub-upload-error-log |
| 172 | + path: ${{ github.workspace }}/rohub_upload_${{ matrix.tool_slug }}_error.log |
| 173 | + if-no-files-found: ignore |
136 | 174 |
|
0 commit comments