Skip to content

Commit

Permalink
Merge branch 'Cantera:main' into nonIdealFlame
Browse files Browse the repository at this point in the history
  • Loading branch information
gkogekar authored Mar 30, 2022
2 parents 1128993 + 60d56e1 commit 7e3f60d
Show file tree
Hide file tree
Showing 148 changed files with 7,792 additions and 4,767 deletions.
138 changes: 109 additions & 29 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,18 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ubuntu-multiple-pythons:
name: ${{ matrix.os }} with Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
matrix:
python-version: [ '3.6', '3.9', '3.10' ]
python-version: [ '3.7', '3.9', '3.10' ]
os: ['ubuntu-18.04', 'ubuntu-20.04']
fail-fast: false
steps:
Expand Down Expand Up @@ -51,6 +56,7 @@ jobs:
clang-compiler:
name: LLVM/Clang with Python 3.8
runs-on: ubuntu-20.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
name: Checkout the repository
Expand Down Expand Up @@ -81,6 +87,7 @@ jobs:
macos-multiple-pythons:
name: macOS with Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
timeout-minutes: 90
strategy:
matrix:
python-version: [ '3.7', '3.9', '3.10' ]
Expand Down Expand Up @@ -124,6 +131,7 @@ jobs:
coverage:
name: Coverage
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v2
name: Checkout the repository
Expand Down Expand Up @@ -173,6 +181,7 @@ jobs:
docs:
name: Build docs
runs-on: ubuntu-latest
timeout-minutes: 60
env:
DEPLOY: ${{ github.event_name == 'push' && github.repository_owner == 'Cantera' && endsWith(github.ref, 'main') }}
steps:
Expand All @@ -193,7 +202,7 @@ jobs:
run: python3 -m pip install -U pip setuptools wheel
- name: Install Python dependencies
run: |
python3 -m pip install ruamel.yaml scons numpy cython sphinx\<4.0 \
python3 -m pip install ruamel.yaml scons numpy cython sphinx\<4.0 jinja2\<3.1.0 \
sphinxcontrib-katex sphinxcontrib-matlabdomain sphinxcontrib-doxylink
- name: Build Cantera with documentation
run: python3 `which scons` build -j2 doxygen_docs=y sphinx_docs=y debug=n optimize=n use_pch=n
Expand Down Expand Up @@ -241,9 +250,10 @@ jobs:
run-examples:
name: Run the Python examples using bash
runs-on: ubuntu-18.04
timeout-minutes: 60
strategy:
matrix:
python-version: ['3.6', '3.9', '3.10']
python-version: ['3.7', '3.9', '3.10']
fail-fast: false
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -287,6 +297,9 @@ jobs:
multiple-sundials:
name: Sundials ${{ matrix.sundials-ver }}
runs-on: ubuntu-latest
timeout-minutes: 60
env:
PYTHON_VERSION: 3.8
defaults:
run:
shell: bash -l {0}
Expand All @@ -302,8 +315,9 @@ jobs:
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.8
python-version: ${{ env.PYTHON_VERSION }}
miniforge-version: latest
activate-environment: test
name: Set up conda
- name: Install conda dependencies
# See https://github.com/conda-forge/boost-cpp-feedstock/issues/41 for why we
Expand All @@ -313,16 +327,34 @@ jobs:
cython boost-cpp fmt eigen yaml-cpp h5py pandas libgomp openblas pytest
- name: Build Cantera
run: |
scons build extra_inc_dirs=$CONDA_PREFIX/include:$CONDA_PREFIX/include/eigen3 \
extra_lib_dirs=$CONDA_PREFIX/lib system_fmt=y system_eigen=y system_yamlcpp=y \
system_sundials=y blas_lapack_libs='lapack,blas' -j2 VERBOSE=True debug=n \
scons build system_fmt=y system_eigen=y system_yamlcpp=y system_sundials=y \
blas_lapack_libs='lapack,blas' -j2 VERBOSE=True debug=n \
optimize_flags='-O3 -ffast-math -fno-finite-math-only'
- name: Test Cantera
run: scons test show_long_tests=yes verbose_tests=yes
- name: Test Install
# spot-check installation locations
run: |
scons install
test -f ${CONDA_PREFIX}/lib/libcantera_shared.so
test -f ${CONDA_PREFIX}/include/cantera/base/Solution.h
test -f ${CONDA_PREFIX}/bin/ck2yaml
test -f ${CONDA_PREFIX}/share/cantera/data/gri30.yaml
test -d ${CONDA_PREFIX}/share/cantera/samples
test -d ${CONDA_PREFIX}/lib/python${{ env.PYTHON_VERSION }}/site-packages/cantera
- name: Test Essentials
# ensure that Python package loads and converter scripts work
run: |
python -c 'import cantera as ct; import sys; sys.exit(0) if ct.__version__.startswith("2.6.0") else sys.exit(1)'
ck2yaml --input=test/data/h2o2.inp --output=h2o2-test.yaml
test -f h2o2-test.yaml
cti2yaml test/data/air-no-reactions.cti air-no-reaction-test.yaml
test -f air-no-reaction-test.yaml
cython-latest:
name: Test pre-release version of Cython
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
name: Checkout the repository
Expand Down Expand Up @@ -351,6 +383,7 @@ jobs:
check-deprecations:
name: Run test suite without legacy typedefs
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
name: Checkout the repository
Expand All @@ -376,32 +409,76 @@ jobs:
run:
python3 `which scons` test show_long_tests=yes verbose_tests=yes --debug=time

