Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github actions CI maintainence #652

Merged
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
25 changes: 13 additions & 12 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:

# configures the mamba environment manager and builds the environment
- name: Setup Mambaforge Python 3.7
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
environment-file: RMG-Py/environment.yml
miniforge-variant: Mambaforge
Expand Down Expand Up @@ -149,23 +149,24 @@ jobs:
run: mkdir stable_regression_results

# Retrieve Stable Results for reference
# Will need to use this -> https://github.com/dawidd6/action-download-artifact
- name : Find ID of Reference Results
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
run_id=$(gh run list -R ReactionMechanismGenerator/RMG-Py --workflow="Continuous Integration" --branch main --limit 1 --json databaseId --jq '.[0].databaseId')
echo "CI_RUN_ID=$run_id" >> $GITHUB_ENV

- name: Retrieve Stable Regression Results
if: ${{ env.REFERENCE_JOB == 'false' }}
uses: dsnopek/action-download-artifact@91dda23aa09c68860977dd0ed11d93c0ed3795e7 # see https://github.com/ReactionMechanismGenerator/RMG-Py/pull/2459#issuecomment-1582850815
uses: actions/download-artifact@v4
with:
# this will search for the last successful execution of CI on main and download
# the stable regression results
workflow: CI.yml
workflow_conclusion: success
repo: ReactionMechanismGenerator/RMG-Py
branch: main
run-id: ${{ env.CI_RUN_ID }}
repository: ReactionMechanismGenerator/RMG-Py
github-token: ${{ secrets.GH_PAT }}
name: stable_regression_results
path: RMG-Py/stable_regression_results
search_artifacts: true # retrieves the last run result, either scheduled daily or on push to main
ensure_latest: true # ensures that the latest run is retrieved
# should result in a set of folders inside stable_regression_results
# each of which has the stable result for that example/test
path: stable_regression_results

# Regression Testing - Actual Comparisons
- name: Regression Tests - Compare to Baseline
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/conda_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ jobs:
run: |
conda config --set anaconda_upload yes
- name: Build Binary
env:
CONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
# set a default value to the conda_token if needed (like from forks)
: "${CONDA_TOKEN:=${{ secrets.ANACONDA_TOKEN }}}"
: "${CONDA_TOKEN:=default_value}"
echo "CONDA_TOKEN=$CONDA_TOKEN" >> $GITHUB_ENV
conda config --add channels conda-forge
conda-build --token $CONDA_TOKEN --user rmg .conda
Loading