1919
2020 steps :
2121 - uses : actions/checkout@v4
22+ with :
23+ fetch-depth : " 0"
2224
2325 - name : Set up Python 3.11
2426 uses : actions/setup-python@v5
2830 - name : Install dependencies
2931 run : |
3032 python -m pip install --upgrade pip
31- pip install --editable .[check,test]
32- pip install "coveralls>=3.0.0"
33+ pip install -v --editable '.[check]'
3334
3435 - name : black check
3536 run : |
@@ -43,64 +44,137 @@ jobs:
4344 run : |
4445 python -m isort --check --diff --color .
4546
46- - name : pylint check
47+ - name : ruff check
4748 run : |
48- python -m pylint src/anaflow /
49+ python -m ruff check src/
4950
50- - name : coveralls check
51+ - name : cython-lint check
5152 run : |
52- python -m pytest --cov anaflow --cov-report term-missing -v tests/
53- python -m coveralls --service=github
54- env :
55- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
53+ cython-lint src/anaflow/
5654
57- build_sdist :
58- name : sdist on ${{ matrix.os }} with py ${{ matrix.python-version }}
55+ build_wheels :
56+ name : wheels for ${{ matrix.os }}
5957 runs-on : ${{ matrix.os }}
6058 strategy :
6159 fail-fast : false
6260 matrix :
63- os : [ubuntu-latest, windows-latest, macos-13]
64- python-version : ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
61+ os : [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-15-intel, macos-latest] # windows-11-arm (no scipy)
6562
6663 steps :
6764 - uses : actions/checkout@v4
6865 with :
69- fetch-depth : ' 0'
66+ fetch-depth : " 0"
67+
68+ - name : Build wheels
69+ uses : pypa/cibuildwheel@v3.2.1
70+ with :
71+ output-dir : dist-wheel-${{ matrix.os }}
72+
73+ - uses : actions/upload-artifact@v4
74+ with :
75+ name : dist-wheel-${{ matrix.os }}
76+ path : ./dist-wheel-${{ matrix.os }}/*.whl
7077
71- - name : Set up Python ${{ matrix.python-version }}
78+ build_sdist :
79+ name : sdist on ${{ matrix.os }} with py ${{ matrix.ver.py }} numpy${{ matrix.ver.np }}
80+ runs-on : ${{ matrix.os }}
81+ strategy :
82+ fail-fast : false
83+ matrix :
84+ os :
85+ [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-14]
86+ ver :
87+ - { py: "3.9", np: "==1.20.0", sp: "==1.5.4" }
88+ - { py: "3.10", np: "==1.21.6", sp: "==1.7.2" }
89+ - { py: "3.11", np: "==1.23.2", sp: "==1.9.2" }
90+ - { py: "3.12", np: "==1.26.2", sp: "==1.11.2" }
91+ - { py: "3.13", np: "==2.1.0", sp: "==1.14.1" }
92+ - { py: "3.14", np: "==2.3.2", sp: "==1.16.1" }
93+ - { py: "3.14", np: ">=2.3.2", sp: ">=1.16.1" }
94+ exclude :
95+ - os : ubuntu-24.04-arm
96+ ver : { py: "3.8", np: "==1.20.0", sp: "==1.5.4" }
97+ - os : macos-14
98+ ver : { py: "3.8", np: "==1.20.0", sp: "==1.5.4" }
99+ - os : macos-14
100+ ver : { py: "3.9", np: "==1.20.0", sp: "==1.5.4" }
101+ - os : macos-14
102+ ver : { py: "3.10", np: "==1.21.6", sp: "==1.7.2" }
103+ steps :
104+ - uses : actions/checkout@v4
105+ with :
106+ fetch-depth : " 0"
107+
108+ - name : Set up Python ${{ matrix.ver.py }}
72109 uses : actions/setup-python@v5
73110 with :
74- python-version : ${{ matrix.python-version }}
111+ python-version : ${{ matrix.ver.py }}
75112
76113 - name : Install dependencies
77114 run : |
78115 python -m pip install --upgrade pip
79116 pip install build
80- pip install --editable .[test]
117+
118+ - name : Install anaflow
119+ run : |
120+ pip install -v --editable .[test]
81121
82122 - name : Run tests
83123 run : |
84- python -m pytest --cov anaflow --cov-report term-missing -v tests/
124+ pip install "numpy${{ matrix.ver.np }}" "scipy${{ matrix.ver.sp }}"
125+ python -m pytest -v tests/
85126
86127 - name : Build sdist
87128 run : |
88- python -m build
129+ # PEP 517 package builder from pypa
130+ python -m build --sdist --outdir dist-sdist .
89131
90132 - uses : actions/upload-artifact@v4
91- if : matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
133+ if : matrix.os == 'ubuntu-latest' && matrix.ver.py == '3.11'
92134 with :
93- name : dist
94- path : dist/*
135+ name : dist-sdist
136+ path : dist-sdist/*.tar.gz
137+
138+ coverage :
139+ name : coverage
140+ runs-on : ubuntu-latest
141+
142+ steps :
143+ - uses : actions/checkout@v4
144+ with :
145+ fetch-depth : ' 0'
146+
147+ - name : Set up Python 3.11
148+ uses : actions/setup-python@v5
149+ with :
150+ python-version : 3.11
151+
152+ - name : Install dependencies
153+ run : |
154+ python -m pip install --upgrade pip
155+ pip install "coveralls>=3.0.0"
156+
157+ - name : Install anaflow
158+ run : |
159+ pip install -v --editable .[test]
160+
161+ - name : Run tests
162+ env :
163+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
164+ run : |
165+ pip install "numpy${{ matrix.ver.np }}"
166+ python -m pytest --cov anaflow --cov-report term-missing -v tests/
167+ python -m coveralls --service=github
95168
96169 upload_to_pypi :
97- needs : [build_sdist]
170+ needs : [build_wheels, build_sdist]
98171 runs-on : ubuntu-latest
99172
100173 steps :
101174 - uses : actions/download-artifact@v4
102175 with :
103- name : dist
176+ pattern : dist-*
177+ merge-multiple : true
104178 path : dist
105179
106180 - name : Publish to Test PyPI
0 commit comments