-
Notifications
You must be signed in to change notification settings - Fork 6
112 lines (94 loc) · 2.86 KB
/
ci_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
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 \
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: List installed Python packages
run: |
uname -a
python --version
pip freeze
- name: Configure
env:
DLITE_IMPORTSKIP_EXITCODE: 1
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