Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub runners for Windows 2022 #1208

Merged
merged 5 commits into from
Mar 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 82 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ jobs:
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 @@ -313,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 @@ -329,6 +332,24 @@ jobs:
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
Expand Down Expand Up @@ -388,6 +409,65 @@ jobs:
run:
python3 `which scons` test show_long_tests=yes verbose_tests=yes --debug=time

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: ${{ matrix.os }}, MSVC ${{ matrix.vs-toolset }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
Expand All @@ -399,22 +479,7 @@ jobs:
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
ischoegl marked this conversation as resolved.
Show resolved Hide resolved
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 Down
5 changes: 3 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,9 @@ windows_options = [
"msvc_version",
"""Version of Visual Studio to use. The default is the newest
installed version. Specify '12.0' for Visual Studio 2013, '14.0' for
Visual Studio 2015, '14.1' ('14.1x') Visual Studio 2017, or '14.2'
('14.2x') for Visual Studio 2019. For version numbers in parentheses,
Visual Studio 2015, '14.1' ('14.1x') Visual Studio 2017, '14.2'
('14.2x') for Visual Studio 2019, or '14.3' ('14.3x') for
Visual Studio 2022. For version numbers in parentheses,
bryanwweber marked this conversation as resolved.
Show resolved Hide resolved
'x' is a placeholder for a minor version number. Windows MSVC only.""",
""),
EnumOption(
Expand Down