Merge branch 'master' into general-fixes-from-pr-667 #2170
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI tests | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update --fix-missing && \ | |
sudo apt-get install \ | |
libhdf5-dev \ | |
swig4.0 \ | |
doxygen \ | |
graphviz \ | |
python3 \ | |
python3-pip \ | |
python3-dev \ | |
python3-numpy \ | |
python3-yaml | |
- name: Install Python dependencies | |
run: | | |
which python3 | |
python3 --version | |
python3 -m pip --version | |
python3 -m pip install --upgrade pip | |
python3 -m pip install -U setuptools wheel | |
python3 -m pip install -r requirements.txt -r requirements_full.txt -r requirements_dev.txt -r requirements_doc.txt | |
- name: Check numpy | |
run: | | |
python3 -c 'import numpy as np; print(np.get_include())' | |
- name: Workaround - install CMake 3.25.2 since 3.26.0 doesn't work | |
# Normally we would install cmake with the package manager, but | |
# ubuntu 20.04 doesn't seems to keep older versions of cmake around... | |
# Fortunately, there exists a pip package | |
run: | | |
python3 -m pip install cmake==3.25.2 | |
cmake --version | |
- name: configure | |
run: | | |
Python3_ROOT=$(python3 -c 'import sys; print(sys.exec_prefix)') \ | |
CFLAGS='-Wno-missing-field-initializers' \ | |
cmake -B build . -DFORCE_EXAMPLES=ON -DWITH_FORTRAN=YES | |
- name: make | |
run: cmake --build . | |
working-directory: build | |
- name: install | |
run: cmake --install . | |
working-directory: build | |
- name: make test | |
run: ctest || ctest --rerun-failed --output-on-failure -V | |
working-directory: build | |
- name: build Linux wheel | |
run: python3 -m pip wheel -w dist ./python | |
- name: Install python package and test the installation | |
run: | | |
python3 -m pip install --user dist/*.whl | |
python3 bindings/python/tests/__main__.py |