Fix Python 3.9 julia
Overhaul
#6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pure Python CI | |
# Runs a reduced set of tests compared to CI.yml, skips CD altogether, ensure pure-python | |
# mode (i.e. no Julia-based dependencies) works. | |
name: Pure Python Continuous Integration | |
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: "0 8 * * *" | |
# allow running on RMG-Py on a pushed branch, only if triggered manually | |
workflow_dispatch: | |
# runs on PRs against RMG-Py (and anywhere else, but we add this for RMG-Py) | |
pull_request: | |
# this prevents one PR from simultaneously running multiple runners, which will clog up the queue | |
# and prevent other PRs from running the CI | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
# if running on RMG-Py but requiring changes on an un-merged branch of RMG-database, replace | |
# main with the name of the branch | |
RMG_DATABASE_BRANCH: main | |
jobs: | |
build-and-test: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9"] | |
os: [macos-13, macos-latest, ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.os }} Build and Minimal Test Python ${{ matrix.python-version }} | |
# skip scheduled runs from forks | |
if: ${{ !( github.repository != 'ReactionMechanismGenerator/RMG-Py' && github.event_name == 'schedule' ) }} | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout RMG-Py | |
uses: actions/checkout@v4 | |
- name: Compel Arm-based Mac to use x86 | |
if: matrix.os == 'macos-latest' | |
run: echo "CONDA_SUBDIR=osx-64" >> $GITHUB_ENV | |
- name: Setup Miniforge Python ${{ matrix.python-version }} | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
environment-file: environment.yml | |
miniforge-variant: Miniforge3 | |
miniforge-version: latest | |
python-version: ${{ matrix.python-version }} | |
activate-environment: rmg_env | |
use-mamba: true | |
show-channel-urls: true | |
channels: conda-forge,cantera,rmg | |
# list the environment for debugging purposes | |
- name: mamba info | |
run: | | |
mamba info | |
mamba list | |
# Clone RMG-database | |
- name: Clone RMG-database | |
run: | | |
cd .. | |
git clone -b $RMG_DATABASE_BRANCH https://github.com/ReactionMechanismGenerator/RMG-database.git | |
# modify env variables as directed in the RMG installation instructions | |
- name: Set Environment Variables | |
run: | | |
RUNNER_CWD=$(pwd) | |
echo "PYTHONPATH=$RUNNER_CWD/RMG-Py:$PYTHONPATH" >> $GITHUB_ENV | |
echo "$RUNNER_CWD/RMG-Py" >> $GITHUB_PATH | |
# RMG build step | |
- name: make RMG | |
run: | | |
make clean | |
make | |
- name: Install Q2DTor | |
run: echo "" | make q2dtor | |
# non-regression testing | |
- name: Run Unit, Functional, and Database Tests | |
# aggregate into one command so we only have to eat the collection time once | |
run: make test-all |