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

Simple fixes #1197

Merged
merged 3 commits into from
Feb 18, 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
17 changes: 17 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ 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
ischoegl marked this conversation as resolved.
Show resolved Hide resolved
strategy:
matrix:
python-version: [ '3.6', '3.9', '3.10' ]
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: 60
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 Down Expand Up @@ -241,6 +250,7 @@ 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']
Expand Down Expand Up @@ -287,6 +297,7 @@ jobs:
multiple-sundials:
name: Sundials ${{ matrix.sundials-ver }}
runs-on: ubuntu-latest
timeout-minutes: 60
defaults:
run:
shell: bash -l {0}
Expand Down Expand Up @@ -322,6 +333,7 @@ jobs:
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 @@ -350,6 +362,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 Down Expand Up @@ -378,6 +391,7 @@ jobs:
windows:
name: ${{ matrix.os }}, MSVC ${{ matrix.vs-toolset }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
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
Expand Down Expand Up @@ -445,6 +459,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 @@ -489,6 +504,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 @@ -533,6 +549,7 @@ 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
Expand Down
17 changes: 13 additions & 4 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -1043,9 +1043,10 @@ conf = Configure(env, custom_tests={'CheckStatement': CheckStatement})
env = conf.env # Retain updates to `env` after the end of the `Configure` context

# First, a sanity check:
if not conf.CheckCXXHeader('cmath', '<>'):
config_error('The C++ compiler is not correctly configured.')

if not conf.CheckCXXHeader("cmath", "<>"):
config_error(
"The C++ compiler is not correctly configured (incomplete include paths)."
)

def get_expression_value(includes, expression, defines=()):
s = ['#define ' + d for d in defines]
Expand All @@ -1062,8 +1063,16 @@ def get_expression_value(includes, expression, defines=()):
'}\n'))
return '\n'.join(s)

# Check that libraries link correctly
cmath_check_source = get_expression_value(["<cmath>"], "cos(0. * argc)")
retcode, cmath_works = conf.TryRun(cmath_check_source, ".cpp")
if cmath_works.strip() != "1":
config_error(
"The C++ compiler is not correctly configured (failed at linking stage)."
)

# Check that NaN is treated correctly
nan_check_source = get_expression_value(["<cmath>"], 'std::isnan(NAN + argc)')
nan_check_source = get_expression_value(["<cmath>"], "std::isnan(NAN + argc)")
retcode, nan_works = conf.TryRun(nan_check_source, ".cpp")
if nan_works.strip() != "1":
config_error(
Expand Down