Skip to content

Commit f72ddaf

Browse files
committed
Parallelizing build for PyPi
1 parent 6e687a8 commit f72ddaf

File tree

2 files changed

+38
-27
lines changed

2 files changed

+38
-27
lines changed

.github/workflows/build_wheels.yml

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,35 @@ on:
44
workflow_dispatch:
55
pull_request:
66
push:
7-
branches:
8-
- master
9-
- develop
7+
branches: [master, develop]
108
tags:
119
- "v**"
1210
release:
13-
types:
14-
- published
11+
types: [published]
1512

1613
env:
17-
# Build `universal2` and `arm64` wheels on an Intel runner.
18-
# Note that the `arm64` wheel and the `arm64` part of the `universal2`
19-
# wheel cannot be tested in this configuration.
14+
# macOS universal and arm64 builds
2015
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
16+
CIBW_SKIP: "cp36-* cp37-*"
17+
CIBW_BUILD_VERBOSITY: 1
2118

2219
jobs:
2320

21+
# --------------------------------------------------------------------------
22+
# Build wheels for each OS and Python version
23+
# --------------------------------------------------------------------------
2424
build_wheels:
25-
name: Build wheels on ${{ matrix.os }}
25+
name: Build wheels (${{ matrix.os }} / Python ${{ matrix.python-version }})
2626
runs-on: ${{ matrix.os }}
27+
2728
strategy:
29+
fail-fast: false
2830
matrix:
2931
os: [ubuntu-latest, windows-latest, macos-latest]
32+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
33+
34+
env:
35+
CIBW_BUILD: cp${{ matrix.python-version.replace('.', '') }}-*
3036

3137
steps:
3238
- uses: actions/checkout@v4
@@ -36,9 +42,13 @@ jobs:
3642

3743
- uses: actions/upload-artifact@v4
3844
with:
39-
name: wheels-${{ matrix.os }}
40-
path: ./wheelhouse/*.whl
45+
name: wheels-${{ matrix.os }}-py${{ matrix.python-version }}
46+
path: wheelhouse/*.whl
47+
if-no-files-found: error
4148

49+
# --------------------------------------------------------------------------
50+
# Build sdist (only once)
51+
# --------------------------------------------------------------------------
4252
build_sdist:
4353
name: Build source distribution
4454
runs-on: ubuntu-latest
@@ -50,32 +60,33 @@ jobs:
5060

5161
- uses: actions/upload-artifact@v4
5262
with:
53-
name: distfiles
63+
name: sdist
5464
path: dist/*.tar.gz
5565

66+
# --------------------------------------------------------------------------
67+
# Upload wheels and sdist to PyPI (only for version tags)
68+
# --------------------------------------------------------------------------
5669
upload_pypi:
70+
name: Upload to PyPI
5771
needs: [build_wheels, build_sdist]
5872
runs-on: ubuntu-latest
73+
if: startsWith(github.ref, 'refs/tags/v')
5974
environment: pypi
6075
permissions:
6176
id-token: write
62-
if: startsWith(github.ref, 'refs/tags/v')
77+
6378
steps:
64-
- uses: actions/download-artifact@v4
79+
- name: Download wheel artifacts
80+
uses: actions/download-artifact@v4
6581
with:
66-
name: wheels-ubuntu-latest
6782
path: dist
68-
- uses: actions/download-artifact@v4
69-
with:
70-
name: wheels-windows-latest
71-
path: dist
72-
- uses: actions/download-artifact@v4
73-
with:
74-
name: wheels-macos-latest
75-
path: dist
76-
- uses: actions/download-artifact@v4
83+
merge-multiple: true
84+
85+
- name: Download sdist
86+
uses: actions/download-artifact@v4
7787
with:
78-
name: distfiles
88+
name: sdist
7989
path: dist
8090

81-
- uses: pypa/gh-action-pypi-publish@release/v1
91+
- name: Publish to PyPI
92+
uses: pypa/gh-action-pypi-publish@release/v1

meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ about:
4343
home: https://github.com/ifilot/pyqint
4444
license: GPL3
4545
license_family: GPL
46-
summary: Python package for evaluating integrals of Gaussian type orbitals in electronic structure calculations
46+
summary: An Educational Hartree-Fock Code in Python: Transparent Implementation of Gaussian-Type Integrals, SCF Procedures, and Geometry Optimization.
4747
description: See the package README.md for more information.

0 commit comments

Comments
 (0)