Repository navigation
89 lines (74 loc) · 2.26 KB
/
Copy pathtutorials.yml
File metadata and controls
89 lines (74 loc) · 2.26 KB
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
name: Tutoriels
on:
push:
pull_request:
types:
- closed
branches:
- main
jobs:
run:
name: Build tutorial on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install requirements
run: python -m pip install -r requirements.txt
- name: Install requirements dev
run: python -m pip install -r requirements-dev.txt
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: cython 1
run: |
cd _tutoriels/cython1
python setup.py build_ext --inplace
python -c "import primes;print(primes.primes(5))"
cd ../..
- name: cython 2
run: |
cd _tutoriels/cython2
python setup.py build_ext --inplace
python -c "import primes;print(primes.primes(5))"
cd ../..
- name: cython 3
run: |
cd _tutoriels/cython3
python setup.py build_ext --inplace
python -c "import dotcy;import numpy as np;print(dotcy.add_scaled(np.array([3.5]), np.array([4.5])))"
cd ../..
- name: cython 4
run: |
cd _tutoriels/cython4
python setup.py build_ext --inplace
python -c "import dotcy;import numpy as np;print(dotcy.add_scaled(np.array([3.5]), np.array([4.5])))"
cd ../..
- name: pybind11
run: |
cd _tutoriels/pybind11
python setup.py build_ext --inplace
python -c "import dot11;import numpy as np;print(dot11.add_scaled(np.array([3.5]), np.array([4.5])))"
cd ../..
- name: numba
run: |
cd _tutoriels/numba1
python -m pip install numba --upgrade
python dotnumba.py
cd ../..
- name: cython mat
run: |
cd _tutoriels/cython_mat
python setup.py build_ext --inplace
PYTHONPATH=. python test_mmat.py
cd ../..