mpatch 1.6.4__tar.gz → 1.8.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.
- {mpatch-1.6.4 → mpatch-1.8.0}/.github/workflows/ci.yml +5 -5
- mpatch-1.8.0/.github/workflows/crates.yml +59 -0
- {mpatch-1.6.4 → mpatch-1.8.0}/.github/workflows/docs.yml +5 -3
- {mpatch-1.6.4 → mpatch-1.8.0}/.github/workflows/pypi.yml +6 -6
- {mpatch-1.6.4 → mpatch-1.8.0}/.github/workflows/python-ci.yml +3 -3
- {mpatch-1.6.4 → mpatch-1.8.0}/.github/workflows/release.yml +14 -7
- mpatch-1.8.0/.gitignore +10 -0
- mpatch-1.8.0/CHANGELOG.md +406 -0
- {mpatch-1.6.4 → mpatch-1.8.0}/Cargo.lock +248 -459
- {mpatch-1.6.4 → mpatch-1.8.0}/Cargo.toml +4 -4
- {mpatch-1.6.4 → mpatch-1.8.0}/PKG-INFO +177 -8
- mpatch-1.8.0/README.md +492 -0
- {mpatch-1.6.4 → mpatch-1.8.0}/benches/mpatch_bench.rs +141 -3
- {mpatch-1.6.4 → mpatch-1.8.0}/bindings/python/.gitignore +2 -1
- {mpatch-1.6.4 → mpatch-1.8.0}/bindings/python/Cargo.toml +1 -1
- {mpatch-1.6.4 → mpatch-1.8.0}/bindings/python/README.md +176 -7
- {mpatch-1.6.4 → mpatch-1.8.0}/bindings/python/mpatch.pyi +357 -12
- {mpatch-1.6.4 → mpatch-1.8.0}/bindings/python/src/lib.rs +518 -82
- mpatch-1.8.0/bindings/python/tests/test_mpatch.py +1445 -0
- {mpatch-1.6.4 → mpatch-1.8.0}/pyproject.toml +1 -1
- mpatch-1.8.0/scripts/release.py +1032 -0
- mpatch-1.8.0/src/lib.rs +15863 -0
- mpatch-1.8.0/src/main.rs +1296 -0
- mpatch-1.8.0/tests/patch_apply_tests.rs +16507 -0
- mpatch-1.6.4/.gitignore +0 -4
- mpatch-1.6.4/CHANGELOG.md +0 -284
- mpatch-1.6.4/README.md +0 -316
- mpatch-1.6.4/bindings/python/tests/test_mpatch.py +0 -431
- mpatch-1.6.4/src/lib.rs +0 -6980
- mpatch-1.6.4/src/main.rs +0 -765
- mpatch-1.6.4/tests/patch_apply_tests.rs +0 -6792
- {mpatch-1.6.4 → mpatch-1.8.0}/.github/workflows/test-report.yml +0 -0
- {mpatch-1.6.4 → mpatch-1.8.0}/LICENSE +0 -0
|
@@ -21,10 +21,10 @@ jobs:
|
|
|
21
21
|
runs-on: ubuntu-latest
|
|
22
22
|
steps:
|
|
23
23
|
- name: Checkout repository
|
|
24
|
-
uses: actions/checkout@
|
|
24
|
+
uses: actions/checkout@v7
|
|
25
25
|
|
|
26
26
|
- name: Install Rust toolchain
|
|
27
|
-
uses: actions-rust-lang/setup-rust-toolchain@
|
|
27
|
+
uses: actions-rust-lang/setup-rust-toolchain@v2
|
|
28
28
|
with:
|
|
29
29
|
toolchain: stable
|
|
30
30
|
components: rustfmt
|
|
@@ -43,7 +43,7 @@ jobs:
|
|
|
43
43
|
|
|
44
44
|
steps:
|
|
45
45
|
- name: Checkout repository
|
|
46
|
-
uses: actions/checkout@
|
|
46
|
+
uses: actions/checkout@v7
|
|
47
47
|
with: { fetch-depth: 0 }
|
|
48
48
|
|
|
49
49
|
# --- Smart Change Detection ---
|
|
@@ -60,7 +60,7 @@ jobs:
|
|
|
60
60
|
|
|
61
61
|
- name: Get changed files
|
|
62
62
|
id: changed_files
|
|
63
|
-
uses: tj-actions/changed-files@
|
|
63
|
+
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
|
64
64
|
with:
|
|
65
65
|
base_sha: ${{ steps.last_successful_commit.outputs.base }}
|
|
66
66
|
files_yaml: |
|
|
@@ -74,7 +74,7 @@ jobs:
|
|
|
74
74
|
# --- Setup ---
|
|
75
75
|
- name: Install Rust toolchain
|
|
76
76
|
if: steps.changed_files.outputs.code_any_changed == 'true'
|
|
77
|
-
uses: actions-rust-lang/setup-rust-toolchain@
|
|
77
|
+
uses: actions-rust-lang/setup-rust-toolchain@v2
|
|
78
78
|
with:
|
|
79
79
|
toolchain: stable
|
|
80
80
|
cache: true
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
name: Publish Rust Crate to crates.io
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
env:
|
|
12
|
+
CARGO_TERM_COLOR: always
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
publish-crate:
|
|
16
|
+
name: Upload release to crates.io
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
|
|
19
|
+
environment:
|
|
20
|
+
name: crates-io
|
|
21
|
+
url: https://crates.io/crates/mpatch
|
|
22
|
+
|
|
23
|
+
permissions:
|
|
24
|
+
id-token: write
|
|
25
|
+
contents: read
|
|
26
|
+
|
|
27
|
+
steps:
|
|
28
|
+
- name: Checkout repository
|
|
29
|
+
uses: actions/checkout@v7
|
|
30
|
+
|
|
31
|
+
- name: Install Rust toolchain
|
|
32
|
+
uses: actions-rust-lang/setup-rust-toolchain@v2
|
|
33
|
+
with:
|
|
34
|
+
toolchain: stable
|
|
35
|
+
cache: false
|
|
36
|
+
|
|
37
|
+
# Refuse to publish if the release tag and the crate version disagree.
|
|
38
|
+
- name: Check Tag Matches Crate Version
|
|
39
|
+
if: github.event_name == 'release'
|
|
40
|
+
shell: bash
|
|
41
|
+
env:
|
|
42
|
+
REF_NAME: ${{ github.ref_name }}
|
|
43
|
+
run: |
|
|
44
|
+
CRATE_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.name == "mpatch") | .version')
|
|
45
|
+
if [[ "${REF_NAME#v}" != "$CRATE_VERSION" ]]; then
|
|
46
|
+
echo "Error: Tag '$REF_NAME' does not match crate version '$CRATE_VERSION'"
|
|
47
|
+
exit 1
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
# Trusted Publishing: exchanges the workflow's OIDC token for a short-lived
|
|
51
|
+
# crates.io token, so no long-lived CARGO_REGISTRY_TOKEN secret is needed.
|
|
52
|
+
- name: Authenticate with crates.io
|
|
53
|
+
id: auth
|
|
54
|
+
uses: rust-lang/crates-io-auth-action@v1
|
|
55
|
+
|
|
56
|
+
- name: Publish crate
|
|
57
|
+
run: cargo publish -p mpatch --locked
|
|
58
|
+
env:
|
|
59
|
+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
|
|
@@ -18,7 +18,7 @@ jobs:
|
|
|
18
18
|
runs-on: ubuntu-latest
|
|
19
19
|
steps:
|
|
20
20
|
- name: Checkout repository
|
|
21
|
-
uses: actions/checkout@
|
|
21
|
+
uses: actions/checkout@v7
|
|
22
22
|
with:
|
|
23
23
|
# Required for tj-actions/changed-files to diff against the correct base.
|
|
24
24
|
fetch-depth: 0
|
|
@@ -36,10 +36,12 @@ jobs:
|
|
|
36
36
|
- .github/workflows/docs.yml
|
|
37
37
|
|
|
38
38
|
- name: Install Rust toolchain
|
|
39
|
-
uses: actions-rust-lang/setup-rust-toolchain@
|
|
39
|
+
uses: actions-rust-lang/setup-rust-toolchain@v2
|
|
40
40
|
with:
|
|
41
41
|
toolchain: stable
|
|
42
|
-
cache:
|
|
42
|
+
cache: true
|
|
43
|
+
# sccache (below) caches compiled crates, so only cache the cargo registry here.
|
|
44
|
+
cache-targets: false
|
|
43
45
|
|
|
44
46
|
- name: Setup sccache
|
|
45
47
|
if: steps.changed_files.outputs.docs_relevant_any_changed == 'true'
|
|
@@ -31,7 +31,7 @@ jobs:
|
|
|
31
31
|
- { os: windows-latest, target: aarch64-pc-windows-msvc }
|
|
32
32
|
|
|
33
33
|
steps:
|
|
34
|
-
- uses: actions/checkout@
|
|
34
|
+
- uses: actions/checkout@v7
|
|
35
35
|
|
|
36
36
|
- name: Set up QEMU
|
|
37
37
|
if: runner.os == 'Linux'
|
|
@@ -41,16 +41,16 @@ jobs:
|
|
|
41
41
|
if: matrix.free-threaded
|
|
42
42
|
uses: actions/setup-python@v6
|
|
43
43
|
with:
|
|
44
|
-
python-version: '3.
|
|
44
|
+
python-version: '3.14t'
|
|
45
45
|
|
|
46
46
|
- name: Build wheels
|
|
47
47
|
uses: PyO3/maturin-action@v1
|
|
48
48
|
with:
|
|
49
49
|
target: ${{ matrix.platform.target }}
|
|
50
|
-
manylinux:
|
|
50
|
+
manylinux: ${{ contains(matrix.platform.target, 'linux-musl') && 'musllinux_1_2' || '2_17' }}
|
|
51
51
|
working-directory: bindings/python
|
|
52
|
-
# Pass `-i python3.
|
|
53
|
-
args: --release --out dist --locked --compatibility pypi ${{ matrix.free-threaded && '-i python3.
|
|
52
|
+
# Pass `-i python3.14t` to explicitly tell maturin to build a free-threaded wheel alongside abi3
|
|
53
|
+
args: --release --out dist --locked --compatibility pypi ${{ matrix.free-threaded && '-i python3.14t' || '' }}
|
|
54
54
|
sccache: 'true'
|
|
55
55
|
|
|
56
56
|
- name: Upload wheels
|
|
@@ -64,7 +64,7 @@ jobs:
|
|
|
64
64
|
name: Build source distribution
|
|
65
65
|
runs-on: ubuntu-latest
|
|
66
66
|
steps:
|
|
67
|
-
- uses: actions/checkout@
|
|
67
|
+
- uses: actions/checkout@v7
|
|
68
68
|
|
|
69
69
|
- name: Build sdist
|
|
70
70
|
uses: PyO3/maturin-action@v1
|
|
@@ -31,7 +31,7 @@ jobs:
|
|
|
31
31
|
runs-on: ubuntu-latest
|
|
32
32
|
steps:
|
|
33
33
|
- name: Checkout repository
|
|
34
|
-
uses: actions/checkout@
|
|
34
|
+
uses: actions/checkout@v7
|
|
35
35
|
|
|
36
36
|
- name: Setup Python
|
|
37
37
|
uses: actions/setup-python@v6
|
|
@@ -63,10 +63,10 @@ jobs:
|
|
|
63
63
|
|
|
64
64
|
steps:
|
|
65
65
|
- name: Checkout repository
|
|
66
|
-
uses: actions/checkout@
|
|
66
|
+
uses: actions/checkout@v7
|
|
67
67
|
|
|
68
68
|
- name: Install Rust toolchain
|
|
69
|
-
uses: actions-rust-lang/setup-rust-toolchain@
|
|
69
|
+
uses: actions-rust-lang/setup-rust-toolchain@v2
|
|
70
70
|
with:
|
|
71
71
|
toolchain: stable
|
|
72
72
|
cache: true
|
|
@@ -67,14 +67,21 @@ jobs:
|
|
|
67
67
|
|
|
68
68
|
steps:
|
|
69
69
|
- name: Checkout repository
|
|
70
|
-
uses: actions/checkout@
|
|
70
|
+
uses: actions/checkout@v7
|
|
71
71
|
|
|
72
72
|
- name: Install Rust toolchain
|
|
73
|
-
uses: actions-rust-lang/setup-rust-toolchain@
|
|
73
|
+
uses: actions-rust-lang/setup-rust-toolchain@v2
|
|
74
74
|
with:
|
|
75
75
|
toolchain: stable
|
|
76
76
|
target: ${{ matrix.target }}
|
|
77
|
-
|
|
77
|
+
# Caches saved from a tag build can't be restored by later releases,
|
|
78
|
+
# so caching here would only use up the repository's cache storage.
|
|
79
|
+
cache: false
|
|
80
|
+
# v2 defaults to 'deny', which fails on any warning. cross's
|
|
81
|
+
# aarch64-unknown-linux-musl image wraps the linker in a 'set -x'
|
|
82
|
+
# script, and rustc reports that stderr output as a warning.
|
|
83
|
+
# Lints are enforced by CI, not by release builds.
|
|
84
|
+
build-warnings: warn
|
|
78
85
|
|
|
79
86
|
# --- Auto-detect Binary Name ---
|
|
80
87
|
- name: Get Binary Name
|
|
@@ -222,14 +229,14 @@ jobs:
|
|
|
222
229
|
runs-on: macos-latest
|
|
223
230
|
steps:
|
|
224
231
|
- name: Checkout
|
|
225
|
-
uses: actions/checkout@
|
|
232
|
+
uses: actions/checkout@v7
|
|
226
233
|
|
|
227
234
|
# We need Rust installed here just to run 'cargo metadata' to get the name.
|
|
228
235
|
- name: Install Rust toolchain
|
|
229
|
-
uses: actions-rust-lang/setup-rust-toolchain@
|
|
236
|
+
uses: actions-rust-lang/setup-rust-toolchain@v2
|
|
230
237
|
with:
|
|
231
238
|
toolchain: stable
|
|
232
|
-
cache:
|
|
239
|
+
cache: false
|
|
233
240
|
|
|
234
241
|
# --- Auto-detect Binary Name ---
|
|
235
242
|
- name: Get Binary Name
|
|
@@ -345,7 +352,7 @@ jobs:
|
|
|
345
352
|
runs-on: ubuntu-latest
|
|
346
353
|
steps:
|
|
347
354
|
- name: Checkout
|
|
348
|
-
uses: actions/checkout@
|
|
355
|
+
uses: actions/checkout@v7
|
|
349
356
|
with:
|
|
350
357
|
# Fetch full history so we can find the previous tag for comparison links
|
|
351
358
|
fetch-depth: 0
|