1- # Taken from Polar-rs github action
2-
3- name : Create Python release
1+ # This file is autogenerated by maturin v1.8.1
2+ # To update, run
3+ #
4+ # maturin generate-ci github
5+ #
6+ name : CI
47
58on :
69 push :
10+ branches :
11+ - main
12+ - master
713 tags :
8- - py-*
14+ - ' *'
15+ pull_request :
16+ workflow_dispatch :
917
1018defaults :
1119 run :
1220 shell : bash
1321
22+ permissions :
23+ contents : read
24+
1425jobs :
15- manylinux-x64_64 :
16- runs-on : ubuntu-latest
26+ linux :
27+ runs-on : ${{ matrix.platform.runner }}
28+ strategy :
29+ matrix :
30+ platform :
31+ - runner : ubuntu-22.04
32+ target : x86_64
33+ - runner : ubuntu-22.04
34+ target : x86
35+ - runner : ubuntu-22.04
36+ target : aarch64
37+ - runner : ubuntu-22.04
38+ target : armv7
39+ - runner : ubuntu-22.04
40+ target : s390x
41+ - runner : ubuntu-22.04
42+ target : ppc64le
1743 steps :
1844 - uses : actions/checkout@v4
19- with :
20- submodules : ' recursive'
45+ - run : cd minimappers2
2146 - uses : actions/setup-python@v5
2247 with :
23- python-version : ' 3.7'
24-
25- - name : Publish wheel
48+ python-version : 3.x
49+ - name : Build wheels
2650 uses : PyO3/maturin-action@v1
27- env :
28- MATURIN_PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
29- RUSTFLAGS : -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma
3051 with :
31- rust-toolchain : nightly-2024-02-04
32- maturin-version : ' 1.6.0'
33- command : publish
34- args : -m minimappers2/Cargo.toml --skip-existing -o wheels -u jguhlin
35-
36- # Needed for Docker on Apple M1
37- # manylinux-aarch64:
38- # runs-on: ubuntu-latest
39- # steps:
40- # - uses: actions/checkout@v3
41- # - uses: actions/setup-python@v4
42- # with:
43- # python-version: '3.7'
44- #
45- # - name: Publish wheel
46- # uses: messense/maturin-action@v1
47- # env:
48- # MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
49- # with:
50- # rust-toolchain: nightly-2023-01-19
51- # target: aarch64-unknown-linux-gnu
52- # maturin-version: '0.14.10'
53- # command: publish
54- # args: -m minimappers2/Cargo.toml --skip-existing -o wheels -u jguhlin
52+ target : ${{ matrix.platform.target }}
53+ args : --release --out dist
54+ sccache : ' true'
55+ manylinux : auto
56+ - name : Build free-threaded wheels
57+ uses : PyO3/maturin-action@v1
58+ with :
59+ target : ${{ matrix.platform.target }}
60+ args : --release --out dist -i python3.13t
61+ sccache : ' true'
62+ manylinux : auto
63+ - name : Upload wheels
64+ uses : actions/upload-artifact@v4
65+ with :
66+ name : wheels-linux-${{ matrix.platform.target }}
67+ path : dist
5568
56- # uncomment to build a universal2 wheel
57- # we don't run it because it is twice as big and not needed because we build for both architectures separately
58- # macos-aarch64-universal:
59- # runs-on: macos-latest
60- # steps:
61- # - uses: actions/checkout@v3
62- # - uses: actions/setup-python@v4
63- # with:
64- # python-version: '3.7'
69+ musllinux :
70+ runs-on : ${{ matrix.platform.runner }}
71+ strategy :
72+ matrix :
73+ platform :
74+ - runner : ubuntu-22.04
75+ target : x86_64
76+ - runner : ubuntu-22.04
77+ target : x86
78+ - runner : ubuntu-22.04
79+ target : aarch64
80+ - runner : ubuntu-22.04
81+ target : armv7
82+ steps :
83+ - uses : actions/checkout@v4
84+ - run : cd minimappers2
85+ - uses : actions/setup-python@v5
86+ with :
87+ python-version : 3.x
88+ - name : Build wheels
89+ uses : PyO3/maturin-action@v1
90+ with :
91+ target : ${{ matrix.platform.target }}
92+ args : --release --out dist
93+ sccache : ' true'
94+ manylinux : musllinux_1_2
95+ - name : Build free-threaded wheels
96+ uses : PyO3/maturin-action@v1
97+ with :
98+ target : ${{ matrix.platform.target }}
99+ args : --release --out dist -i python3.13t
100+ sccache : ' true'
101+ manylinux : musllinux_1_2
102+ - name : Upload wheels
103+ uses : actions/upload-artifact@v4
104+ with :
105+ name : wheels-musllinux-${{ matrix.platform.target }}
106+ path : dist
65107
66- # - name: Fix README symlink
67- # run: |
68- # rm py-polars/README.md
69- # cp README.md py-polars/README.md
108+ # No support for minimap2 for windows
70109
71- # - name: Set up Rust
72- # uses: dtolnay/rust-toolchain@master
73- # with:
74- # toolchain: nightly-2023-01-19
110+ macos :
111+ runs-on : ${{ matrix.platform.runner }}
112+ strategy :
113+ matrix :
114+ platform :
115+ - runner : macos-13
116+ target : x86_64
117+ - runner : macos-14
118+ target : aarch64
119+ steps :
120+ - uses : actions/checkout@v4
121+ - run : cd minimappers2
122+ - uses : actions/setup-python@v5
123+ with :
124+ python-version : 3.x
125+ - name : Build wheels
126+ uses : PyO3/maturin-action@v1
127+ with :
128+ target : ${{ matrix.platform.target }}
129+ args : --release --out dist
130+ sccache : ' true'
131+ - name : Build free-threaded wheels
132+ uses : PyO3/maturin-action@v1
133+ with :
134+ target : ${{ matrix.platform.target }}
135+ args : --release --out dist -i python3.13t
136+ sccache : ' true'
137+ - name : Upload wheels
138+ uses : actions/upload-artifact@v4
139+ with :
140+ name : wheels-macos-${{ matrix.platform.target }}
141+ path : dist
75142
76- # - name: Set up Rust targets
77- # run: rustup target add aarch64-apple-darwin
143+ sdist :
144+ runs-on : ubuntu-latest
145+ steps :
146+ - uses : actions/checkout@v4
147+ - run : cd minimappers2
148+ - name : Build sdist
149+ uses : PyO3/maturin-action@v1
150+ with :
151+ command : sdist
152+ args : --out dist
153+ - name : Upload sdist
154+ uses : actions/upload-artifact@v4
155+ with :
156+ name : wheels-sdist
157+ path : dist
78158
79- # - name: Publish wheel
80- # uses: messense/maturin-action@v1
81- # env:
82- # MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
83- # with:
84- # maturin-version: '0.14.10'
85- # command: publish
86- # args: -m py-polars/Cargo.toml --no-sdist --universal2 -o wheels -i python -u ritchie46
159+ release :
160+ name : Release
161+ runs-on : ubuntu-latest
162+ if : ${{ startsWith(github.ref, 'refs/tags/py-') || github.event_name == 'workflow_dispatch' }}
163+ needs : [linux, musllinux, macos, sdist]
164+ permissions :
165+ # Use to sign the release artifacts
166+ id-token : write
167+ # Used to upload release artifacts
168+ contents : write
169+ # Used to generate artifact attestation
170+ attestations : write
171+ steps :
172+ - uses : actions/download-artifact@v4
173+ - run : cd minimappers2
174+ - name : Generate artifact attestation
175+ uses : actions/attest-build-provenance@v1
176+ with :
177+ subject-path : ' wheels-*/*'
178+ - name : Publish to PyPI
179+ if : ${{ startsWith(github.ref, 'refs/tags/') }}
180+ uses : PyO3/maturin-action@v1
181+ env :
182+ MATURIN_PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
183+ with :
184+ command : upload
185+ args : --non-interactive --skip-existing wheels-*/*
0 commit comments