1- name : Build pyd4
1+ # This file is autogenerated by maturin v1.8.1
2+ # To update, run
3+ #
4+ # maturin generate-ci github --pytest
5+ #
6+ name : pyd4 CI
27
38on :
49 push :
5- branches : [master]
10+ branches :
11+ - main
12+ - master
13+ tags :
14+ - ' *'
615 pull_request :
7- branches : [master]
16+ workflow_dispatch :
17+
18+ permissions :
19+ contents : read
820
921jobs :
10- build-and-test :
22+ linux :
1123 runs-on : ubuntu-latest
1224 steps :
1325 - uses : actions/checkout@v4
14-
15- - name : Set up Rust
16- uses : actions-rs/toolchain@v1
26+ - uses : actions/setup-python@v5
1727 with :
18- toolchain : stable
19- profile : minimal
28+ python-version : ' 3.12'
29+ - uses : dtolnay/rust-toolchain@stable
30+ - name : Build wheels
31+ uses : PyO3/maturin-action@v1
32+ with :
33+ target : x86_64
34+ args : --release --out dist --find-interpreter -m ./pyd4/Cargo.toml
35+ # - name: Upload wheels
36+ # uses: actions/upload-artifact@v4
37+ # with:
38+ # name: wheels-linux-${{ matrix.platform.target }}
39+ # path: dist
40+ - name : pytest
41+ shell : bash
42+ run : |
43+ set -e
44+ python3 -m venv .venv
45+ source .venv/bin/activate
46+ pip install pyd4 --find-links dist --force-reinstall
47+ pip install pytest
48+ pytest
49+
2050
21- - name : Install UV
22- uses : astral-sh/setup-uv@v3
51+ # musllinux:
52+ # runs-on: ${{ matrix.platform.runner }}
53+ # strategy:
54+ # matrix:
55+ # platform:
56+ # - runner: ubuntu-22.04
57+ # target: x86_64
58+ # - runner: ubuntu-22.04
59+ # target: x86
60+ # - runner: ubuntu-22.04
61+ # target: aarch64
62+ # - runner: ubuntu-22.04
63+ # target: armv7
64+ # steps:
65+ # - uses: actions/checkout@v4
66+ # - uses: actions/setup-python@v5
67+ # with:
68+ # python-version: 3.x
69+ # - name: Build wheels
70+ # uses: PyO3/maturin-action@v1
71+ # with:
72+ # target: ${{ matrix.platform.target }}
73+ # args: --release --out dist --find-interpreter
74+ # sccache: 'true'
75+ # manylinux: musllinux_1_2
76+ # - name: Upload wheels
77+ # uses: actions/upload-artifact@v4
78+ # with:
79+ # name: wheels-musllinux-${{ matrix.platform.target }}
80+ # path: dist
81+ # - name: pytest
82+ # if: ${{ startsWith(matrix.platform.target, 'x86_64') }}
83+ # uses: addnab/docker-run-action@v3
84+ # with:
85+ # image: alpine:latest
86+ # options: -v ${{ github.workspace }}:/io -w /io
87+ # run: |
88+ # set -e
89+ # apk add py3-pip py3-virtualenv
90+ # python3 -m virtualenv .venv
91+ # source .venv/bin/activate
92+ # pip install pyd4 --no-index --find-links dist --force-reinstall
93+ # pip install pytest
94+ # pytest
95+ # - name: pytest
96+ # if: ${{ !startsWith(matrix.platform.target, 'x86') }}
97+ # uses: uraimo/run-on-arch-action@v2
98+ # with:
99+ # arch: ${{ matrix.platform.target }}
100+ # distro: alpine_latest
101+ # githubToken: ${{ github.token }}
102+ # install: |
103+ # apk add py3-virtualenv
104+ # run: |
105+ # set -e
106+ # python3 -m virtualenv .venv
107+ # source .venv/bin/activate
108+ # pip install pytest
109+ # pip install pyd4 --find-links dist --force-reinstall
110+ # pytest
23111
24- - name : Set up Python
25- uses : actions/setup-python@v5
26- with :
27- python-version-file : " pyd4/pyproject.toml"
112+ # windows:
113+ # runs-on: ${{ matrix.platform.runner }}
114+ # strategy:
115+ # matrix:
116+ # platform:
117+ # - runner: windows-latest
118+ # target: x64
119+ # - runner: windows-latest
120+ # target: x86
121+ # steps:
122+ # - uses: actions/checkout@v4
123+ # - uses: actions/setup-python@v5
124+ # with:
125+ # python-version: 3.x
126+ # architecture: ${{ matrix.platform.target }}
127+ # - name: Build wheels
128+ # uses: PyO3/maturin-action@v1
129+ # with:
130+ # target: ${{ matrix.platform.target }}
131+ # args: --release --out dist --find-interpreter
132+ # sccache: 'true'
133+ # - name: Upload wheels
134+ # uses: actions/upload-artifact@v4
135+ # with:
136+ # name: wheels-windows-${{ matrix.platform.target }}
137+ # path: dist
138+ # - name: pytest
139+ # if: ${{ !startsWith(matrix.platform.target, 'aarch64') }}
140+ # shell: bash
141+ # run: |
142+ # set -e
143+ # python3 -m venv .venv
144+ # source .venv/Scripts/activate
145+ # pip install pyd4 --find-links dist --force-reinstall
146+ # pip install pytest
147+ # pytest
28148
29- - name : Install project
30- run : |
31- cd pyd4
32- uv sync --all-extras --dev
149+ # macos:
150+ # runs-on: ${{ matrix.platform.runner }}
151+ # strategy:
152+ # matrix:
153+ # platform:
154+ # - runner: macos-13
155+ # target: x86_64
156+ # - runner: macos-14
157+ # target: aarch64
158+ # steps:
159+ # - uses: actions/checkout@v4
160+ # - uses: actions/setup-python@v5
161+ # with:
162+ # python-version: 3.x
163+ # - name: Build wheels
164+ # uses: PyO3/maturin-action@v1
165+ # with:
166+ # target: ${{ matrix.platform.target }}
167+ # args: --release --out dist --find-interpreter
168+ # sccache: 'true'
169+ # - name: Upload wheels
170+ # uses: actions/upload-artifact@v4
171+ # with:
172+ # name: wheels-macos-${{ matrix.platform.target }}
173+ # path: dist
174+ # - name: pytest
175+ # run: |
176+ # set -e
177+ # python3 -m venv .venv
178+ # source .venv/bin/activate
179+ # pip install pyd4 --find-links dist --force-reinstall
180+ # pip install pytest
181+ # pytest
33182
34- - name : Build
35- run : |
36- cd pyd4
37- uv build
183+ # sdist:
184+ # runs-on: ubuntu-latest
185+ # steps:
186+ # - uses: actions/checkout@v4
187+ # - name: Build sdist
188+ # uses: PyO3/maturin-action@v1
189+ # with:
190+ # command: sdist
191+ # args: --out dist
192+ # - name: Upload sdist
193+ # uses: actions/upload-artifact@v4
194+ # with:
195+ # name: wheels-sdist
196+ # path: dist
38197
39- - name : Test
40- run : |
41- cd pyd4
42- uv run pytest
198+ # release:
199+ # name: Release
200+ # runs-on: ubuntu-latest
201+ # if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
202+ # needs: [linux, musllinux, windows, macos, sdist]
203+ # permissions:
204+ # # Use to sign the release artifacts
205+ # id-token: write
206+ # # Used to upload release artifacts
207+ # contents: write
208+ # # Used to generate artifact attestation
209+ # attestations: write
210+ # steps:
211+ # - uses: actions/download-artifact@v4
212+ # - name: Generate artifact attestation
213+ # uses: actions/attest-build-provenance@v1
214+ # with:
215+ # subject-path: 'wheels-*/*'
216+ # - name: Publish to PyPI
217+ # if: ${{ startsWith(github.ref, 'refs/tags/') }}
218+ # uses: PyO3/maturin-action@v1
219+ # env:
220+ # MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
221+ # with:
222+ # command: upload
223+ # args: --non-interactive --skip-existing wheels-*/*
0 commit comments