Skip to content

Commit

Permalink
[GH] Improve tests for installation
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Mar 4, 2022
1 parent 3583e1e commit 9797256
Showing 1 changed file with 35 additions and 6 deletions.
41 changes: 35 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,27 @@ jobs:
- name: Test Cantera
run: scons test show_long_tests=yes verbose_tests=yes
- name: Test Install
# spot-check installation locations
run: |
scons install
python -c 'import cantera as ct; print(ct.__version__)'
echo ${CONDA_PREFIX}
CONDA_PREFIX2=$(echo $CONDA_PREFIX | sed 's/ //g')
echo ${CONDA_PREFIX2}
- name: Test Install (cont'd)
run: |
test -f ${CONDA_PREFIX2}/include/cantera/base/Solution.h
test -f ${CONDA_PREFIX}/lib/libcantera_shared.so;
test -f ${CONDA_PREFIX}/bin/ck2yaml;
test -f ${CONDA_PREFIX}/share/cantera/data/gri30.yaml;
test -d ${CONDA_PREFIX}/lib/python{{ matrix.python-version }}/site-packages/cantera;
- name: Test Essentials
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;
shell: bash -l {0}

cython-latest:
name: Test pre-release version of Cython
Expand Down Expand Up @@ -406,7 +422,7 @@ jobs:
matrix:
os: ["windows-2022"]
vs-toolset: ["14.3"] # 'cl' is not recognized for earlier toolsets
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
python-version: [ "3.7", "3.9", "3.10" ]
fail-fast: false
steps:
- uses: actions/checkout@v2
Expand All @@ -429,17 +445,30 @@ jobs:
mamba install -q scons numpy cython ruamel_yaml boost-cpp eigen yaml-cpp h5py pandas pytest
shell: pwsh
- name: Build Cantera
run: scons build CXX=cl CC=cl system_eigen=y system_yamlcpp=y VERBOSE=True
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
python -c 'import cantera as ct; print(ct.__version__)'
shell: pwsh
test -f ${CONDA_PREFIX}/Library/include/cantera/base/Solution.h
test -f ${CONDA_PREFIX}/Library/lib/cantera_shared.dll
test -d ${CONDA_PREFIX}/Lib/site-packages/cantera
test -f ${CONDA_PREFIX}/Scripts/ck2yaml2
test -f ${CONDA_PREFIX}/share/cantera/data/gri30.yaml
shell: bash -l {0}
- name: Test Essentials
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
shell: bash -l {0}

windows:
name: ${{ matrix.os }}, MSVC ${{ matrix.vs-toolset }}, Python ${{ matrix.python-version }}
Expand All @@ -452,7 +481,7 @@ jobs:
matrix:
os: ['windows-2019']
vs-toolset: ['14.0', '14.2']
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

0 comments on commit 9797256

Please sign in to comment.