forked from silx-kit/silx
-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (117 loc) · 4.14 KB
/
ci.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
# This workflow contains a single job called "build"
build:
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }} ${{ matrix.QT_API }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
python-version: "3.8"
QT_API: PyQt5
with_opencl: false
with_opengl: true
- os: ubuntu-latest
python-version: "3.11"
QT_API: PyQt6
with_opencl: true
with_opengl: true
- os: ubuntu-latest
python-version: "3.12"
QT_API: PySide6
with_opencl: true
with_opengl: true
- os: macos-13
python-version: "3.10"
QT_API: PyQt5
with_opencl: true
with_opengl: true
- os: macos-13
python-version: "3.12"
QT_API: PyQt6
with_opencl: true
with_opengl: true
- os: macos-13
python-version: "3.9"
QT_API: PySide6
with_opencl: true
with_opengl: true
- os: windows-latest
python-version: "3.9"
QT_API: PyQt5
with_opencl: false
with_opengl: false
- os: windows-latest
python-version: "3.12"
QT_API: PyQt6
with_opencl: false
with_opengl: false
- os: windows-latest
python-version: "3.10"
QT_API: PySide6
with_opencl: false
with_opengl: false
steps:
- uses: actions/checkout@v4
# Install packages:
# OpenCL lib
# xvfb to run the GUI test headless
# libegl1-mesa: Required by Qt xcb platform plugin
# libgl1-mesa-glx: For OpenGL
# xserver-xorg-video-dummy: For OpenGL
# libxkbcommon-x11-0, ..: needed for Qt plugins
- name: Install system packages
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install ocl-icd-opencl-dev xvfb libegl1-mesa libgl1-mesa-glx xserver-xorg-video-dummy libxkbcommon-x11-0 libxkbcommon0 libxkbcommon-dev libxcb-icccm4 libxcb-image0 libxcb-shm0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-render0 libxcb-shape0 libxcb-sync1 libxcb-xfixes0 libxcb-xinerama0 libxcb-xkb1 libxcb-cursor0 libxcb1
- name: Setup Intel OpenCL ICD
if: runner.os == 'Linux' && ${{ matrix.with_opencl }}
run: |
wget -nv http://www.silx.org/pub/OpenCL/intel_opencl_icd-6.4.0.38.tar.gz -O - | tar -xzvf -
echo $(pwd)/intel_opencl_icd/icd/libintelocl.so > intel_opencl_icd/vendors/intel64.icd
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install build dependencies
run: |
pip install --upgrade --pre build cython setuptools wheel
pip list
- name: Build
env:
MACOSX_DEPLOYMENT_TARGET: "10.9"
run: |
python -m build --no-isolation
ls dist
- name: Install
run: |
pip install -r ci/requirements-pinned.txt
pip install --pre "${{ matrix.QT_API }}"
pip install --pre "$(ls dist/silx*.whl)[full,test]"
if [ ${{ runner.os }} == 'Linux' ]; then
export OCL_ICD_VENDORS=$(pwd)/intel_opencl_icd/vendors
fi
python ./ci/info_platform.py
pip list
- name: Test
env:
QT_API: ${{ matrix.QT_API }}
SILX_TEST_LOW_MEM: "False"
SILX_OPENCL: ${{ matrix.with_opencl && 'True' || 'False' }}
WITH_GL_TEST: ${{ matrix.with_opengl && 'True' || 'False' }}
run: |
if [ ${{ runner.os }} == 'Linux' && ${{ matrix.with_opencl }} ]; then
export OCL_ICD_VENDORS=$(pwd)/intel_opencl_icd/vendors
fi
python -c "import silx.test, sys; sys.exit(silx.test.run_tests(verbosity=1, args=['--qt-binding=${{ matrix.QT_API }}']));"