dryoc 2.0.0__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.
- dryoc-2.0.0/.config/nextest.toml +47 -0
- dryoc-2.0.0/.github/FUNDING.yml +3 -0
- dryoc-2.0.0/.github/ISSUE_TEMPLATE/bug_report.yml +44 -0
- dryoc-2.0.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
- dryoc-2.0.0/.github/actions/install-nextest/action.yml +19 -0
- dryoc-2.0.0/.github/dependabot.yml +10 -0
- dryoc-2.0.0/.github/scripts/test-wheel.sh +24 -0
- dryoc-2.0.0/.github/workflows/build-and-test.yml +629 -0
- dryoc-2.0.0/.github/workflows/coverage.yml +48 -0
- dryoc-2.0.0/.github/workflows/publish.yml +375 -0
- dryoc-2.0.0/.gitignore +8 -0
- dryoc-2.0.0/.rustfmt.toml +12 -0
- dryoc-2.0.0/AGENTS.md +376 -0
- dryoc-2.0.0/BENCHMARKS.md +446 -0
- dryoc-2.0.0/COMPATIBILITY.md +136 -0
- dryoc-2.0.0/Cargo.toml +98 -0
- dryoc-2.0.0/LICENSE +7 -0
- dryoc-2.0.0/PKG-INFO +296 -0
- dryoc-2.0.0/README.md +127 -0
- dryoc-2.0.0/UPGRADING.md +296 -0
- dryoc-2.0.0/benchmarks/charts.gp +91 -0
- dryoc-2.0.0/benchmarks/results-aarch64.dat +19 -0
- dryoc-2.0.0/benchmarks/results-x86_64.dat +20 -0
- dryoc-2.0.0/benchmarks/speedup.svg +454 -0
- dryoc-2.0.0/benchmarks/throughput-aarch64.svg +321 -0
- dryoc-2.0.0/benchmarks/throughput-x86_64.svg +321 -0
- dryoc-2.0.0/build.rs +35 -0
- dryoc-2.0.0/dryoc.png +0 -0
- dryoc-2.0.0/netlify.toml +3 -0
- dryoc-2.0.0/pyproject.toml +71 -0
- dryoc-2.0.0/python/Cargo.lock +552 -0
- dryoc-2.0.0/python/Cargo.toml +44 -0
- dryoc-2.0.0/python/README.md +263 -0
- dryoc-2.0.0/python/dryoc/__init__.py +63 -0
- dryoc-2.0.0/python/dryoc/_dryoc.pyi +153 -0
- dryoc-2.0.0/python/dryoc/_types.py +37 -0
- dryoc-2.0.0/python/dryoc/aead.py +18 -0
- dryoc-2.0.0/python/dryoc/aead.pyi +112 -0
- dryoc-2.0.0/python/dryoc/box.py +23 -0
- dryoc-2.0.0/python/dryoc/box.pyi +143 -0
- dryoc-2.0.0/python/dryoc/exceptions.py +24 -0
- dryoc-2.0.0/python/dryoc/hash.py +68 -0
- dryoc-2.0.0/python/dryoc/hash.pyi +219 -0
- dryoc-2.0.0/python/dryoc/kdf.py +20 -0
- dryoc-2.0.0/python/dryoc/kdf.pyi +91 -0
- dryoc-2.0.0/python/dryoc/kem/__init__.py +20 -0
- dryoc-2.0.0/python/dryoc/kem/mlkem768.py +12 -0
- dryoc-2.0.0/python/dryoc/kem/mlkem768.pyi +94 -0
- dryoc-2.0.0/python/dryoc/kem/xwing.py +10 -0
- dryoc-2.0.0/python/dryoc/kem/xwing.pyi +94 -0
- dryoc-2.0.0/python/dryoc/kx.py +19 -0
- dryoc-2.0.0/python/dryoc/kx.pyi +48 -0
- dryoc-2.0.0/python/dryoc/mac.py +37 -0
- dryoc-2.0.0/python/dryoc/mac.pyi +77 -0
- dryoc-2.0.0/python/dryoc/pwhash.py +148 -0
- dryoc-2.0.0/python/dryoc/py.typed +0 -0
- dryoc-2.0.0/python/dryoc/sealedbox.py +20 -0
- dryoc-2.0.0/python/dryoc/sealedbox.pyi +39 -0
- dryoc-2.0.0/python/dryoc/secretbox.py +16 -0
- dryoc-2.0.0/python/dryoc/secretbox.pyi +43 -0
- dryoc-2.0.0/python/dryoc/secretstream.py +23 -0
- dryoc-2.0.0/python/dryoc/secretstream.pyi +123 -0
- dryoc-2.0.0/python/dryoc/sign.py +16 -0
- dryoc-2.0.0/python/dryoc/sign.pyi +97 -0
- dryoc-2.0.0/python/src/aead.rs +196 -0
- dryoc-2.0.0/python/src/hash.rs +499 -0
- dryoc-2.0.0/python/src/kdf.rs +212 -0
- dryoc-2.0.0/python/src/kem.rs +367 -0
- dryoc-2.0.0/python/src/kx.rs +97 -0
- dryoc-2.0.0/python/src/lib.rs +148 -0
- dryoc-2.0.0/python/src/mac.rs +186 -0
- dryoc-2.0.0/python/src/public_box.rs +338 -0
- dryoc-2.0.0/python/src/pwhash.rs +143 -0
- dryoc-2.0.0/python/src/secretbox.rs +72 -0
- dryoc-2.0.0/python/src/secretstream.rs +318 -0
- dryoc-2.0.0/python/src/sign.rs +251 -0
- dryoc-2.0.0/python/src/util.rs +444 -0
- dryoc-2.0.0/python/tests/conftest.py +48 -0
- dryoc-2.0.0/python/tests/test_box_kx.py +110 -0
- dryoc-2.0.0/python/tests/test_hash.py +192 -0
- dryoc-2.0.0/python/tests/test_kem.py +101 -0
- dryoc-2.0.0/python/tests/test_libsodium_interop.py +236 -0
- dryoc-2.0.0/python/tests/test_mac_kdf.py +162 -0
- dryoc-2.0.0/python/tests/test_objects.py +206 -0
- dryoc-2.0.0/python/tests/test_pwhash.py +72 -0
- dryoc-2.0.0/python/tests/test_secretbox_aead.py +150 -0
- dryoc-2.0.0/python/tests/test_secretstream.py +187 -0
- dryoc-2.0.0/python/tests/test_sign.py +113 -0
- dryoc-2.0.0/python/tests/test_stubs.py +79 -0
- dryoc-2.0.0/ruff.toml +7 -0
- dryoc-2.0.0/src/aarch64.rs +76 -0
- dryoc-2.0.0/src/argon2/argon2_neon.rs +487 -0
- dryoc-2.0.0/src/argon2/argon2_simd.rs +95 -0
- dryoc-2.0.0/src/argon2/argon2_soft.rs +155 -0
- dryoc-2.0.0/src/argon2/argon2_x86_64.rs +367 -0
- dryoc-2.0.0/src/argon2/mod.rs +1384 -0
- dryoc-2.0.0/src/auth.rs +330 -0
- dryoc-2.0.0/src/blake2b/blake2b_aarch64.rs +240 -0
- dryoc-2.0.0/src/blake2b/blake2b_simd.rs +801 -0
- dryoc-2.0.0/src/blake2b/blake2b_soft.rs +883 -0
- dryoc-2.0.0/src/blake2b/blake2b_x86_64.rs +462 -0
- dryoc-2.0.0/src/blake2b/mod.rs +547 -0
- dryoc-2.0.0/src/blake2b/test-vectors/blake2b-test-vectors.json +3074 -0
- dryoc-2.0.0/src/bytes_serde.rs +438 -0
- dryoc-2.0.0/src/chacha20/chacha20_aarch64.rs +143 -0
- dryoc-2.0.0/src/chacha20/chacha20_neon.rs +1100 -0
- dryoc-2.0.0/src/chacha20/chacha20_soft.rs +95 -0
- dryoc-2.0.0/src/chacha20/chacha20_wasm32.rs +219 -0
- dryoc-2.0.0/src/chacha20/chacha20_x86_64.rs +615 -0
- dryoc-2.0.0/src/chacha20/mod.rs +1480 -0
- dryoc-2.0.0/src/classic/crypto_aead_chacha20poly1305_ietf.rs +496 -0
- dryoc-2.0.0/src/classic/crypto_aead_chacha20poly1305_impl.rs +767 -0
- dryoc-2.0.0/src/classic/crypto_aead_xchacha20poly1305_ietf.rs +484 -0
- dryoc-2.0.0/src/classic/crypto_auth.rs +177 -0
- dryoc-2.0.0/src/classic/crypto_auth_hmac_impl.rs +522 -0
- dryoc-2.0.0/src/classic/crypto_auth_hmacsha256.rs +125 -0
- dryoc-2.0.0/src/classic/crypto_auth_hmacsha512.rs +128 -0
- dryoc-2.0.0/src/classic/crypto_auth_hmacsha512256.rs +136 -0
- dryoc-2.0.0/src/classic/crypto_box.rs +1327 -0
- dryoc-2.0.0/src/classic/crypto_box_impl.rs +90 -0
- dryoc-2.0.0/src/classic/crypto_core.rs +824 -0
- dryoc-2.0.0/src/classic/crypto_generichash.rs +272 -0
- dryoc-2.0.0/src/classic/crypto_hash.rs +518 -0
- dryoc-2.0.0/src/classic/crypto_kdf.rs +652 -0
- dryoc-2.0.0/src/classic/crypto_kem.rs +154 -0
- dryoc-2.0.0/src/classic/crypto_kem_mlkem768.rs +415 -0
- dryoc-2.0.0/src/classic/crypto_kem_xwing.rs +675 -0
- dryoc-2.0.0/src/classic/crypto_kx.rs +291 -0
- dryoc-2.0.0/src/classic/crypto_onetimeauth.rs +315 -0
- dryoc-2.0.0/src/classic/crypto_pwhash.rs +1439 -0
- dryoc-2.0.0/src/classic/crypto_secretbox.rs +732 -0
- dryoc-2.0.0/src/classic/crypto_secretbox_impl.rs +236 -0
- dryoc-2.0.0/src/classic/crypto_secretstream_xchacha20poly1305.rs +1649 -0
- dryoc-2.0.0/src/classic/crypto_shorthash.rs +95 -0
- dryoc-2.0.0/src/classic/crypto_sign.rs +524 -0
- dryoc-2.0.0/src/classic/crypto_sign_ed25519.rs +1113 -0
- dryoc-2.0.0/src/classic/crypto_xof.rs +385 -0
- dryoc-2.0.0/src/classic/generichash_blake2b.rs +153 -0
- dryoc-2.0.0/src/constants.rs +564 -0
- dryoc-2.0.0/src/dryocaead.rs +1679 -0
- dryoc-2.0.0/src/dryocbox.rs +1465 -0
- dryoc-2.0.0/src/dryocsealedbox.rs +610 -0
- dryoc-2.0.0/src/dryocsecretbox.rs +806 -0
- dryoc-2.0.0/src/dryocstream/tag.rs +117 -0
- dryoc-2.0.0/src/dryocstream.rs +923 -0
- dryoc-2.0.0/src/edwards25519/edwards25519_neon.rs +158 -0
- dryoc-2.0.0/src/edwards25519/edwards25519_x86_64.rs +84 -0
- dryoc-2.0.0/src/edwards25519/mod.rs +1617 -0
- dryoc-2.0.0/src/edwards25519/tables.rs +1187 -0
- dryoc-2.0.0/src/error.rs +619 -0
- dryoc-2.0.0/src/fe25519/fe25519_aarch64.rs +405 -0
- dryoc-2.0.0/src/fe25519/fe25519_soft.rs +169 -0
- dryoc-2.0.0/src/fe25519/fe64_aarch64.rs +560 -0
- dryoc-2.0.0/src/fe25519/mod.rs +821 -0
- dryoc-2.0.0/src/fe25519/safegcd.rs +397 -0
- dryoc-2.0.0/src/generichash.rs +577 -0
- dryoc-2.0.0/src/hkdf.rs +745 -0
- dryoc-2.0.0/src/hmac.rs +655 -0
- dryoc-2.0.0/src/kdf.rs +456 -0
- dryoc-2.0.0/src/keccak/keccak3_aarch64.py +619 -0
- dryoc-2.0.0/src/keccak/keccak3_aarch64.rs +1765 -0
- dryoc-2.0.0/src/keccak/keccak_aarch64.rs +339 -0
- dryoc-2.0.0/src/keccak/keccak_soft.rs +316 -0
- dryoc-2.0.0/src/keccak/keccak_wasm32.rs +144 -0
- dryoc-2.0.0/src/keccak/keccak_x86_64.rs +234 -0
- dryoc-2.0.0/src/keccak/mod.rs +1116 -0
- dryoc-2.0.0/src/kem.rs +366 -0
- dryoc-2.0.0/src/keypair.rs +652 -0
- dryoc-2.0.0/src/kx.rs +459 -0
- dryoc-2.0.0/src/lib.rs +266 -0
- dryoc-2.0.0/src/mlkem/mlkem_neon.rs +979 -0
- dryoc-2.0.0/src/mlkem/mlkem_soft.rs +249 -0
- dryoc-2.0.0/src/mlkem/mlkem_wasm32.rs +462 -0
- dryoc-2.0.0/src/mlkem/mlkem_x86_64.rs +535 -0
- dryoc-2.0.0/src/mlkem/mod.rs +907 -0
- dryoc-2.0.0/src/mlkem/test-vectors/hpke_xwing_hkdfsha256_chacha20poly1305.txt +18 -0
- dryoc-2.0.0/src/mlkem/test-vectors/mlkem768_acvp_decap.txt +65 -0
- dryoc-2.0.0/src/mlkem/test-vectors/mlkem768_acvp_ek_check.txt +54 -0
- dryoc-2.0.0/src/mlkem/test-vectors/mlkem768_acvp_encap.txt +34 -0
- dryoc-2.0.0/src/mlkem/test-vectors/mlkem768_acvp_keygen.txt +34 -0
- dryoc-2.0.0/src/mlkem/test-vectors/mlkem768_cctv_modulus.txt +2352 -0
- dryoc-2.0.0/src/mlkem/test-vectors/mlkem768_cctv_strcmp.txt +9 -0
- dryoc-2.0.0/src/mlkem/test-vectors/mlkem768_cctv_unlucky.txt +18 -0
- dryoc-2.0.0/src/mlkem/test-vectors/xwing_draft.txt +27 -0
- dryoc-2.0.0/src/mlkem/test-vectors/xwing_libsodium_edge.txt +40 -0
- dryoc-2.0.0/src/mlkem/tests.rs +438 -0
- dryoc-2.0.0/src/native_test_util.rs +1370 -0
- dryoc-2.0.0/src/neon.rs +146 -0
- dryoc-2.0.0/src/onetimeauth.rs +352 -0
- dryoc-2.0.0/src/poly1305/mod.rs +893 -0
- dryoc-2.0.0/src/poly1305/poly1305_aarch64.rs +160 -0
- dryoc-2.0.0/src/poly1305/poly1305_simd.rs +638 -0
- dryoc-2.0.0/src/poly1305/poly1305_soft.rs +1085 -0
- dryoc-2.0.0/src/poly1305/poly1305_wasm32.rs +354 -0
- dryoc-2.0.0/src/poly1305/poly1305_x86_64.rs +1237 -0
- dryoc-2.0.0/src/precalc.rs +348 -0
- dryoc-2.0.0/src/protected.rs +2845 -0
- dryoc-2.0.0/src/pwhash.rs +1226 -0
- dryoc-2.0.0/src/rng.rs +76 -0
- dryoc-2.0.0/src/salsa20/mod.rs +1247 -0
- dryoc-2.0.0/src/salsa20/salsa20_neon.rs +781 -0
- dryoc-2.0.0/src/salsa20/salsa20_simd.rs +177 -0
- dryoc-2.0.0/src/salsa20/salsa20_soft.rs +190 -0
- dryoc-2.0.0/src/salsa20/salsa20_wasm32.rs +157 -0
- dryoc-2.0.0/src/salsa20/salsa20_x86_64.rs +590 -0
- dryoc-2.0.0/src/scalarmult_curve25519.rs +572 -0
- dryoc-2.0.0/src/sha256/mod.rs +180 -0
- dryoc-2.0.0/src/sha256/sha256_aarch64.rs +191 -0
- dryoc-2.0.0/src/sha2_impl.rs +330 -0
- dryoc-2.0.0/src/sha3.rs +394 -0
- dryoc-2.0.0/src/sha512/mod.rs +289 -0
- dryoc-2.0.0/src/sha512/sha512_aarch64.rs +1375 -0
- dryoc-2.0.0/src/sign.rs +1150 -0
- dryoc-2.0.0/src/siphash24.rs +169 -0
- dryoc-2.0.0/src/stream.rs +282 -0
- dryoc-2.0.0/src/types.rs +670 -0
- dryoc-2.0.0/src/unsafe_code.rs +55 -0
- dryoc-2.0.0/src/utils.rs +539 -0
- dryoc-2.0.0/src/wasm32.rs +112 -0
- dryoc-2.0.0/src/wincode_schema.rs +79 -0
- dryoc-2.0.0/src/x86_64.rs +830 -0
- dryoc-2.0.0/src/xof.rs +650 -0
- dryoc-2.0.0/tests/integration_tests.rs +2122 -0
- dryoc-2.0.0/tests/support/vectors.rs +39 -0
- dryoc-2.0.0/tests/wasm_tests.rs +854 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
[profile.default-miri]
|
|
2
|
+
# Miri runs each test in a separate interpreter. Report all failures, and
|
|
3
|
+
# terminate stuck tests rather than consuming the entire CI job timeout.
|
|
4
|
+
fail-fast = false
|
|
5
|
+
slow-timeout = { period = "60s", terminate-after = 15 }
|
|
6
|
+
|
|
7
|
+
# PR coverage targets unsafe views, wiping, schemas and representative public
|
|
8
|
+
# operations. The full suite remains the default for local Miri runs.
|
|
9
|
+
[profile.miri-smoke]
|
|
10
|
+
inherits = "default-miri"
|
|
11
|
+
slow-timeout = { period = "60s", terminate-after = 10 }
|
|
12
|
+
default-filter = '''
|
|
13
|
+
test(/^types::tests::/)
|
|
14
|
+
| test(/^bytes_serde::tests::/)
|
|
15
|
+
| test(/^utils::tests::test_zeroize/)
|
|
16
|
+
| test(=generichash::tests::test_vectors)
|
|
17
|
+
| test(=argon2::tests::test_vector_argon2i)
|
|
18
|
+
| test(=argon2::tests::test_vector_argon2id)
|
|
19
|
+
| test(=scalarmult_curve25519::tests::test_rfc7748_vectors)
|
|
20
|
+
| test(=sign::tests::rfc8032_detached_signatures_and_signed_message_wire_format)
|
|
21
|
+
| test(=poly1305::tests::rfc8439_a3_final_reduction_vectors)
|
|
22
|
+
| test(=classic::crypto_aead_chacha20poly1305_ietf::tests::test_failures_leave_outputs_untouched)
|
|
23
|
+
| test(=classic::crypto_aead_xchacha20poly1305_ietf::tests::test_failures_leave_outputs_untouched)
|
|
24
|
+
| test(=classic::crypto_secretstream_xchacha20poly1305::tests::pull_authenticates_before_mutating_outputs_or_state)
|
|
25
|
+
| test(=dryocaead::tests::kat::chacha_wincode_round_trips_decrypt_with_classic)
|
|
26
|
+
| test(=test_dryocbox_wincode_wire_format)
|
|
27
|
+
| test(=test_dryocsecretbox_wincode_wire_format)
|
|
28
|
+
| test(=test_dryocaead_wincode_wire_format)
|
|
29
|
+
| test(=test_classic_hmac_and_hkdf_public_api)
|
|
30
|
+
| test(=test_sha3_public_api)
|
|
31
|
+
| test(=test_streams)
|
|
32
|
+
'''
|
|
33
|
+
|
|
34
|
+
# Run with RUSTFLAGS="-Ctarget-feature=+avx2,+bmi2" so these kernels execute
|
|
35
|
+
# instead of returning early on Miri's baseline virtual CPU.
|
|
36
|
+
[profile.miri-kernels]
|
|
37
|
+
inherits = "miri-smoke"
|
|
38
|
+
default-filter = '''
|
|
39
|
+
test(=poly1305::poly1305_soft::tests::avx2_blocks_match_scalar)
|
|
40
|
+
| test(=blake2b::blake2b_soft::tests::test_x86_64_compress_matches_portable)
|
|
41
|
+
| test(=argon2::tests::test_fill_block_x86_64_matches_soft)
|
|
42
|
+
| test(=chacha20::tests::vector_path::test_kernel_chunk_matches_scalar_blocks)
|
|
43
|
+
| test(=salsa20::tests::vector_path::test_kernel_chunk_matches_scalar_blocks)
|
|
44
|
+
| test(=scalarmult_curve25519::tests::test_rfc7748_vectors)
|
|
45
|
+
| test(=mlkem::tests::test_backends_match_soft)
|
|
46
|
+
| test(=keccak::tests::test_x86_64_permute4_matches_scalar)
|
|
47
|
+
'''
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: 🐞 Bug Report
|
|
2
|
+
description: "File a bug report: crashes, unexpected behaviour, and other errors go here."
|
|
3
|
+
title: "[Bug]: "
|
|
4
|
+
labels: ["bug", "triage"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
If you haven't done so already, please take a moment to search the [existing issues](https://github.com/brndnmtthws/dryoc/issues) to see if this has been previously reported. If not, carry on.
|
|
10
|
+
|
|
11
|
+
Thanks for taking the time to fill out this bug report!
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: what-happened
|
|
14
|
+
attributes:
|
|
15
|
+
label: What happened?
|
|
16
|
+
description: >
|
|
17
|
+
Describe the problem, what you expected to happen, and any other
|
|
18
|
+
relevant info. You can sample code below.
|
|
19
|
+
placeholder: Here's what happened
|
|
20
|
+
validations:
|
|
21
|
+
required: true
|
|
22
|
+
- type: input
|
|
23
|
+
id: version
|
|
24
|
+
attributes:
|
|
25
|
+
label: Version
|
|
26
|
+
description: What version of dryoc are you using?
|
|
27
|
+
validations:
|
|
28
|
+
required: true
|
|
29
|
+
- type: dropdown
|
|
30
|
+
id: os
|
|
31
|
+
validations:
|
|
32
|
+
required: true
|
|
33
|
+
attributes:
|
|
34
|
+
label: Which OS are you seeing the problem on?
|
|
35
|
+
options:
|
|
36
|
+
- Linux
|
|
37
|
+
- macOS
|
|
38
|
+
- Windows
|
|
39
|
+
- type: textarea
|
|
40
|
+
id: code
|
|
41
|
+
attributes:
|
|
42
|
+
label: Test code
|
|
43
|
+
description: If possible, please provide a minimal code sample that produces the problem.
|
|
44
|
+
render: Rust
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
blank_issues_enabled: true
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: 🙏 General questions & help
|
|
4
|
+
url: https://github.com/brndnmtthws/dryoc/discussions/categories/q-a
|
|
5
|
+
about: Please ask and answer general questions using GitHub Discussions
|
|
6
|
+
- name: 💡 New ideas and feature requests
|
|
7
|
+
url: https://github.com/brndnmtthws/dryoc/discussions/categories/ideas
|
|
8
|
+
about: Request and discuss enhancements using GitHub Discussions
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: Install cargo-nextest
|
|
2
|
+
|
|
3
|
+
description: Install cargo-nextest with cargo-binstall
|
|
4
|
+
|
|
5
|
+
inputs:
|
|
6
|
+
packages:
|
|
7
|
+
description: cargo-binstall package arguments
|
|
8
|
+
required: false
|
|
9
|
+
default: --locked cargo-nextest
|
|
10
|
+
|
|
11
|
+
runs:
|
|
12
|
+
using: composite
|
|
13
|
+
steps:
|
|
14
|
+
- name: Install cargo-nextest
|
|
15
|
+
uses: brndnmtthws/rust-action-cargo-binstall@v1
|
|
16
|
+
with:
|
|
17
|
+
packages: ${{ inputs.packages }}
|
|
18
|
+
env:
|
|
19
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Test a prebuilt wheel against the Python test suite. Run from python/.
|
|
3
|
+
#
|
|
4
|
+
# Usage: test-wheel.sh PYTHON WHEEL_GLOB
|
|
5
|
+
#
|
|
6
|
+
# Recreates the project environment for PYTHON with only the locked test
|
|
7
|
+
# group, installs the wheel into it (`--no-sync` keeps uv from building the
|
|
8
|
+
# project) and checks that the tests import the installed package, not the
|
|
9
|
+
# sources in the checkout. On a free-threaded interpreter, importing dryoc
|
|
10
|
+
# must leave the GIL disabled.
|
|
11
|
+
set -eu
|
|
12
|
+
|
|
13
|
+
python="$1"
|
|
14
|
+
wheel_glob="$2"
|
|
15
|
+
|
|
16
|
+
uv sync --locked --only-group test --python "$python"
|
|
17
|
+
# Unquoted on purpose: the glob expands to the one matching wheel. A glob
|
|
18
|
+
# without a match stays literal and uv reports the missing file.
|
|
19
|
+
# shellcheck disable=SC2086
|
|
20
|
+
uv pip install $wheel_glob
|
|
21
|
+
uv run --no-sync python -c "import dryoc; assert 'site-packages' in dryoc.__file__, dryoc.__file__"
|
|
22
|
+
uv run --no-sync python -c "import sys, sysconfig, dryoc; assert not (sysconfig.get_config_var('Py_GIL_DISABLED') and sys._is_gil_enabled())"
|
|
23
|
+
uv run --no-sync python -c "import nacl"
|
|
24
|
+
uv run --no-sync pytest -p no:cacheprovider tests
|