Skip to content

Commit

Permalink
minimum example to test formatting and feasibility
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonBurns committed Mar 2, 2023
1 parent 7f21df2 commit 2433840
Show file tree
Hide file tree
Showing 2 changed files with 135 additions and 5 deletions.
41 changes: 36 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
yes 'Yes' | ${CONDA_PREFIX}/bin/mopac "$MOPACKEY"
# Clone the other needed repositories
- name: Install and compile RMG
- name: Install and Compile RMG
run: |
cd ..
git clone -b $RMG_DATABASE_BRANCH https://github.com/ReactionMechanismGenerator/RMG-database.git
Expand All @@ -78,12 +78,43 @@ jobs:
if: ${{ success() || failure() }} # Run even if the functional tests failed (but not if they were cancelled)
run: make test-database

# Retrieve Stable Results for reference
- name: Retrieve Stable Regression Results
run: |
echo "Jackson, implement this."
# should result in a set of folders, each of which has the stable result for that example/test
# Regression Testing
- name: Regression Tests
if: ${{ github.event_name == 'push' && github.ref != 'refs/heads/main' && github.ref != 'refs/heads/stable' }} # only push events to branches other than main and stable
env:
GH_TOKEN: ${{ secrets.RMG_DEV_TOKEN }}
run: ./trigger-rmg-tests.sh
run: |
timeout 600 python-jl rmg.py test/regression/aromatics/input.py
# python-jl scripts/checkModels.py test/regression/aromatics $benchmark_model/chemkin/chem_annotated.inp $benchmark_model/chemkin/species_dictionary.txt $testing_model/chemkin/chem_annotated.inp $testing_model/chemkin/species_dictionary.txt
# aromatics_status=$?
# ./run.sh test/regression/nitrogen
# nitrogen_status=$?
# ./run.sh test/regression/sulfur
# sulfur_status=$?
# ./run.sh test/regression/oxidation
# oxidation_status=$?
# ./run.sh test/regression/liquid_oxidation
# liquid_oxidation_status=$?
# ./run.sh test/regression/superminimal
# superminimal_status=$?
# ./run.sh test/regression/eg1
# eg1_status=$?
# echo "aromatics status: $aromatics_status"
# echo "nitrogen status: $nitrogen_status"
# echo "sulfur status: $sulfur_status"
# echo "oxidation status: $oxidation_status"
# echo "liquid oxidation status: $liquid_oxidation_status"
# echo "superminimal status: $superminimal_status"
# echo "eg1 status: $eg1_status"
# if [ $(($aromatics_status | $nitrogen_status | $sulfur_status | $oxidation_status | $liquid_oxidation_status | $superminimal_status | $eg1_status)) -ne 0 ];
# then
# echo "Failed regression tests (non-zero exit code from regression test)"
# exit 1
# fi
# Install and Call codecov only if ALL the tests were successful
- name: Code coverage install and run
Expand Down
99 changes: 99 additions & 0 deletions .github/workflows/generate_regression_baseline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Generate Regression Baseline

on:
workflow_dispatch:

schedule:
- cron: "0 6 * * 1-5"

jobs:
build-and-test-linux:
runs-on: ubuntu-latest
env: # update this if needed to match a pull request on the RMG-database
RMG_DATABASE_BRANCH: main
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2

# configures the mamba environment manager
- name: Setup Mambaforge Python 3.7
uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
miniforge-variant: Mambaforge
miniforge-version: latest
python-version: 3.7
activate-environment: rmg_env
use-mamba: true

# list the environment for debugging purposes
- name: mamba info
run: |
mamba info
mamba list
# RMG installation and linking to Julia
- name: Install and link Julia dependencies
run: |
julia -e "using Pkg; Pkg.add(PackageSpec(url=\"https://github.com/ReactionMechanismGenerator/ReactionMechanismSimulator.jl\", rev=\"main\"))"
julia -e "using Pkg; Pkg.add(\"PyCall\"); Pkg.add(\"DifferentialEquations\")"
python -c "import julia; julia.install()"
ln -sfn $(which python-jl) $(which python)
# Attempt to install MOPAC
- name: Install MOPAC
env:
MOPACKEY: ${{ secrets.MOPACKEY }}
timeout-minutes: 1
continue-on-error: true # allowed to fail on pull request from a forked repository
run: |
set +o pipefail
yes 'Yes' | ${CONDA_PREFIX}/bin/mopac "$MOPACKEY"
# Clone the other needed repositories
- name: Install and Compile RMG
run: |
cd ..
git clone -b $RMG_DATABASE_BRANCH https://github.com/ReactionMechanismGenerator/RMG-database.git
cd RMG-Py
git clone -b arkanepy3 https://github.com/mjohnson541/Q2DTor.git external/Q2DTor
make
# Regression Testing
- name: Regression Tests
run: |
timeout 600 python-jl rmg.py test/regression/aromatics/input.py
# python-jl scripts/checkModels.py test/regression/aromatics $benchmark_model/chemkin/chem_annotated.inp $benchmark_model/chemkin/species_dictionary.txt $testing_model/chemkin/chem_annotated.inp $testing_model/chemkin/species_dictionary.txt
# aromatics_status=$?
# ./run.sh test/regression/nitrogen
# nitrogen_status=$?
# ./run.sh test/regression/sulfur
# sulfur_status=$?
# ./run.sh test/regression/oxidation
# oxidation_status=$?
# ./run.sh test/regression/liquid_oxidation
# liquid_oxidation_status=$?
# ./run.sh test/regression/superminimal
# superminimal_status=$?
# ./run.sh test/regression/eg1
# eg1_status=$?
# echo "aromatics status: $aromatics_status"
# echo "nitrogen status: $nitrogen_status"
# echo "sulfur status: $sulfur_status"
# echo "oxidation status: $oxidation_status"
# echo "liquid oxidation status: $liquid_oxidation_status"
# echo "superminimal status: $superminimal_status"
# echo "eg1 status: $eg1_status"
# if [ $(($aromatics_status | $nitrogen_status | $sulfur_status | $oxidation_status | $liquid_oxidation_status | $superminimal_status | $eg1_status)) -ne 0 ];
# then
# echo "Failed regression tests (non-zero exit code from regression test)"
# exit 1
# fi
# Install and Call codecov only if ALL the tests were successful
- name: Upload Results as Artifacts
run: |
echo "Jackson do this also."

0 comments on commit 2433840

Please sign in to comment.