-
Notifications
You must be signed in to change notification settings - Fork 7
74 lines (64 loc) · 2.13 KB
/
buildwheels.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
on:
push:
tags:
- '*'
jobs:
build-wheel:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# Linux build (single entry as cibuildwheel handles both Python versions)
- os: ubuntu-latest
python-version: "3.11"
# Windows builds (separate entries for each Python version)
- os: windows-latest
python-version: "3.11"
- os: windows-latest
python-version: "3.12"
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install ifort (Windows)
if: matrix.os == 'windows-latest'
uses: fortran-lang/setup-fortran@v1
with:
compiler: intel
version: "2024.0"
- name: Install build dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
python -m pip install --upgrade pip
python -m pip install cibuildwheel
- name: Install build dependencies (Windows)
if: matrix.os == 'windows-latest'
run: |
python -m pip install --upgrade pip wheel build
python -m pip install -r requirements-build.txt
- name: Build wheel (Linux)
if: matrix.os == 'ubuntu-latest'
env:
CIBW_BUILD: "cp{311,312}-manylinux_x86_64"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_BEFORE_BUILD: "pip install -r requirements-build.txt"
CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux*"
run: |
cibuildwheel --output-dir dist
- name: Build wheel (Windows)
if: matrix.os == 'windows-latest'
run: |
python -m build --wheel --outdir dist/
- name: Upload Python Package to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m pip install twine
python -m twine upload dist/*