File tree Expand file tree Collapse file tree 4 files changed +34
-26
lines changed Expand file tree Collapse file tree 4 files changed +34
-26
lines changed Original file line number Diff line number Diff line change @@ -17,27 +17,24 @@ jobs:
17
17
docs :
18
18
name : Documentation
19
19
runs-on : ubuntu-latest
20
- container :
21
- image : cupy/cupy:v13.4.0
22
20
23
21
steps :
24
22
- uses : actions/checkout@v3
25
23
26
24
- name : Clean previous builds
27
25
run : rm -rf build dist *.egg-info
28
26
29
- - name : Set up git
30
- run : apt-get update && apt-get install git -y
31
-
32
27
- name : Install system dependencies
33
28
run : |
34
- apt-get update && apt-get install -y python3-venv python3-pip
29
+ sudo apt-get update
30
+ sudo apt-get install -y python3.12 python3.12-venv python3-pip git
35
31
36
- - name : Install additional dependencies
32
+ - name : Create virtual environment and install package
37
33
run : |
38
- python3.10 -m venv venv
34
+ python3.12 -m venv venv
39
35
source venv/bin/activate
40
- python3.10 -m pip install --no-cache-dir .
36
+ python3.12 -m pip install --upgrade pip
37
+ python3.12 -m pip install --no-cache-dir .
41
38
shell : bash -e {0}
42
39
43
40
- name : Generate documentation
46
43
cd docs
47
44
make html
48
45
shell : bash -e {0}
49
-
46
+
50
47
- name : Deploy
51
48
if : success()
52
49
uses : peaceiris/actions-gh-pages@v3
Original file line number Diff line number Diff line change 16
16
17
17
jobs :
18
18
test :
19
- name : Testing using pytest
19
+ name : Testing on Python ${{ matrix.python-version }}
20
20
runs-on : ubuntu-latest
21
- container :
22
- image : cupy/cupy:v13.4.0
21
+
22
+ strategy :
23
+ matrix :
24
+ python-version : ['3.9', '3.10', '3.11', '3.12']
23
25
24
26
steps :
25
27
- uses : actions/checkout@v3
26
28
29
+ - name : Set up Python ${{ matrix.python-version }}
30
+ uses : actions/setup-python@v5
31
+ with :
32
+ python-version : ${{ matrix.python-version }}
33
+
27
34
- name : Clean previous builds
28
35
run : rm -rf build dist *.egg-info
29
36
30
37
- name : Install system dependencies
31
38
run : |
32
- apt-get update && apt-get install -y python3.10-venv python3-pip cmake
39
+ sudo apt-get update
40
+ sudo apt-get install -y cmake
33
41
34
- - name : Install additional dependencies
42
+ - name : Install Python dependencies
35
43
run : |
36
- python3.10 -m venv venv
44
+ python -m venv venv
37
45
source venv/bin/activate
38
- python3.10 -m pip install --no-cache-dir .
39
- shell : bash -e {0}
46
+ python -m pip install --upgrade pip
47
+ pip install --no-cache-dir .
48
+ shell : bash
40
49
41
- - name : Test with pytest
50
+ - name : Run tests with pytest
42
51
run : |
43
52
source venv/bin/activate
44
53
mkdir -p build
45
54
cmake -B build -S .
46
- cd build
47
- make
48
- cd ..
49
- python3.10 -m pytest
50
- shell : bash -e {0}
55
+ cmake --build build
56
+ pytest
57
+ shell : bash
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ name = "pyclassify"
9
9
version = " 0.0.1"
10
10
description = " Project for the Development Tools for Scientific Computing course"
11
11
readme = " README.md"
12
- requires-python = " >=3.10 "
12
+ requires-python = " >=3.9 "
13
13
license = { file = " LICENSE" }
14
14
authors = [
15
15
{ name = " Lorenzo Tomada" , email = " ltomada@sissa.it" },
Original file line number Diff line number Diff line change @@ -48,7 +48,11 @@ def build_extension(self, ext):
48
48
ext_modules = [CMakeExtension ("pyclassify.QR_cpp" )],
49
49
packages = find_packages (where = "src/" ),
50
50
package_dir = {"" : "src/" },
51
- package_data = {"pyclassify" : ["QR_cpp.cpython-312-x86_64-linux-gnu.so" ]},
51
+ package_data = {
52
+ "pyclassify" : [
53
+ f"QR_cpp.cpython-{ sys .version_info [0 ]} { sys .version_info [1 ]} -x86_64-linux-gnu.so"
54
+ ]
55
+ },
52
56
include_package_data = True ,
53
57
cmdclass = {"build_ext" : CMakeBuild },
54
58
zip_safe = False ,
You can’t perform that action at this time.
0 commit comments