crc32c-rs 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- crc32c_rs-0.0.1/.cargo/config.toml +6 -0
- crc32c_rs-0.0.1/.github/dependabot.yaml +17 -0
- crc32c_rs-0.0.1/.github/scripts/alpine/Dockerfile +15 -0
- crc32c_rs-0.0.1/.github/scripts/alpine/entrypoint.sh +12 -0
- crc32c_rs-0.0.1/.github/workflows/ci.yaml +253 -0
- crc32c_rs-0.0.1/.github/workflows/macos.yaml +68 -0
- crc32c_rs-0.0.1/.github/workflows/manylinux.yaml +102 -0
- crc32c_rs-0.0.1/.github/workflows/musllinux.yaml +95 -0
- crc32c_rs-0.0.1/.github/workflows/relator.yaml +29 -0
- crc32c_rs-0.0.1/.github/workflows/tests.yaml +76 -0
- crc32c_rs-0.0.1/.github/workflows/wasm.yaml +100 -0
- crc32c_rs-0.0.1/.github/workflows/windows.yaml +71 -0
- crc32c_rs-0.0.1/.gitignore +21 -0
- crc32c_rs-0.0.1/.godbolt/README.md +52 -0
- crc32c_rs-0.0.1/.godbolt/amd-x86_64/avx512vl_vpclmulqdq-v3s2x4/file.c +137 -0
- crc32c_rs-0.0.1/.godbolt/amd-x86_64/avx512vl_vpclmulqdq-v3s2x4/file.rs +252 -0
- crc32c_rs-0.0.1/.godbolt/amd-x86_64/sse42_pclmulqdq-v1s3x2/file.c +115 -0
- crc32c_rs-0.0.1/.godbolt/amd-x86_64/sse42_pclmulqdq-v1s3x2/file.rs +201 -0
- crc32c_rs-0.0.1/.godbolt/amd-x86_64/sse42_pclmulqdq-v1s3x3/file.c +126 -0
- crc32c_rs-0.0.1/.godbolt/amd-x86_64/sse42_pclmulqdq-v1s3x3/file.rs +228 -0
- crc32c_rs-0.0.1/.godbolt/amd-x86_64/sse42_pclmulqdq-v1s4x2/file.c +122 -0
- crc32c_rs-0.0.1/.godbolt/amd-x86_64/sse42_pclmulqdq-v1s4x2/file.rs +218 -0
- crc32c_rs-0.0.1/.godbolt/arm/aes_crc-v12e_v1/file.c +126 -0
- crc32c_rs-0.0.1/.godbolt/arm/aes_crc-v12e_v1/file.rs +175 -0
- crc32c_rs-0.0.1/.godbolt/arm/aes_crc-v3s4x2e_v2/file.c +165 -0
- crc32c_rs-0.0.1/.godbolt/arm/aes_crc-v3s4x2e_v2/file.rs +241 -0
- crc32c_rs-0.0.1/.godbolt/arm/aes_crc_sha3-v9s3x2e_s3/file.c +196 -0
- crc32c_rs-0.0.1/.godbolt/arm/aes_crc_sha3-v9s3x2e_s3/file.rs +297 -0
- crc32c_rs-0.0.1/.godbolt/godbolt_links.py +239 -0
- crc32c_rs-0.0.1/.godbolt/intel-x86_64/avx512vl_pclmulqdq-v9s3x4e/file.c +174 -0
- crc32c_rs-0.0.1/.godbolt/intel-x86_64/avx512vl_pclmulqdq-v9s3x4e/file.rs +344 -0
- crc32c_rs-0.0.1/.godbolt/intel-x86_64/avx512vl_vpclmulqdq-v3s1_s3/file.c +147 -0
- crc32c_rs-0.0.1/.godbolt/intel-x86_64/avx512vl_vpclmulqdq-v3s1_s3/file.rs +281 -0
- crc32c_rs-0.0.1/.godbolt/intel-x86_64/avx512vl_vpclmulqdq-v4s5x3/file.c +170 -0
- crc32c_rs-0.0.1/.godbolt/intel-x86_64/avx512vl_vpclmulqdq-v4s5x3/file.rs +330 -0
- crc32c_rs-0.0.1/.godbolt/intel-x86_64/see42_pclmulqdq-v7s3x3/file.c +161 -0
- crc32c_rs-0.0.1/.godbolt/intel-x86_64/see42_pclmulqdq-v7s3x3/file.rs +292 -0
- crc32c_rs-0.0.1/.godbolt/intel-x86_64/see42_pclmulqdq-v8s3x3/file.c +165 -0
- crc32c_rs-0.0.1/.godbolt/intel-x86_64/see42_pclmulqdq-v8s3x3/file.rs +292 -0
- crc32c_rs-0.0.1/.godbolt/intel-x86_64/sse42_pclmulqdq-v7s3x3/file.c +161 -0
- crc32c_rs-0.0.1/.godbolt/intel-x86_64/sse42_pclmulqdq-v7s3x3/file.rs +316 -0
- crc32c_rs-0.0.1/.godbolt/intel-x86_64/sse42_pclmulqdq-v8s3x3/file.c +165 -0
- crc32c_rs-0.0.1/.godbolt/intel-x86_64/sse42_pclmulqdq-v8s3x3/file.rs +310 -0
- crc32c_rs-0.0.1/Cargo.lock +173 -0
- crc32c_rs-0.0.1/Cargo.toml +82 -0
- crc32c_rs-0.0.1/PKG-INFO +199 -0
- crc32c_rs-0.0.1/README.md +165 -0
- crc32c_rs-0.0.1/UNLICENSE +24 -0
- crc32c_rs-0.0.1/benchmark/README.md +231 -0
- crc32c_rs-0.0.1/benchmark/run.py +310 -0
- crc32c_rs-0.0.1/clippy.toml +4 -0
- crc32c_rs-0.0.1/justfile +73 -0
- crc32c_rs-0.0.1/licenses/README.md +75 -0
- crc32c_rs-0.0.1/licenses/crc-fast-rust-LICENSE-Apache +201 -0
- crc32c_rs-0.0.1/licenses/crc-fast-rust-LICENSE-MIT +18 -0
- crc32c_rs-0.0.1/licenses/crc-fast-rust-LICENSE-Zlib +9 -0
- crc32c_rs-0.0.1/licenses/fast-crc32-LICENSE.MIT.md +19 -0
- crc32c_rs-0.0.1/licenses/fast-crc32-LICENSE.zlib.md +19 -0
- crc32c_rs-0.0.1/py-src/crc32c_rs/__init__.py +56 -0
- crc32c_rs-0.0.1/py-src/crc32c_rs/_crc32c_rs.pyi +124 -0
- crc32c_rs-0.0.1/py-src/crc32c_rs/_hasher.py +45 -0
- crc32c_rs-0.0.1/py-src/crc32c_rs/py.typed +3 -0
- crc32c_rs-0.0.1/pyproject.toml +95 -0
- crc32c_rs-0.0.1/pytest.toml +7 -0
- crc32c_rs-0.0.1/ruff.toml +62 -0
- crc32c_rs-0.0.1/rumdl.toml +23 -0
- crc32c_rs-0.0.1/rust-toolchain.toml +2 -0
- crc32c_rs-0.0.1/rustfmt.toml +9 -0
- crc32c_rs-0.0.1/scripts/table.py +44 -0
- crc32c_rs-0.0.1/src/arch/aes_crc_v12e_v1.rs +164 -0
- crc32c_rs-0.0.1/src/arch/aes_sha3_v9s3x2e_s3.rs +286 -0
- crc32c_rs-0.0.1/src/arch/aes_v3s4x2e_v2.rs +230 -0
- crc32c_rs-0.0.1/src/arch/avx512vl_pclmulqdq_v9s3x4e.rs +333 -0
- crc32c_rs-0.0.1/src/arch/avx512vl_vpclmulqdq_v3s1_s3.rs +270 -0
- crc32c_rs-0.0.1/src/arch/avx512vl_vpclmulqdq_v3s2x4.rs +241 -0
- crc32c_rs-0.0.1/src/arch/avx512vl_vpclmulqdq_v4s5x3.rs +319 -0
- crc32c_rs-0.0.1/src/arch/fallback.rs +125 -0
- crc32c_rs-0.0.1/src/arch/mod.rs +26 -0
- crc32c_rs-0.0.1/src/arch/see42_pclmulqdq_v7s3x3.rs +305 -0
- crc32c_rs-0.0.1/src/arch/sse42_pclmulqdq_v1s3x2.rs +190 -0
- crc32c_rs-0.0.1/src/arch/sse42_pclmulqdq_v1s3x3.rs +217 -0
- crc32c_rs-0.0.1/src/arch/sse42_pclmulqdq_v1s4x2.rs +207 -0
- crc32c_rs-0.0.1/src/arch/sse42_pclmulqdq_v7s3x3.rs +305 -0
- crc32c_rs-0.0.1/src/arch/sse42_pclmulqdq_v8s3x3.rs +299 -0
- crc32c_rs-0.0.1/src/arch/table.rs +534 -0
- crc32c_rs-0.0.1/src/exceptions.rs +3 -0
- crc32c_rs-0.0.1/src/lib.rs +348 -0
- crc32c_rs-0.0.1/src/py_buffer.rs +35 -0
- crc32c_rs-0.0.1/src/simd_dispatch.rs +248 -0
- crc32c_rs-0.0.1/tests/__init__.py +0 -0
- crc32c_rs-0.0.1/tests/conftest.py +67 -0
- crc32c_rs-0.0.1/tests/test_crc32c.py +64 -0
- crc32c_rs-0.0.1/tests/test_hasher.py +260 -0
- crc32c_rs-0.0.1/tests/test_wasm.py +24 -0
- crc32c_rs-0.0.1/tests/types.py +18 -0
- crc32c_rs-0.0.1/ty.toml +13 -0
- crc32c_rs-0.0.1/typos.toml +12 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
|
|
3
|
+
updates:
|
|
4
|
+
- package-ecosystem: "github-actions"
|
|
5
|
+
directory: "/"
|
|
6
|
+
schedule:
|
|
7
|
+
interval: "weekly"
|
|
8
|
+
target-branch: main
|
|
9
|
+
cooldown:
|
|
10
|
+
default-days: 7
|
|
11
|
+
|
|
12
|
+
- package-ecosystem: "cargo" # zizmor: ignore[dependabot-cooldown]
|
|
13
|
+
directory: "/"
|
|
14
|
+
schedule:
|
|
15
|
+
interval: "cron"
|
|
16
|
+
cronjob: "0 12 * * *"
|
|
17
|
+
target-branch: main
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
FROM docker.io/library/python:3.14-alpine
|
|
2
|
+
|
|
3
|
+
RUN apk add --no-cache curl build-base
|
|
4
|
+
|
|
5
|
+
RUN curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | \
|
|
6
|
+
sh -s -- -y --profile minimal --default-toolchain nightly
|
|
7
|
+
|
|
8
|
+
ENV PATH="/root/.cargo/bin:${PATH}"
|
|
9
|
+
|
|
10
|
+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/
|
|
11
|
+
COPY entrypoint.sh /entrypoint.sh
|
|
12
|
+
|
|
13
|
+
RUN chmod +x /entrypoint.sh
|
|
14
|
+
|
|
15
|
+
ENTRYPOINT ["/entrypoint.sh"]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
cd /app
|
|
5
|
+
|
|
6
|
+
uv pip install --group maturin --system
|
|
7
|
+
|
|
8
|
+
maturin build --out wheels --features mimalloc
|
|
9
|
+
|
|
10
|
+
uv pip install crc32c-rs --no-index --find-links wheels --force-reinstall --system
|
|
11
|
+
|
|
12
|
+
python -c "import crc32c_rs; print(crc32c_rs.__version__)"
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
permissions: { }
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
branches: [
|
|
8
|
+
"main",
|
|
9
|
+
]
|
|
10
|
+
tags: ["*"]
|
|
11
|
+
pull_request:
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
|
|
16
|
+
cancel-in-progress: true
|
|
17
|
+
|
|
18
|
+
env:
|
|
19
|
+
FORCE_COLOR: "1"
|
|
20
|
+
CARGO_TERM_COLOR: always
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
cargo-fmt:
|
|
24
|
+
name: "cargo fmt"
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
timeout-minutes: 10
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
29
|
+
with:
|
|
30
|
+
persist-credentials: false
|
|
31
|
+
|
|
32
|
+
- uses: dtolnay/rust-toolchain@nightly # zizmor: ignore[unpinned-uses]
|
|
33
|
+
with:
|
|
34
|
+
components: rustfmt
|
|
35
|
+
|
|
36
|
+
- run: cargo fmt-nightly --check
|
|
37
|
+
|
|
38
|
+
cargo-clippy:
|
|
39
|
+
name: "cargo clippy / ${{ matrix.target }}"
|
|
40
|
+
runs-on: ${{ matrix.os }}
|
|
41
|
+
timeout-minutes: 10
|
|
42
|
+
strategy:
|
|
43
|
+
fail-fast: false
|
|
44
|
+
matrix:
|
|
45
|
+
include:
|
|
46
|
+
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu }
|
|
47
|
+
- { os: ubuntu-26.04-arm, target: aarch64-unknown-linux-gnu }
|
|
48
|
+
- { os: windows-latest, target: x86_64-pc-windows-msvc }
|
|
49
|
+
- { os: macos-26-intel, target: x86_64-apple-darwin }
|
|
50
|
+
- { os: macos-latest, target: aarch64-apple-darwin }
|
|
51
|
+
steps:
|
|
52
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
53
|
+
with:
|
|
54
|
+
persist-credentials: false
|
|
55
|
+
|
|
56
|
+
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
|
|
57
|
+
if: github.event_name == 'pull_request'
|
|
58
|
+
with:
|
|
59
|
+
lookup-only: false # zizmor: ignore[cache-poisoning]
|
|
60
|
+
shared-key: cargo-clippy-${{ matrix.target }}
|
|
61
|
+
|
|
62
|
+
- uses: dtolnay/rust-toolchain@nightly # zizmor: ignore[unpinned-uses]
|
|
63
|
+
with:
|
|
64
|
+
components: clippy
|
|
65
|
+
targets: ${{ matrix.target }}
|
|
66
|
+
|
|
67
|
+
- run: cargo clippy --target ${{ matrix.target }} --all-targets --all-features
|
|
68
|
+
|
|
69
|
+
tools:
|
|
70
|
+
name: ${{ matrix.name }}
|
|
71
|
+
runs-on: ubuntu-latest
|
|
72
|
+
|
|
73
|
+
strategy:
|
|
74
|
+
matrix:
|
|
75
|
+
include:
|
|
76
|
+
- name: "zizmor"
|
|
77
|
+
command: zizmor .github/
|
|
78
|
+
|
|
79
|
+
- name: "typos"
|
|
80
|
+
command: typos --config typos.toml
|
|
81
|
+
|
|
82
|
+
- name: "rumdl"
|
|
83
|
+
command: rumdl check .
|
|
84
|
+
|
|
85
|
+
steps:
|
|
86
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
87
|
+
with:
|
|
88
|
+
persist-credentials: false
|
|
89
|
+
|
|
90
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
91
|
+
with:
|
|
92
|
+
python-version: "3.14"
|
|
93
|
+
|
|
94
|
+
- name: "Install uv"
|
|
95
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
96
|
+
with:
|
|
97
|
+
# zizmor: ignore[cache-poisoning]
|
|
98
|
+
enable-cache: ${{ github.event_name == 'pull_request' }}
|
|
99
|
+
|
|
100
|
+
- name: "Install ${{ matrix.name }}"
|
|
101
|
+
run: uv pip install --group ${{ matrix.name }} --system
|
|
102
|
+
|
|
103
|
+
- name: "Run ${{ matrix.name }}"
|
|
104
|
+
run: ${{ matrix.command }}
|
|
105
|
+
|
|
106
|
+
tests-alpine:
|
|
107
|
+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-tests') }}
|
|
108
|
+
|
|
109
|
+
name: "tests / alpine / python 3.14"
|
|
110
|
+
runs-on: ubuntu-latest
|
|
111
|
+
timeout-minutes: 10
|
|
112
|
+
steps:
|
|
113
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
114
|
+
with:
|
|
115
|
+
persist-credentials: false
|
|
116
|
+
|
|
117
|
+
- name: "Run build on alpine"
|
|
118
|
+
run: |
|
|
119
|
+
docker build -t alpine-test .github/scripts/alpine
|
|
120
|
+
docker run --rm -v "$PWD":/app -w /app alpine-test
|
|
121
|
+
|
|
122
|
+
tests:
|
|
123
|
+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-tests') }}
|
|
124
|
+
|
|
125
|
+
uses: $/.github/workflows/tests.yaml
|
|
126
|
+
|
|
127
|
+
manylinux:
|
|
128
|
+
if: ${{ always() && !failure() && !cancelled() }}
|
|
129
|
+
|
|
130
|
+
needs: [ tests, tests-alpine, cargo-fmt, cargo-clippy, tools ]
|
|
131
|
+
uses: $/.github/workflows/manylinux.yaml
|
|
132
|
+
|
|
133
|
+
musllinux:
|
|
134
|
+
if: ${{ always() && !failure() && !cancelled() }}
|
|
135
|
+
|
|
136
|
+
needs: [ tests, tests-alpine, cargo-fmt, cargo-clippy, tools ]
|
|
137
|
+
uses: $/.github/workflows/musllinux.yaml
|
|
138
|
+
|
|
139
|
+
windows:
|
|
140
|
+
if: ${{ always() && !failure() && !cancelled() }}
|
|
141
|
+
|
|
142
|
+
needs: [ tests, tests-alpine, cargo-fmt, cargo-clippy, tools ]
|
|
143
|
+
uses: $/.github/workflows/windows.yaml
|
|
144
|
+
|
|
145
|
+
macos:
|
|
146
|
+
if: ${{ always() && !failure() && !cancelled() }}
|
|
147
|
+
|
|
148
|
+
needs: [ tests, tests-alpine, cargo-fmt, cargo-clippy, tools ]
|
|
149
|
+
uses: $/.github/workflows/macos.yaml
|
|
150
|
+
|
|
151
|
+
wasm:
|
|
152
|
+
if: ${{ always() && !failure() && !cancelled() }}
|
|
153
|
+
|
|
154
|
+
needs: [ tests, tests-alpine, cargo-fmt, cargo-clippy, tools ]
|
|
155
|
+
uses: $/.github/workflows/wasm.yaml
|
|
156
|
+
|
|
157
|
+
build-sdist:
|
|
158
|
+
name: "build sdist"
|
|
159
|
+
runs-on: ubuntu-latest
|
|
160
|
+
steps:
|
|
161
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
162
|
+
with:
|
|
163
|
+
persist-credentials: false
|
|
164
|
+
|
|
165
|
+
- name: "Build sdist"
|
|
166
|
+
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
|
|
167
|
+
with:
|
|
168
|
+
command: sdist
|
|
169
|
+
args: --out dist
|
|
170
|
+
|
|
171
|
+
- name: "Upload sdist"
|
|
172
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
173
|
+
with:
|
|
174
|
+
name: wheels-sdist
|
|
175
|
+
path: dist
|
|
176
|
+
|
|
177
|
+
release-pypi:
|
|
178
|
+
if: ${{ always() && !failure() && !cancelled() }}
|
|
179
|
+
|
|
180
|
+
name: "Publish to PyPI"
|
|
181
|
+
runs-on: ubuntu-latest
|
|
182
|
+
needs: [
|
|
183
|
+
build-sdist,
|
|
184
|
+
manylinux,
|
|
185
|
+
musllinux,
|
|
186
|
+
windows,
|
|
187
|
+
macos,
|
|
188
|
+
wasm,
|
|
189
|
+
]
|
|
190
|
+
environment: pypi
|
|
191
|
+
permissions:
|
|
192
|
+
# Used to sign the release's artifacts and upload to PyPI using trusted publisher
|
|
193
|
+
id-token: write
|
|
194
|
+
steps:
|
|
195
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
196
|
+
|
|
197
|
+
- name: "Install uv"
|
|
198
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
199
|
+
with:
|
|
200
|
+
enable-cache: false
|
|
201
|
+
|
|
202
|
+
- name: "Validate PyPI publication"
|
|
203
|
+
run: uv publish 'wheels-*/*' --dry-run
|
|
204
|
+
|
|
205
|
+
- name: "Generate PyPI publish attestations"
|
|
206
|
+
if: github.ref_type == 'tag'
|
|
207
|
+
uses: astral-sh/attest-action@f589a42a7efb6fe400b4f400de60b4bc90390027 # v0.0.6
|
|
208
|
+
with:
|
|
209
|
+
paths: |
|
|
210
|
+
wheels-*/*.whl
|
|
211
|
+
wheels-*/*.tar.gz
|
|
212
|
+
|
|
213
|
+
- name: "Publish to PyPI"
|
|
214
|
+
if: github.ref_type == 'tag'
|
|
215
|
+
run: uv publish --trusted-publishing=always 'wheels-*/*'
|
|
216
|
+
|
|
217
|
+
release-github:
|
|
218
|
+
if: ${{ github.ref_type == 'tag' && always() && !failure() && !cancelled() }}
|
|
219
|
+
|
|
220
|
+
name: "Publish to GitHub Release"
|
|
221
|
+
runs-on: ubuntu-latest
|
|
222
|
+
needs: [
|
|
223
|
+
build-sdist,
|
|
224
|
+
manylinux,
|
|
225
|
+
musllinux,
|
|
226
|
+
windows,
|
|
227
|
+
macos,
|
|
228
|
+
wasm,
|
|
229
|
+
]
|
|
230
|
+
permissions:
|
|
231
|
+
# Use to sign the release artifacts
|
|
232
|
+
id-token: write
|
|
233
|
+
# Used to upload release artifacts
|
|
234
|
+
contents: write
|
|
235
|
+
# Used to generate artifact attestation
|
|
236
|
+
attestations: write
|
|
237
|
+
steps:
|
|
238
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
239
|
+
|
|
240
|
+
- name: "Generate artifact attestation"
|
|
241
|
+
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
|
|
242
|
+
with:
|
|
243
|
+
subject-path: "wheels-wasm-*/*.whl"
|
|
244
|
+
|
|
245
|
+
- name: "Publish WASM wheels to GitHub Release"
|
|
246
|
+
run: |
|
|
247
|
+
tag="${GITHUB_REF#refs/tags/}"
|
|
248
|
+
gh release view "$tag" >/dev/null 2>&1 || \
|
|
249
|
+
gh release create "$tag" --title "$tag" --notes ""
|
|
250
|
+
gh release upload "$tag" wheels-wasm-*/*.whl --clobber
|
|
251
|
+
env:
|
|
252
|
+
GH_REPO: ${{ github.repository }}
|
|
253
|
+
GH_TOKEN: ${{ github.token }}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
name: "macOS"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
|
|
6
|
+
env:
|
|
7
|
+
○_○: &interpreters "3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11"
|
|
8
|
+
#
|
|
9
|
+
(^_^): &is_pull_request ${{ github.event_name == 'pull_request' }}
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
macos:
|
|
13
|
+
name: "${{ matrix.platform.runner }} / ${{ matrix.platform.target }}"
|
|
14
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
15
|
+
strategy:
|
|
16
|
+
fail-fast: false
|
|
17
|
+
matrix:
|
|
18
|
+
# See: https://docs.github.com/en/actions/reference/runners/github-hosted-runners
|
|
19
|
+
platform:
|
|
20
|
+
- {
|
|
21
|
+
# Intel Mac
|
|
22
|
+
runner: macos-26-intel,
|
|
23
|
+
target: x86_64-apple-darwin,
|
|
24
|
+
interpreter: *interpreters,
|
|
25
|
+
maturin-build-args: "--features mimalloc",
|
|
26
|
+
}
|
|
27
|
+
- {
|
|
28
|
+
# Apple Silicon M1-M4
|
|
29
|
+
runner: macos-latest,
|
|
30
|
+
target: aarch64-apple-darwin,
|
|
31
|
+
interpreter: *interpreters,
|
|
32
|
+
maturin-build-args: "--features mimalloc",
|
|
33
|
+
}
|
|
34
|
+
- {
|
|
35
|
+
# Universal binary (Intel + Apple Silicon)
|
|
36
|
+
runner: macos-latest,
|
|
37
|
+
target: universal2-apple-darwin,
|
|
38
|
+
interpreter: *interpreters,
|
|
39
|
+
maturin-build-args: "--features mimalloc",
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
44
|
+
with:
|
|
45
|
+
persist-credentials: false
|
|
46
|
+
|
|
47
|
+
- name: "Install uv"
|
|
48
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
49
|
+
with:
|
|
50
|
+
enable-cache: *is_pull_request
|
|
51
|
+
|
|
52
|
+
- name: "Build wheels"
|
|
53
|
+
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
|
|
54
|
+
with:
|
|
55
|
+
target: ${{ matrix.platform.target }}
|
|
56
|
+
sccache: *is_pull_request
|
|
57
|
+
args: >-
|
|
58
|
+
--release
|
|
59
|
+
--out dist
|
|
60
|
+
--interpreter ${{ matrix.platform.interpreter }}
|
|
61
|
+
${{ matrix.platform.maturin-build-args || '' }}
|
|
62
|
+
--compatibility pypi
|
|
63
|
+
|
|
64
|
+
- name: "Upload wheels"
|
|
65
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
66
|
+
with:
|
|
67
|
+
name: wheels-macos-${{ matrix.platform.target }}
|
|
68
|
+
path: dist
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
name: "manylinux"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
|
|
6
|
+
env:
|
|
7
|
+
○_○: &interpreters "3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11"
|
|
8
|
+
#
|
|
9
|
+
(^_^): &is_pull_request ${{ github.event_name == 'pull_request' }}
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
linux:
|
|
13
|
+
name: "${{ matrix.platform.runner }} / ${{ matrix.platform.target }}"
|
|
14
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
15
|
+
strategy:
|
|
16
|
+
fail-fast: false
|
|
17
|
+
matrix:
|
|
18
|
+
# Rust target `loongarch64-unknown-linux-gnu` is not supported by PyPI
|
|
19
|
+
#
|
|
20
|
+
# See: https://docs.github.com/en/actions/reference/runners/github-hosted-runners
|
|
21
|
+
platform:
|
|
22
|
+
- {
|
|
23
|
+
# AMD64
|
|
24
|
+
runner: ubuntu-latest,
|
|
25
|
+
target: x86_64-unknown-linux-gnu,
|
|
26
|
+
interpreter: *interpreters,
|
|
27
|
+
maturin-build-args: "--features mimalloc",
|
|
28
|
+
}
|
|
29
|
+
- {
|
|
30
|
+
# x86 (32-bit)
|
|
31
|
+
runner: ubuntu-latest,
|
|
32
|
+
target: i686-unknown-linux-gnu,
|
|
33
|
+
interpreter: *interpreters,
|
|
34
|
+
maturin-build-args: "--features mimalloc",
|
|
35
|
+
}
|
|
36
|
+
- {
|
|
37
|
+
# ARM64
|
|
38
|
+
runner: ubuntu-26.04-arm,
|
|
39
|
+
target: aarch64-unknown-linux-gnu,
|
|
40
|
+
interpreter: *interpreters,
|
|
41
|
+
maturin-build-args: "--features mimalloc",
|
|
42
|
+
}
|
|
43
|
+
- {
|
|
44
|
+
# ARMv7 (32-bit)
|
|
45
|
+
runner: ubuntu-latest,
|
|
46
|
+
target: armv7-unknown-linux-gnueabihf,
|
|
47
|
+
interpreter: *interpreters,
|
|
48
|
+
}
|
|
49
|
+
- {
|
|
50
|
+
# IBM System z (s390x)
|
|
51
|
+
runner: ubuntu-latest,
|
|
52
|
+
target: s390x-unknown-linux-gnu,
|
|
53
|
+
interpreter: *interpreters,
|
|
54
|
+
}
|
|
55
|
+
- {
|
|
56
|
+
# PowerPC64 Little Endian
|
|
57
|
+
runner: ubuntu-latest,
|
|
58
|
+
target: powerpc64le-unknown-linux-gnu,
|
|
59
|
+
interpreter: *interpreters,
|
|
60
|
+
}
|
|
61
|
+
- {
|
|
62
|
+
# PowerPC64 Big Endian
|
|
63
|
+
runner: ubuntu-latest,
|
|
64
|
+
target: powerpc64-unknown-linux-gnu,
|
|
65
|
+
interpreter: *interpreters,
|
|
66
|
+
}
|
|
67
|
+
- {
|
|
68
|
+
# RISC-V 64-bit
|
|
69
|
+
runner: ubuntu-latest,
|
|
70
|
+
target: riscv64gc-unknown-linux-gnu,
|
|
71
|
+
interpreter: *interpreters,
|
|
72
|
+
maturin-build-args: "--features mimalloc",
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
steps:
|
|
76
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
77
|
+
with:
|
|
78
|
+
persist-credentials: false
|
|
79
|
+
|
|
80
|
+
- name: "Install uv"
|
|
81
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
82
|
+
with:
|
|
83
|
+
enable-cache: *is_pull_request
|
|
84
|
+
|
|
85
|
+
- name: "Build wheels"
|
|
86
|
+
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
|
|
87
|
+
with:
|
|
88
|
+
target: ${{ matrix.platform.target }}
|
|
89
|
+
sccache: *is_pull_request
|
|
90
|
+
manylinux: auto
|
|
91
|
+
args: >-
|
|
92
|
+
--release
|
|
93
|
+
--out dist
|
|
94
|
+
--interpreter ${{ matrix.platform.interpreter }}
|
|
95
|
+
${{ matrix.platform.maturin-build-args || '' }}
|
|
96
|
+
--compatibility pypi
|
|
97
|
+
|
|
98
|
+
- name: "Upload wheels"
|
|
99
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
100
|
+
with:
|
|
101
|
+
name: wheels-linux-${{ matrix.platform.target }}
|
|
102
|
+
path: dist
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
name: "musllinux"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
|
|
6
|
+
env:
|
|
7
|
+
○_○: &interpreters "3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11"
|
|
8
|
+
#
|
|
9
|
+
(^_^): &is_pull_request ${{ github.event_name == 'pull_request' }}
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
musllinux:
|
|
13
|
+
name: "${{ matrix.platform.runner }} / ${{ matrix.platform.target }}"
|
|
14
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
15
|
+
strategy:
|
|
16
|
+
fail-fast: false
|
|
17
|
+
matrix:
|
|
18
|
+
# Rust target `loongarch64-unknown-linux-musl` is not supported by PyPI
|
|
19
|
+
#
|
|
20
|
+
# Rust targets `s390x-unknown-linux-musl`, `powerpc64-unknown-linux-musl`
|
|
21
|
+
# is not available for cross-compilation (only supported for manylinux)
|
|
22
|
+
#
|
|
23
|
+
# See: https://docs.github.com/en/actions/reference/runners/github-hosted-runners
|
|
24
|
+
platform:
|
|
25
|
+
- {
|
|
26
|
+
# AMD64
|
|
27
|
+
runner: ubuntu-latest,
|
|
28
|
+
target: x86_64-unknown-linux-musl,
|
|
29
|
+
interpreter: *interpreters,
|
|
30
|
+
maturin-build-args: "--features mimalloc"
|
|
31
|
+
}
|
|
32
|
+
- {
|
|
33
|
+
# x86 (32-bit)
|
|
34
|
+
runner: ubuntu-latest,
|
|
35
|
+
target: i686-unknown-linux-musl,
|
|
36
|
+
interpreter: *interpreters,
|
|
37
|
+
maturin-build-args: "--features mimalloc"
|
|
38
|
+
}
|
|
39
|
+
- {
|
|
40
|
+
# ARM64
|
|
41
|
+
runner: ubuntu-26.04-arm,
|
|
42
|
+
target: aarch64-unknown-linux-musl,
|
|
43
|
+
interpreter: *interpreters,
|
|
44
|
+
maturin-build-args: "--features mimalloc"
|
|
45
|
+
}
|
|
46
|
+
- {
|
|
47
|
+
# ARMv7 (32-bit)
|
|
48
|
+
runner: ubuntu-latest,
|
|
49
|
+
target: armv7-unknown-linux-musleabihf,
|
|
50
|
+
interpreter: *interpreters,
|
|
51
|
+
maturin-build-args: "--features mimalloc"
|
|
52
|
+
}
|
|
53
|
+
- {
|
|
54
|
+
# PowerPC64 Little Endian
|
|
55
|
+
runner: ubuntu-latest,
|
|
56
|
+
target: powerpc64le-unknown-linux-musl,
|
|
57
|
+
interpreter: *interpreters,
|
|
58
|
+
maturin-build-args: "--features mimalloc"
|
|
59
|
+
}
|
|
60
|
+
- {
|
|
61
|
+
# RISC-V 64-bit
|
|
62
|
+
runner: ubuntu-latest,
|
|
63
|
+
target: riscv64gc-unknown-linux-musl,
|
|
64
|
+
interpreter: *interpreters,
|
|
65
|
+
maturin-build-args: "--features mimalloc"
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
steps:
|
|
69
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
70
|
+
with:
|
|
71
|
+
persist-credentials: false
|
|
72
|
+
|
|
73
|
+
- name: "Install uv"
|
|
74
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
75
|
+
with:
|
|
76
|
+
enable-cache: *is_pull_request
|
|
77
|
+
|
|
78
|
+
- name: "Build wheels"
|
|
79
|
+
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
|
|
80
|
+
with:
|
|
81
|
+
target: ${{ matrix.platform.target }}
|
|
82
|
+
sccache: *is_pull_request
|
|
83
|
+
manylinux: musllinux_1_2
|
|
84
|
+
args: >-
|
|
85
|
+
--release
|
|
86
|
+
--out dist
|
|
87
|
+
--interpreter ${{ matrix.platform.interpreter }}
|
|
88
|
+
${{ matrix.platform.maturin-build-args || '' }}
|
|
89
|
+
--compatibility pypi
|
|
90
|
+
|
|
91
|
+
- name: "Upload wheels"
|
|
92
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
93
|
+
with:
|
|
94
|
+
name: wheels-musllinux-${{ matrix.platform.target }}
|
|
95
|
+
path: dist
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: "Event Notifier"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
issues:
|
|
5
|
+
types: [opened, reopened]
|
|
6
|
+
pull_request_target:
|
|
7
|
+
# zizmor: ignore[dangerous-triggers]
|
|
8
|
+
types: [opened, reopened]
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
issues: read
|
|
12
|
+
pull-requests: read
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: ${{ github.workflow }}-${{ github.event.issue.number || github.event.pull_request.number }}
|
|
16
|
+
cancel-in-progress: true
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
notify:
|
|
20
|
+
name: "Telegram notification"
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
steps:
|
|
23
|
+
- name: "Send Telegram notification for new issue or pull request"
|
|
24
|
+
uses: reagento/relator@4b1531359edba1228db0906e8931b0da2aef69cd # v1.7.0
|
|
25
|
+
with:
|
|
26
|
+
tg-bot-token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
|
27
|
+
# https://t.me/gh_lava_sh
|
|
28
|
+
tg-chat-id: -1003895051033
|
|
29
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: "tests"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
|
|
6
|
+
env:
|
|
7
|
+
FORCE_COLOR: "1"
|
|
8
|
+
CARGO_TERM_COLOR: always
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
tests:
|
|
12
|
+
name: "${{ matrix.os }} / python ${{ matrix.python-version }}"
|
|
13
|
+
runs-on: ${{ matrix.os }}
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: false
|
|
16
|
+
matrix:
|
|
17
|
+
python-version: [
|
|
18
|
+
"3.11",
|
|
19
|
+
"3.12",
|
|
20
|
+
"3.13",
|
|
21
|
+
"3.14", "3.14t",
|
|
22
|
+
"3.15", "3.15t",
|
|
23
|
+
"pypy3.11",
|
|
24
|
+
]
|
|
25
|
+
os: [
|
|
26
|
+
"ubuntu-latest",
|
|
27
|
+
"windows-latest",
|
|
28
|
+
"macos-latest",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
33
|
+
with:
|
|
34
|
+
persist-credentials: false
|
|
35
|
+
|
|
36
|
+
- name: "Install uv"
|
|
37
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
38
|
+
with:
|
|
39
|
+
enable-cache: false
|
|
40
|
+
|
|
41
|
+
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
|
|
42
|
+
if: github.event_name == 'pull_request' && github.run_attempt == 1
|
|
43
|
+
with:
|
|
44
|
+
lookup-only: false # zizmor: ignore[cache-poisoning]
|
|
45
|
+
shared-key: ${{ matrix.os }}-${{ matrix.python-version }}
|
|
46
|
+
|
|
47
|
+
- name: "Create and activate .venv"
|
|
48
|
+
shell: bash
|
|
49
|
+
run: |
|
|
50
|
+
uv venv .venv --python ${{ matrix.python-version }}
|
|
51
|
+
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
|
|
52
|
+
echo ".venv/Scripts" >> "$GITHUB_PATH"
|
|
53
|
+
echo "PYO3_PYTHON=.venv/Scripts/python" >> "$GITHUB_ENV"
|
|
54
|
+
echo "UV_LINK_MODE=copy" >> "$GITHUB_ENV"
|
|
55
|
+
else
|
|
56
|
+
echo ".venv/bin" >> "$GITHUB_PATH"
|
|
57
|
+
echo "PYO3_PYTHON=.venv/bin/python3" >> "$GITHUB_ENV"
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
- name: "Install dependencies"
|
|
61
|
+
run: uv pip install --group ci
|
|
62
|
+
|
|
63
|
+
- name: "Run maturin"
|
|
64
|
+
run: maturin build --out wheels --features mimalloc
|
|
65
|
+
|
|
66
|
+
- name: "Install built wheel"
|
|
67
|
+
run: uv pip install crc32c-rs --no-index --find-links wheels --force-reinstall
|
|
68
|
+
|
|
69
|
+
- name: "Run ruff"
|
|
70
|
+
run: ruff check
|
|
71
|
+
|
|
72
|
+
- name: "Run ty"
|
|
73
|
+
run: ty check
|
|
74
|
+
|
|
75
|
+
- name: "Run pytest"
|
|
76
|
+
run: pytest
|