You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
timeout-minutes: 120# this usually takes 20-45 minutes (or hangs for 6+ hours).
176
-
run: |
177
-
. install_rms.sh
178
-
179
-
- name: Install Q2DTor
180
-
run: echo "" | make q2dtor
181
-
182
-
# Regression Testing - Test Execution
183
-
- name: Regression Tests - Execution
184
-
id: regression-execution
185
-
run: |
186
-
for regr_test in aromatics liquid_oxidation nitrogen oxidation sulfur superminimal RMS_constantVIdealGasReactor_superminimal RMS_CSTR_liquid_oxidation RMS_liquidSurface_ch4o2cat fragment RMS_constantVIdealGasReactor_fragment minimal_surface;
187
-
do
188
-
if python rmg.py test/regression/"$regr_test"/input.py; then
189
-
echo "$regr_test" "Executed Successfully"
190
-
else
191
-
echo "$regr_test" "Failed to Execute" | tee -a $GITHUB_STEP_SUMMARY
192
-
export FAILED=Yes
193
-
fi
194
-
done
195
-
if [[ ${FAILED} ]]; then
196
-
echo "One or more regression tests could not be executed." | tee -a $GITHUB_STEP_SUMMARY
197
-
echo "Please download the failed results or check the above log to see why." | tee -a $GITHUB_STEP_SUMMARY
198
-
exit 1
199
-
fi
200
-
201
-
# Upload Regression Results as Failed if above step failed
# Upload Regression Results as Stable if Scheduled or Push to Main
211
-
- name: Upload Results as Reference
212
-
# upload the results for scheduled CI (on main) and pushes to main
213
-
if: ${{ env.REFERENCE_JOB == 'true' }}
214
-
uses: actions/upload-artifact@v4
215
-
with:
216
-
name: stable_regression_results
217
-
path: |
218
-
test/regression
219
-
220
-
# Upload Regression Results as Dynamic if Push to non-main Branch
221
-
- name: Upload Results as Dynamic
222
-
if: ${{ env.REFERENCE_JOB == 'false' }}
223
-
uses: actions/upload-artifact@v4
224
-
with:
225
-
name: dynamic_regression_results
226
-
path: |
227
-
test/regression
228
-
229
-
- name: mkdir stable_regression_results
230
-
if: ${{ env.REFERENCE_JOB == 'false' }}
231
-
run: mkdir stable_regression_results
232
-
233
-
# Retrieve Stable Results for reference
234
-
- name: Find ID of Reference Results
235
-
env:
236
-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
237
-
# this will search for the last successful execution of CI on main
238
-
run: |
239
-
run_id=$(gh run list -R ReactionMechanismGenerator/RMG-Py --workflow="Continuous Integration" --branch main --limit 15 --json databaseId,conclusion --jq 'map(select(.conclusion == "success")) | .[0].databaseId')
240
-
if [ -z "$run_id" ] || [ "$run_id" = "null" ]; then
241
-
echo "::error::No successful reference run found"
242
-
exit 1
243
-
fi
244
-
echo "CI_RUN_ID=$run_id" >> $GITHUB_ENV
245
-
246
-
- name: Retrieve Stable Regression Results
247
-
if: ${{ env.REFERENCE_JOB == 'false' }}
248
-
uses: actions/download-artifact@v4
249
-
with:
250
-
# download stable regression results
251
-
run-id: ${{ env.CI_RUN_ID }}
252
-
repository: ReactionMechanismGenerator/RMG-Py
253
-
github-token: ${{ secrets.GITHUB_TOKEN }}
254
-
name: stable_regression_results
255
-
path: stable_regression_results
256
-
257
-
# Regression Testing - Actual Comparisons
258
-
- name: Regression Tests - Compare to Baseline
259
-
id: regression-comparison
260
-
if: ${{ env.REFERENCE_JOB == 'false' }}
261
-
env:
262
-
REFERENCE: stable_regression_results
263
-
run: |
264
-
conda activate rmg_env_without_rms
265
-
266
-
exec 2> >(tee -a regression.stderr >&2) 1> >(tee -a regression.stdout)
267
-
mkdir -p "test/regression-diff"
268
-
for regr_test in aromatics liquid_oxidation nitrogen oxidation sulfur superminimal RMS_constantVIdealGasReactor_superminimal RMS_CSTR_liquid_oxidation fragment RMS_constantVIdealGasReactor_fragment minimal_surface;
echo "" # blank line so next block is interpreted as markdown
298
-
cat "$regr_test-core.log" || (echo "Dumping the whole log failed, please download it from GitHub actions. Here are the first 100 lines:" && head -n100 "$regr_test-core.log")
299
-
echo "</details>"
300
-
if [ -s checkModels.err ]; then
301
-
echo "<details>"
302
-
echo "<summary>Errors occurred during core comparison ⚠️</summary>"
echo "" # blank line so next block is interpreted as markdown
321
-
cat "$regr_test-edge.log" || (echo "Dumping the whole log failed, please download it from GitHub actions. Here are the first 100 lines:" && head -n100 "$regr_test-edge.log")
322
-
echo "</details>"
323
-
if [ -s checkModels.err ]; then
324
-
echo "<details>"
325
-
echo "<summary>Errors occurred during edge comparison ⚠️</summary>"
326
-
cat checkModels.err
327
-
echo "</details>"
328
-
fi
329
-
330
-
# Check for Regression between Reference and Dynamic (skip superminimal)
331
-
if [ -f test/regression/"$regr_test"/regression_input.py ];
0 commit comments