Merge branch 'fix-memory-leaks' of github.com:SINTEF/dlite into fix-m… #3715
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-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
# We do not install rdflib0-dev here, since we want to test | |
# DLite both with and without rdflib (Redland) support and the | |
# case with rdflib is already covered by the ci_build_wheel | |
# workflow for Linux systems. | |
- name: Install dependencies | |
run: | | |
sudo apt-get update --fix-missing && \ | |
sudo apt-get install \ | |
libxml2-dev \ | |
libxslt-dev \ | |
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 | |
- 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: List installed Python packages | |
run: | | |
uname -a | |
python --version | |
pip freeze | |
- 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 | |
env: | |
DLITE_PYDEBUG: "" | |
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 |