Skip to content

[Python 3.9] Clar SciPy Re-implementation, pythoncall Debugging, Optional RMS #2315

[Python 3.9] Clar SciPy Re-implementation, pythoncall Debugging, Optional RMS

[Python 3.9] Clar SciPy Re-implementation, pythoncall Debugging, Optional RMS #2315

Workflow file for this run

name: Build Documentation
on:
push:
branches:
- main
pull_request:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: "0 8 * * 1"
jobs:
build-documentation:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Sign into GitHub Actions Bot
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
- name: Clone RMG-Py
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Mambaforge Python 3.9
uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
miniforge-variant: Miniforge3
miniforge-version: latest
python-version: 3.9
activate-environment: rmg_env
use-mamba: true
# installs the extra RMS conda dependencies
- name: Add RMS dependencies
run: |
mamba install -c conda-forge julia=1.9.1 pyjulia>=0.6
mamba install -c rmg pyrms diffeqpy
- name: Install sphinx
run: mamba install -y sphinx
- name: Mamba info
run: |
mamba info
mamba list
- name: Clone RMG-database
run: |
cd ..
git clone https://github.com/ReactionMechanismGenerator/RMG-database.git
- name: Set Environment Variables
run: |
RUNNER_CWD=$(pwd)
echo "PYTHONPATH=$RUNNER_CWD/RMG-Py:$PYTHONPATH" >> $GITHUB_ENV
echo "$RUNNER_CWD/RMG-Py" >> $GITHUB_PATH
- name: make RMG
run: |
make clean
make
- name: Install and link Julia dependencies
timeout-minutes: 120 # this usually takes 20-45 minutes (or hangs for 6+ hours).
run: |
which julia
export JULIA_CONDAPKG_EXE=$CONDA/condabin/mamba
julia -e 'ENV["JULIA_CONDAPKG_BACKEND"] = "Current"; using Pkg; Pkg.add(PackageSpec(name="ReactionMechanismSimulator", url="https://github.com/hwpang/ReactionMechanismSimulator.jl.git", rev="fix_installation")); using ReactionMechanismSimulator'
- name: Checkout gh-pages Branch
uses: actions/checkout@v2
with:
ref: gh-pages
fetch-depth: 0
path: documentation/build/html
clean: false
- name: Build Documentation
run: |
cd documentation
make html
cd build/html
touch .nojekyll
git add -A --force .
git diff --staged --exit-code --quiet || git commit -m "Automated documentation rebuild" # only commit if changes were made
- name: Check documentation links
continue-on-error: true
run: |
cd documentation
sphinx-build -b linkcheck -d build/doctrees/ source/ build/linkcheck | grep -e broken -e redirect | grep -v -e 'redirect https://doi.org/' -e 'broken https://doi.org/.* 403 Client Error: Forbidden'
- name: Publish Updated Documentation
if: ${{ github.event_name == 'push' && github.repository == 'ReactionMechanismGenerator/RMG-Py' }}
run: |
cd documentation/build/html
git push origin gh-pages