windows:
windows-2022:
name: ${{ matrix.os }}, MSVC ${{ matrix.vs-toolset }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
os: ["windows-2022"]
vs-toolset: ["14.3"] # 'cl' is not recognized for earlier toolsets
python-version: [ "3.7", "3.9", "3.10" ]
fail-fast: false
steps:
- uses: actions/checkout@v2
name: Checkout the repository
with:
submodules: recursive
- name: Set up conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
mamba-version: "*"
activate-environment: test
channels: conda-forge,defaults
channel-priority: true
- name: Install conda dependencies
# See https://github.com/conda-forge/boost-cpp-feedstock/issues/41 for why we
# use boost-cpp rather than boost from conda-forge
run: |
mamba install -q scons numpy cython ruamel.yaml boost-cpp eigen yaml-cpp h5py pandas pytest
shell: pwsh
- name: Build Cantera
run: scons build system_eigen=y system_yamlcpp=y VERBOSE=True
msvc_version=${{ matrix.vs-toolset }} f90_interface=n debug=n --debug=time -j2
shell: pwsh
- name: Test Cantera
run: scons test show_long_tests=yes verbose_tests=yes --debug=time
shell: pwsh
- name: Test Install
# spot-check installation locations
run: |
scons install
test -f ${CONDA_PREFIX}/Library/lib/cantera_shared.dll
test -f ${CONDA_PREFIX}/Library/include/cantera/base/Solution.h
test -f ${CONDA_PREFIX}/Scripts/ck2yaml
test -f ${CONDA_PREFIX}/share/cantera/data/gri30.yaml
test -d ${CONDA_PREFIX}/share/cantera/samples
test -d ${CONDA_PREFIX}/Lib/site-packages/cantera
- name: Test Essentials
# ensure that Python package loads and converter scripts work
run: |
python -c 'import cantera as ct; import sys; sys.exit(0) if ct.__version__.startswith("2.6.0") else sys.exit(1)'
ck2yaml --input=test/data/h2o2.inp --output=h2o2-test.yaml
test -f h2o2-test.yaml
cti2yaml test/data/air-no-reactions.cti air-no-reaction-test.yaml
test -f air-no-reaction-test.yaml
windows:
name: "Windows 2019, MSVC ${{ matrix.vs-toolset }}, Python ${{ matrix.python-version }}"
runs-on: windows-2019
timeout-minutes: 60
env:
BOOST_ROOT: ${{github.workspace}}/3rdparty/boost
BOOST_URL: https://pilotfiber.dl.sourceforge.net/project/boost/boost/1.75.0/boost_1_75_0.7z
BOOST_URL: https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.7z
strategy:
matrix:
os: ['windows-2019']
vs-toolset: ['14.0', '14.2']
python-version: [ '3.6', '3.9', '3.10' ]
# Must use windows-2016 image because it installs VS2017 (MSVC 14.1)
# Scons cannot find MSVC 14.1 when VS2019 is installed
include:
- os: 'windows-2016'
vs-toolset: '14.1'
python-version: '3.6'
- os: 'windows-2016'
vs-toolset: '14.1'
python-version: '3.7'
- os: 'windows-2016'
vs-toolset: '14.1'
python-version: '3.8'
- os: 'windows-2016'
vs-toolset: '14.1'
python-version: '3.9'
python-version: [ "3.7", "3.9", "3.10" ]
fail-fast: false
steps:
- uses: actions/checkout@v2
Expand All @@ -415,7 +492,7 @@ jobs:
architecture: x64
- name: Install Python dependencies
run: |
python -m pip install -U pip 'setuptools>=43.0.0'
python -m pip install -U pip setuptools wheel
python -m pip install scons pypiwin32 numpy ruamel.yaml cython h5py pandas pytest pytest-github-actions-annotate-failures
- name: Restore Boost cache
uses: actions/cache@v2
Expand Down Expand Up @@ -446,6 +523,7 @@ jobs:
linux-intel-oneapi:
name: intel-oneAPI on Ubuntu, Python 3.8
runs-on: ubuntu-latest
timeout-minutes: 60
env:
INTEL_REPO: https://apt.repos.intel.com
INTEL_KEY: GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
Expand Down Expand Up @@ -490,6 +568,7 @@ jobs:
linux-intel-oneapi-classic:
name: intel-oneAPI classic on Ubuntu, Python 3.8
runs-on: ubuntu-latest
timeout-minutes: 60
env:
INTEL_REPO: https://apt.repos.intel.com
INTEL_KEY: GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
Expand Down Expand Up @@ -534,9 +613,10 @@ jobs:
windows-mingw:
name: mingw on Windows, Python 3.8
runs-on: windows-2019
timeout-minutes: 60
env:
BOOST_ROOT: ${{github.workspace}}/3rdparty/boost
BOOST_URL: https://pilotfiber.dl.sourceforge.net/project/boost/boost/1.75.0/boost_1_75_0.7z
BOOST_URL: https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.7z
steps:
- uses: actions/checkout@v2
name: Checkout the repository
Expand All @@ -549,7 +629,7 @@ jobs:
architecture: x64
- name: Install Python dependencies
run: |
python -m pip install -U pip 'setuptools>=47.0.0,<48'
python -m pip install -U pip 'setuptools>=47.0.0,<48' wheel
python -m pip install scons pypiwin32 numpy ruamel.yaml cython h5py pandas pytest pytest-github-actions-annotate-failures
- name: Restore Boost cache
uses: actions/cache@v2
Expand Down
80 changes: 80 additions & 0 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Packaging Tests
on:
workflow_dispatch: # allow manual triggering of this workflow
inputs:
outgoing_ref:
description: "The ref to be built. Can be a tag, commit hash, or branch name"
required: true
default: "main"
upload_to_pypi:
description: "Try to upload wheels and sdist to PyPI after building"
required: false
default: "false"
upload_to_anaconda:
description: "Try to upload package to Anaconda after building"
required: false
default: "false"
push:
# Run on tags that look like releases
tags:
- v*
# Run when main is pushed to
branches:
- main

jobs:
build-packages:
name: Trigger building packages from external repos
runs-on: ubuntu-20.04
steps:
- name: Set up the job
run: |
if [ -n "${{ github.event.inputs.outgoing_ref }}" ]; then
echo "REF=${{ github.event.inputs.outgoing_ref }}" >> $GITHUB_ENV
else
echo "REF=${{ github.ref }}" >> $GITHUB_ENV
fi
if [ -n "${{ github.event.inputs.upload_to_pypi }}" ]; then
echo "UPLOAD_TO_PYPI=${{ github.event.inputs.upload_to_pypi }}" >> $GITHUB_ENV
elif [[ "${{ github.ref }}" == refs/tags* ]]; then
echo "UPLOAD_TO_PYPI=true" >> $GITHUB_ENV
else
echo "UPLOAD_TO_PYPI=false" >> $GITHUB_ENV
fi
if [ -n "${{ github.event.inputs.upload_to_anaconda }}" ]; then
echo "UPLOAD_TO_ANACONDA=${{ github.event.inputs.upload_to_anaconda }}" >> $GITHUB_ENV
elif [[ "${{ github.ref }}" == refs/tags* ]]; then
echo "UPLOAD_TO_ANACONDA=true" >> $GITHUB_ENV
else
echo "UPLOAD_TO_ANACONDA=false" >> $GITHUB_ENV
fi
- name: Trigger PyPI/Wheel builds
run: >
gh workflow run -R cantera/pypi-packages
python-package.yml
-f incoming_ref=${{ env.REF }}
-f upload=${{ env.UPLOAD_TO_PYPI }}
env:
GITHUB_TOKEN: ${{ secrets.PYPI_PACKAGE_PAT }}
- name: Trigger Conda builds
run: >
gh workflow run -R cantera/conda-recipes
main.yml
-f incoming_ref=${{ env.REF }}
-f upload=${{ env.UPLOAD_TO_ANACONDA }}
env:
GITHUB_TOKEN: ${{ secrets.CONDA_PACKAGE_PAT }}
- name: Trigger Windows MSI Builds
run: >
gh workflow run -R cantera/cantera-windows-binaries
main.yaml
-f incoming_ref=${{ env.REF }}
env:
GITHUB_TOKEN: ${{ secrets.WINDOWS_MSI_PAT }}
- name: Trigger macOS Package Builds
run: >
gh workflow run -R cantera/cantera-macos-pkg
main.yml
-f incoming_ref=${{ env.REF }}
env:
GITHUB_TOKEN: ${{ secrets.MACOS_PKG_PAT }}
2 changes: 1 addition & 1 deletion License.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Copyright (c) 2009 Sandia Corporation. Under the terms of
Contract AC04-94AL85000 with Sandia Corporation, the U.S. Government
retains certain rights in this software.

Copyright (c) 2011-2021, Cantera Developers.
Copyright (c) 2011-2022, Cantera Developers.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ possible.
Development Site
================

The current development version is 2.6.0a4. The current stable version is
The current development version is 2.6.0b1. The current stable version is
2.5.1. The `latest Cantera source code <https://github.com/Cantera/cantera>`_,
the `issue tracker <https://github.com/Cantera/cantera/issues>`_ for bugs and
enhancement requests, `downloads of Cantera releases and binary installers
Expand Down
Loading

0 comments on commit 7e3f60d

Please sign in to comment.