Skip to content

Commit

Permalink
[CI] Explicitly test NumPy 1.x compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Jun 17, 2024
1 parent 4022628 commit d76be51
Showing 1 changed file with 25 additions and 8 deletions.
33 changes: 25 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:
- name: Install Apt dependencies
run: |
sudo apt update
sudo apt install libboost-dev gfortran libopenmpi-dev libpython3-dev \
libblas-dev liblapack-dev libhdf5-dev
sudo apt install libboost-dev gfortran libopenmpi-dev libblas-dev \
liblapack-dev libhdf5-dev
gcc --version
- name: Upgrade pip
run: python3 -m pip install -U pip setuptools wheel
Expand All @@ -66,6 +66,13 @@ jobs:
matrix:
python-version: ['3.8', '3.10', '3.11', '3.12']
os: ['ubuntu-20.04', 'ubuntu-22.04']
numpy: ['']
include:
# Keep some test cases with NumPy 1.x until we drop support
- python-version: '3.12'
os: 'ubuntu-24.04'
numpy: '<2'

fail-fast: false
env:
HDF5_LIBDIR: /usr/lib/x86_64-linux-gnu/hdf5/serial
Expand All @@ -83,15 +90,16 @@ jobs:
- name: Install Apt dependencies
run: |
sudo apt update
sudo apt install libboost-dev gfortran libopenmpi-dev libpython3-dev \
libblas-dev liblapack-dev libhdf5-dev libfmt-dev
sudo apt install libboost-dev gfortran libopenmpi-dev libblas-dev \
liblapack-dev libhdf5-dev libfmt-dev
gcc --version
- name: Upgrade pip
run: python3 -m pip install -U pip setuptools wheel
- name: Install Python dependencies
run: |
python3 -m pip install ruamel.yaml scons==3.1.2 numpy cython pandas pytest \
pytest-github-actions-annotate-failures pytest-xdist pint graphviz
python3 -m pip install ruamel.yaml scons==3.1.2 numpy${{ matrix.numpy}} \
cython pandas pytestpytest-github-actions-annotate-failures pytest-xdist \
pint graphviz
- name: Build Cantera
run: |
python3 `which scons` build env_vars=all -j4 debug=n --debug=time \
Expand Down Expand Up @@ -401,6 +409,15 @@ jobs:
matrix:
os: ["ubuntu-20.04", "ubuntu-22.04"]
python-version: ['3.8', '3.10', '3.11', '3.12']
numpy: ['']
# Keep some test cases with NumPy 1.x until we drop support
include:
- os: "ubuntu-20.04"
python-version: "3.9"
numpy: "==1.17" # System version for Ubuntu 20.04
- os: "ubuntu-24.04"
python-version: "3.12"
numpy: "<2.0"
fail-fast: false
env:
HDF5_LIBDIR: /usr/lib/x86_64-linux-gnu/hdf5/serial
Expand Down Expand Up @@ -433,8 +450,8 @@ jobs:
run: python3 -m pip install -U pip setuptools wheel
- name: Install Python dependencies
run: |
python3 -m pip install numpy ruamel.yaml pandas pyarrow matplotlib scipy \
pint graphviz CoolProp
python3 -m pip install numpy${{ matrix.numpy }} ruamel.yaml pandas pyarrow \
matplotlib scipy pint graphviz CoolProp
python3 -m pip install --pre --no-index --find-links dist cantera
- name: Run the examples
# See https://unix.stackexchange.com/a/392973 for an explanation of the -exec part.
Expand Down

0 comments on commit d76be51

Please sign in to comment.