Repository navigation
136 lines (122 loc) · 4.09 KB
/
Copy pathcibuildwheel.yml
File metadata and controls
136 lines (122 loc) · 4.09 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: Wheels
on:
pull_request:
push:
release:
types:
- published
permissions:
contents: read
jobs:
build_bdist:
name: "Build ${{ matrix.os }} (${{ matrix.cibw_platform }}-${{ matrix.arch }}) wheels"
runs-on: ${{ matrix.os }}
timeout-minutes: 60 # should be long enough even on tags, but let's prevent hangs
strategy:
fail-fast: false
matrix:
include:
- name: Linux
os: ubuntu-22.04
arch: x86_64
cibw_platform: linux
- name: Pyodide
os: ubuntu-22.04
arch: auto
cibw_platform: pyodide
- name: Linux-arm
os: ubuntu-24.04-arm
arch: aarch64
cibw_platform: linux
- name: Windows
os: windows-2022
arch: AMD64
cibw_platform: windows
- name: macOS-arm
os: macos-15
arch: arm64
cibw_platform: macos
- name: macOS-intel
os: macos-15-intel
arch: x86_64
cibw_platform: macos
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: "Building ${{ matrix.os }} (${{ matrix.arch }}) wheels"
uses: pypa/cibuildwheel@f9b966cfadf4109556cadc5bb39ddb72d0ce664e # v4.3.5
env:
CIBW_PLATFORM: ${{ matrix.cibw_platform }}
CIBW_SKIP: "*-musllinux*"
CIBW_BUILD: "cp311-* cp314-*"
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BUILD_FRONTEND: build
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_TEST_REQUIRES: abi3audit pytest pandas>=2
CIBW_TEST_COMMAND: >
python -c "import gsw; print(f'gsw v{gsw.__version__}')" &&
python -m pytest --pyargs gsw
CIBW_TEST_COMMAND_LINUX:
abi3audit ${{ github.workspace }}/wheelhouse/*.whl --summary --assume-minimum-abi3 3.11 --verbose --strict
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: pypi-artifacts-${{ matrix.os }}-${{ matrix.arch }}
path: ${{ github.workspace }}/wheelhouse/*.whl
permissions:
actions: write
build_sdist:
name: Build source distribution
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Build sdist
run: >
pip install build twine check-manifest
&& python -m build --sdist . --outdir dist
&& twine check dist/*
&& check-manifest --verbose
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: pypi-artifacts
path: ${{ github.workspace }}/dist/*.tar.gz
permissions:
actions: write
show-artifacts:
needs: [build_bdist, build_sdist]
name: "Show artifacts"
runs-on: ubuntu-22.04
steps:
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: pypi-artifacts*
path: ${{ github.workspace }}/dist
merge-multiple: true
- shell: bash
run: |
ls -l ${{ github.workspace }}/dist
permissions:
actions: none
publish-artifacts-pypi:
needs: [build_bdist, build_sdist]
name: "Publish to PyPI"
runs-on: ubuntu-22.04
# upload to PyPI for every tag starting with 'v'
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: pypi-artifacts*
path: ${{ github.workspace }}/dist
merge-multiple: true
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
environment:
name: release
url: https://pypi.org/p/gsw
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing