-
Notifications
You must be signed in to change notification settings - Fork 9
111 lines (108 loc) · 3.01 KB
/
Copy pathbuild.yml
File metadata and controls
111 lines (108 loc) · 3.01 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
name: CI
on:
push:
pull_request:
jobs:
readme:
container: iquiw/alpine-emacs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- run: emacs --batch README.org --eval '(org-md-export-to-markdown)'
- uses: actions/upload-artifact@v4
with:
name: README
path: README.md
build_wheel:
needs: readme
strategy:
matrix:
runs-on: [macos-13, macos-14, windows-latest, ubuntu-latest]
fail-fast: false
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: README
path: README
- run: mv README/README.md README.md
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
cache-dependency-glob: |
**/pyproject.toml
**/setup.py
- run: uvx -p 3.12 cibuildwheel
shell: bash
- uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.runs-on }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build_aarch64:
needs: readme
strategy:
matrix:
py: ['39', '310', '311', '312', '313']
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: README
path: README
- run: mv README/README.md README.md
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
cache-dependency-glob: |
**/pyproject.toml
**/setup.py
- uses: docker/setup-qemu-action@v3
with:
platforms: all
- run: uvx -p 3.12 cibuildwheel
shell: bash
env:
CIBW_BUILD: ${{'cp'}}${{ matrix.py }}${{'-????linux_*64'}}
CIBW_ARCHS_LINUX: aarch64
- uses: actions/upload-artifact@v4
with:
name: dist-aarch64-${{ matrix.py }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build_targz:
needs: readme
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: README
path: README
- run: mv README/README.md README.md
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
cache-dependency-glob: |
**/pyproject.toml
**/setup.py
- run: uv run --no-project --with build python -m build --sdist
- uses: actions/upload-artifact@v4
with:
name: dist-sdist
path: dist/*.tar.gz
upload:
needs: [build_wheel, build_aarch64, build_targz]
environment: pypi
runs-on: ubuntu-latest
permissions:
id-token: write
if: github.event_name == 'push' && startsWith(github.event.ref,'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
pattern: 'dist-*'
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1