Skip to content

Commit 192daea

Browse files
committed
github actions CI maintainence
- increment miniconda setup to v3 from v2 - set macos build runner to use intel macs rather than m1, since we don't have binaries for m1 - switch download artifact step to use the official github one, which now allows grabbing artifacts from other runs Resolves ReactionMechanismGenerator#2611 See ReactionMechanismGenerator#2667 for more history asdf
1 parent d426379 commit 192daea

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

.github/workflows/CI.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ env:
5151

5252
jobs:
5353
build-osx:
54-
runs-on: macos-latest
54+
runs-on: macos-13
5555
# skip scheduled runs from forks
5656
if: ${{ !( github.repository != 'ReactionMechanismGenerator/RMG-Py' && github.event_name == 'schedule' ) }}
5757
defaults:
@@ -63,7 +63,7 @@ jobs:
6363

6464
# configures the mamba environment manager and builds the environment
6565
- name: Setup Mambaforge Python 3.7
66-
uses: conda-incubator/setup-miniconda@v2
66+
uses: conda-incubator/setup-miniconda@v3
6767
with:
6868
environment-file: environment.yml
6969
miniforge-variant: Mambaforge
@@ -113,7 +113,7 @@ jobs:
113113

114114
# configures the mamba environment manager and builds the environment
115115
- name: Setup Mambaforge Python 3.7
116-
uses: conda-incubator/setup-miniconda@v2
116+
uses: conda-incubator/setup-miniconda@v3
117117
with:
118118
environment-file: environment.yml
119119
miniforge-variant: Mambaforge
@@ -185,7 +185,7 @@ jobs:
185185
# Upload Regression Results as Failed if above step failed
186186
- name: Upload Failed Results
187187
if: ${{ failure() && steps.regression-execution.conclusion == 'failure' }}
188-
uses: actions/upload-artifact@v3
188+
uses: actions/upload-artifact@v4
189189
with:
190190
name: failed_regression_results
191191
path: |
@@ -195,7 +195,7 @@ jobs:
195195
- name: Upload Results as Reference
196196
# upload the results for scheduled CI (on main) and pushes to main
197197
if: ${{ env.REFERENCE_JOB == 'true' }}
198-
uses: actions/upload-artifact@v3
198+
uses: actions/upload-artifact@v4
199199
with:
200200
name: stable_regression_results
201201
path: |
@@ -204,7 +204,7 @@ jobs:
204204
# Upload Regression Results as Dynamic if Push to non-main Branch
205205
- name: Upload Results as Dynamic
206206
if: ${{ env.REFERENCE_JOB == 'false' }}
207-
uses: actions/upload-artifact@v3
207+
uses: actions/upload-artifact@v4
208208
with:
209209
name: dynamic_regression_results
210210
path: |
@@ -215,23 +215,24 @@ jobs:
215215
run: mkdir stable_regression_results
216216

217217
# Retrieve Stable Results for reference
218-
# Will need to use this -> https://github.com/dawidd6/action-download-artifact
218+
- name : Find ID of Reference Results
219+
env:
220+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
221+
run: |
222+
run_id=$(gh run list -R ReactionMechanismGenerator/RMG-Py --workflow="Continuous Integration" --branch main --limit 1 --json databaseId --jq '.[0].databaseId')
223+
echo "CI_RUN_ID=$run_id" >> $GITHUB_ENV
224+
219225
- name: Retrieve Stable Regression Results
220226
if: ${{ env.REFERENCE_JOB == 'false' }}
221-
uses: dsnopek/action-download-artifact@91dda23aa09c68860977dd0ed11d93c0ed3795e7 # see https://github.com/ReactionMechanismGenerator/RMG-Py/pull/2459#issuecomment-1582850815
227+
uses: actions/download-artifact@v4
222228
with:
223229
# this will search for the last successful execution of CI on main and download
224230
# the stable regression results
225-
workflow: CI.yml
226-
workflow_conclusion: success
227-
repo: ReactionMechanismGenerator/RMG-Py
228-
branch: main
231+
run-id: ${{ env.CI_RUN_ID }}
232+
repository: ReactionMechanismGenerator/RMG-Py
233+
github-token: ${{ secrets.GH_PAT }}
229234
name: stable_regression_results
230235
path: stable_regression_results
231-
search_artifacts: true # retrieves the last run result, either scheduled daily or on push to main
232-
ensure_latest: true # ensures that the latest run is retrieved
233-
# should result in a set of folders inside stable_regression_results
234-
# each of which has the stable result for that example/test
235236

236237
# Regression Testing - Actual Comparisons
237238
- name: Regression Tests - Compare to Baseline

0 commit comments

Comments
 (0)