-
Notifications
You must be signed in to change notification settings - Fork 9
100 lines (86 loc) · 2.75 KB
/
_build-pdffit2-package.yml
File metadata and controls
100 lines (86 loc) · 2.75 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
89
90
91
92
93
94
95
96
97
98
99
100
name: Build wheel and sdist for a non-pure Python package
on:
workflow_call:
jobs:
build_sdist:
name: Build diffpy.pdffit2 sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: ./dist/*.tar.gz
build-wheels:
needs: [build_sdist]
defaults:
run:
shell: bash -l {0}
name: cibw-wheels-${{ matrix.python[0] }}-${{ matrix.buildplat[0] }}
runs-on: ${{ matrix.buildplat[0] }}
strategy:
fail-fast: false
matrix:
buildplat:
- [ubuntu-latest, manylinux_x86_64]
- [macos-13, macosx_x86_64]
- [macos-14, macosx_arm64]
- [windows-latest, win_amd64]
python:
- ["3.11", "cp311"]
- ["3.12", "cp312"]
- ["3.13", "cp313"]
steps:
- name: Check out ${{ inputs.project }}
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python[0] }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python[0] }}
- name: Linux build wheels
if: runner.os == 'Linux'
uses: pypa/cibuildwheel@v2.21.1
env:
CIBW_BUILD: ${{ matrix.python[1] }}-${{ matrix.buildplat[1] }}
CIBW_BEFORE_BUILD: yum install -y gsl-devel && pip install -e .
with:
output-dir: dist
- name: macOS build wheels
if: runner.os == 'macOS'
uses: pypa/cibuildwheel@v2.21.1
env:
CIBW_BUILD: ${{ matrix.python[1] }}-${{ matrix.buildplat[1] }}
MACOSX_DEPLOYMENT_TARGET: 13.0
CIBW_BEFORE_BUILD: brew install gsl && pip install -e .
with:
output-dir: dist
- name: Windows setup conda environment
if: runner.os == 'Windows'
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: gsl
channels: conda-forge
auto-update-conda: true
auto-activate-base: false
- name: Windows install gsl
if: runner.os == 'Windows'
run: |
conda config --set always_yes yes --set changeps1 no
conda install gsl
- name: Windows build wheels
if: runner.os == 'Windows'
uses: pypa/cibuildwheel@v2.21.1
env:
CIBW_BUILD: ${{ matrix.python[1] }}-${{ matrix.buildplat[1] }}
CONDA_PREFIX: ${{ env.CONDA_PREFIX }}
with:
output-dir: dist
- name: Upload wheels to GitHub
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.python[0] }}-${{ matrix.buildplat[0] }}.whl
path: ./dist/*.whl