-
Notifications
You must be signed in to change notification settings - Fork 27
130 lines (106 loc) · 3.15 KB
/
release.yaml
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
# This workflow builds binary wheels for indexed_gzip, for
# different platforms and different Python versions, using
# cibuildwheel. It is triggered manually. The built wheels
# are published to PyPi.
on:
workflow_dispatch
defaults:
run:
shell: bash
jobs:
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: "3.11"
- name: Build sdist
run: python setup.py sdist
- uses: actions/upload-artifact@v4.4.3
with:
name: sdist
path: ./dist/*.tar.gz
build_macos_wheels:
name: Build macos wheels
runs-on: macos-latest
env:
PLATFORM: ${{ matrix.os }}
CIBW_ARCHS_MACOS: "x86_64 arm64 universal2"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: "3.11"
- name: Build wheels
run: bash ./.ci/build_wheels.sh
- uses: actions/upload-artifact@v4.4.3
with:
name: macos_wheels
path: ./dist/*.whl
build_windows_wheels:
name: Build Windows ${{ matrix.arch }} wheels
runs-on: windows-latest
strategy:
matrix:
arch: ["AMD64", "x86"]
env:
PLATFORM: windows-latest
CIBW_ARCHS_WINDOWS: ${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: "3.11"
- name: Download zlib
run: bash ./.ci/download_zlib.sh
- name: Build wheels
run: bash ./.ci/build_wheels.sh
- uses: actions/upload-artifact@v4.4.3
with:
name: windows_${{ matrix.arch }}_wheels
path: ./dist/*.whl
build_linux_wheels:
# Typo left in for hilarity
name: Build Linux ${{ matrix.arch }} eels
runs-on: ubuntu-latest
strategy:
matrix:
arch: ["x86_64", "i686", "aarch64"]
env:
PLATFORM: ubuntu-latest
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: "3.11"
- name: Set up QEMU for emulated (e.g. ARM) builds
if: ${{ matrix.arch == 'aarch64' }}
uses: docker/setup-qemu-action@v3
- name: Build wheels
run: bash ./.ci/build_wheels.sh
- uses: actions/upload-artifact@v4.4.3
with:
name: linux_${{ matrix.arch }}_wheels
path: ./dist/*.whl
publish_to_pypi:
name: Publish indexed_gzip to PyPi
runs-on: ubuntu-latest
needs: [build_sdist, build_macos_wheels, build_windows_wheels, build_linux_wheels]
steps:
- name: Download wheels
uses: actions/download-artifact@v4
with:
path: dist/
merge-multiple: true
- name: Publish archives to PyPI
uses: pypa/gh-action-pypi-publish@v1.11.0
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}