Merge branch 'validate-multiple-instances' into 1000-jstore-cleanup #3705
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 | |
# This CI builds DLite and runs (almost) all tests. | |
# | |
# The following plugins are not tested here, since they depends on an external service: | |
# | |
# Protocol plugins: | |
# - sftp | |
# | |
# Storage plugins: | |
# - postgresql | |
# - mongodb | |
# - redis | |
# | |
# Please remember to update respective plugin docstring if this list changes. | |
# | |
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: Build | |
run: cmake --build . | |
working-directory: build | |
- name: Install | |
run: cmake --install . | |
working-directory: build | |
- name: Test | |
env: | |
DLITE_PYDEBUG: "" | |
run: ctest || ctest --rerun-failed --output-on-failure -V | |
working-directory: build | |
- name: Test with all behavior changes disabled | |
env: | |
DLITE_BEHAVIOR: OFF | |
run: ctest || ctest --rerun-failed --output-on-failure -V | |
working-directory: build | |
- name: Test with all behavior changes enabled | |
env: | |
DLITE_BEHAVIOR: ON | |
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 |