blasthttp 0.1.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.
@@ -0,0 +1,6 @@
1
+ # Point openssl-sys at our custom OpenSSL build (with weak ciphers enabled).
2
+ # Run `scripts/build-openssl.sh` first to create vendor/openssl/install/.
3
+ [env]
4
+ OPENSSL_DIR = { value = "vendor/openssl/install", relative = true }
5
+ OPENSSL_STATIC = "1"
6
+ OPENSSL_NO_VENDOR = "1"
@@ -0,0 +1,182 @@
1
+ name: Python Tests
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - stable
8
+ workflow_dispatch:
9
+
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: true
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ jobs:
18
+ python-tests:
19
+ runs-on: ubuntu-latest
20
+ strategy:
21
+ matrix:
22
+ python-version:
23
+ - "3.10"
24
+ - "3.11"
25
+ - "3.12"
26
+ - "3.13"
27
+ - "3.14"
28
+
29
+ steps:
30
+ - uses: actions/checkout@v6
31
+
32
+ - name: Install Rust toolchain
33
+ uses: actions-rust-lang/setup-rust-toolchain@v1
34
+
35
+ - name: Set up Python
36
+ uses: actions/setup-python@v6
37
+ with:
38
+ python-version: ${{ matrix.python-version }}
39
+
40
+ - name: Cache OpenSSL build
41
+ uses: actions/cache@v4
42
+ with:
43
+ path: vendor/openssl/install
44
+ key: openssl-3.3.2-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('scripts/build-openssl.sh') }}
45
+
46
+ - name: Build custom OpenSSL
47
+ run: ./scripts/build-openssl.sh
48
+
49
+ - name: Install maturin
50
+ run: pip install maturin
51
+
52
+ - name: Build Python extension
53
+ run: maturin develop --release
54
+
55
+ - name: Verify module
56
+ run: python -c "import blasthttp; print(f'blasthttp {blasthttp.__version__}')"
57
+
58
+ linux-build:
59
+ needs: python-tests
60
+ if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
61
+ runs-on: ${{ matrix.platform.runner }}
62
+ strategy:
63
+ matrix:
64
+ platform:
65
+ - runner: ubuntu-22.04
66
+ target: x86_64
67
+ - runner: ubuntu-22.04
68
+ target: x86
69
+ - runner: ubuntu-22.04
70
+ target: aarch64
71
+ - runner: ubuntu-22.04
72
+ target: armv7
73
+ - runner: ubuntu-22.04
74
+ target: s390x
75
+ - runner: ubuntu-22.04
76
+ target: ppc64le
77
+ steps:
78
+ - uses: actions/checkout@v6
79
+ - uses: actions/setup-python@v6
80
+ with:
81
+ python-version: 3.x
82
+ - name: Build wheels
83
+ uses: PyO3/maturin-action@v1
84
+ with:
85
+ target: ${{ matrix.platform.target }}
86
+ args: --release --out dist --find-interpreter
87
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
88
+ manylinux: auto
89
+ before-script-linux: |
90
+ set -e
91
+ # Install OpenSSL build dependencies
92
+ if command -v apk >/dev/null 2>&1; then
93
+ apk add --no-cache perl make gcc musl-dev linux-headers curl bash
94
+ elif command -v yum >/dev/null 2>&1; then
95
+ yum install -y perl-IPC-Cmd 2>/dev/null || true
96
+ fi
97
+ # Build custom OpenSSL with weak cipher support
98
+ ./scripts/build-openssl.sh
99
+ - name: Upload wheels
100
+ uses: actions/upload-artifact@v7
101
+ with:
102
+ name: wheels-linux-${{ matrix.platform.target }}
103
+ path: dist
104
+
105
+ musllinux-build:
106
+ needs: python-tests
107
+ if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
108
+ runs-on: ${{ matrix.platform.runner }}
109
+ strategy:
110
+ matrix:
111
+ platform:
112
+ - runner: ubuntu-22.04
113
+ target: x86_64
114
+ - runner: ubuntu-22.04
115
+ target: x86
116
+ - runner: ubuntu-22.04
117
+ target: aarch64
118
+ - runner: ubuntu-22.04
119
+ target: armv7
120
+ steps:
121
+ - uses: actions/checkout@v6
122
+ - uses: actions/setup-python@v6
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 --find-interpreter
130
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
131
+ manylinux: musllinux_1_2
132
+ before-script-linux: |
133
+ set -e
134
+ apk add --no-cache perl make gcc musl-dev linux-headers curl bash
135
+ ./scripts/build-openssl.sh
136
+ - name: Upload wheels
137
+ uses: actions/upload-artifact@v7
138
+ with:
139
+ name: wheels-musllinux-${{ matrix.platform.target }}
140
+ path: dist
141
+
142
+ sdist-build:
143
+ needs: python-tests
144
+ runs-on: ubuntu-latest
145
+ if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
146
+ steps:
147
+ - uses: actions/checkout@v6
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@v7
155
+ with:
156
+ name: wheels-sdist
157
+ path: dist
158
+
159
+ release:
160
+ name: Release
161
+ needs:
162
+ - linux-build
163
+ - musllinux-build
164
+ - sdist-build
165
+ runs-on: ubuntu-latest
166
+ permissions:
167
+ id-token: write
168
+ contents: write
169
+ attestations: write
170
+ steps:
171
+ - uses: actions/download-artifact@v8
172
+ - name: Generate artifact attestation
173
+ uses: actions/attest-build-provenance@v4
174
+ with:
175
+ subject-path: 'wheels-*/*'
176
+ - name: Publish to PyPI
177
+ uses: PyO3/maturin-action@v1
178
+ env:
179
+ MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
180
+ with:
181
+ command: upload
182
+ args: --non-interactive --skip-existing wheels-*/*
@@ -0,0 +1,71 @@
1
+ name: Rust Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [stable]
6
+ pull_request:
7
+
8
+ concurrency:
9
+ group: ${{ github.workflow }}-${{ github.ref }}
10
+ cancel-in-progress: true
11
+
12
+ jobs:
13
+ rust-tests:
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - uses: actions/checkout@v6
18
+
19
+ - name: Install Rust toolchain
20
+ uses: actions-rust-lang/setup-rust-toolchain@v1
21
+
22
+ - name: Check formatting
23
+ run: cargo fmt --all -- --check
24
+
25
+ - name: Cache OpenSSL build
26
+ uses: actions/cache@v4
27
+ with:
28
+ path: vendor/openssl/install
29
+ key: openssl-3.3.2-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('scripts/build-openssl.sh') }}
30
+
31
+ - name: Build custom OpenSSL
32
+ run: ./scripts/build-openssl.sh
33
+
34
+ - name: Set up Python
35
+ uses: actions/setup-python@v6
36
+ with:
37
+ python-version: 3.x
38
+
39
+ - name: Run clippy
40
+ run: cargo clippy --all-targets --all-features --locked -- -D warnings
41
+
42
+ - name: Run tests
43
+ run: cargo test --locked --verbose
44
+
45
+ # TODO: Uncomment when ready to publish to crates.io
46
+ # rust-publish:
47
+ # needs: rust-tests
48
+ # runs-on: ubuntu-latest
49
+ # if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
50
+ #
51
+ # steps:
52
+ # - uses: actions/checkout@v6
53
+ #
54
+ # - name: Install Rust toolchain
55
+ # uses: actions-rust-lang/setup-rust-toolchain@v1
56
+ #
57
+ # - name: Cache OpenSSL build
58
+ # uses: actions/cache@v4
59
+ # with:
60
+ # path: vendor/openssl/install
61
+ # key: openssl-3.3.2-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('scripts/build-openssl.sh') }}
62
+ #
63
+ # - name: Build custom OpenSSL
64
+ # run: ./scripts/build-openssl.sh
65
+ #
66
+ # - name: Publish to crates.io
67
+ # env:
68
+ # OPENSSL_DIR: ${{ github.workspace }}/vendor/openssl/install
69
+ # OPENSSL_STATIC: "1"
70
+ # OPENSSL_NO_VENDOR: "1"
71
+ # run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
@@ -0,0 +1,23 @@
1
+ /target
2
+ /dist
3
+
4
+ # Vendored OpenSSL source + build artifacts
5
+ /vendor/openssl/
6
+
7
+ # OpenSSL build artifacts that leak into the project root
8
+ /apps/
9
+ /crypto/
10
+ /doc/
11
+ /engines/
12
+ /exporters/
13
+ /fuzz/
14
+ /include/
15
+ /providers/
16
+ /ssl/
17
+ /test/
18
+ /tools/
19
+ /util/
20
+ test.py
21
+ test_batch.py
22
+ test_python_bindings.py
23
+ test_urls.txt