11name : PDM patch compatibility
22
3- # Native PDM installer matrix: builds the CLI once per OS, bootstraps pinned
4- # PDM releases with uv, and runs `scripts/backtest-pdm.py` — hosted, vendored
5- # and agent mode against the public urllib3 free patch, verifying the
6- # INSTALLED bytes, lock/manifest stability, hash rejection and rollback. No
7- # Socket API token is needed. See docs/testing/pdm-compatibility.md.
3+ # Native PDM installer matrix: builds the CLI and the capstone test binary
4+ # once per OS, bootstraps pinned PDM releases with uv, and runs
5+ # `scripts/backtest-pdm.py` — hosted, vendored and agent mode against the
6+ # public urllib3 free patch, verifying the INSTALLED bytes, lock/manifest
7+ # stability, hash rejection and rollback. No Socket API token is needed. See
8+ # docs/testing/pdm-compatibility.md.
89
910on :
1011 pull_request :
2526 - ' crates/socket-patch-cli/tests/e2e_vex_build/main.rs'
2627 - ' crates/socket-patch-cli/tests/e2e_vex_build/pdm.rs'
2728 - ' crates/socket-patch-cli/tests/vex_pypi_real_common/**'
29+ # The capstone skips the cells ci.yml's e2e rows run.
30+ - ' .github/workflows/ci.yml'
2831 push :
2932 branches : [main]
3033 paths :
6063 strategy :
6164 fail-fast : false
6265 matrix :
63- os : [ubuntu-latest, windows-latest, macos-latest]
66+ os : [ubuntu-latest, macos-latest]
6467 runs-on : ${{ matrix.os }}
6568 timeout-minutes : 30
6669 steps :
@@ -70,13 +73,26 @@ jobs:
7073 - uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
7174 with :
7275 key : pdm-compat
73- - run : cargo build --locked -p socket-patch-cli
76+ save-if : ${{ github.ref == 'refs/heads/main' }}
77+ - name : Compile the CLI and the capstone once
78+ run : |
79+ set -euo pipefail
80+ cargo test --locked -p socket-patch-cli --test e2e_vex_build --no-run --message-format=json-render-diagnostics > target-build.json
81+ python3 - <<'PY'
82+ import json, pathlib, shutil
83+ dest = pathlib.Path('target/pdm-e2e')
84+ dest.mkdir(parents=True, exist_ok=True)
85+ shutil.copy2('target/debug/socket-patch', dest / 'socket-patch')
86+ for line in pathlib.Path('target-build.json').read_text().splitlines():
87+ item = json.loads(line)
88+ if item.get('target', {}).get('name') == 'e2e_vex_build' and item.get('executable'):
89+ shutil.copy2(item['executable'], dest / 'e2e_vex_build')
90+ assert (dest / 'e2e_vex_build').is_file()
91+ PY
7492 - uses : ./.github/actions/upload-artifact
7593 with :
7694 name : pdm-cli-${{ matrix.os }}
77- path : |
78- target/debug/socket-patch
79- target/debug/socket-patch.exe
95+ path : target/pdm-e2e/
8096 if-no-files-found : error
8197 retention-days : 7
8298
@@ -86,8 +102,10 @@ jobs:
86102 fail-fast : false
87103 matrix :
88104 # Every stable PDM major family (0.x, 1.x, 2.x) and each 2.x lock-format
89- # boundary, on Linux and Windows; macOS samples the ends of the range.
90- os : [ubuntu-latest, windows-latest]
105+ # boundary on Linux; macOS samples the ends of the range. No Windows:
106+ # the harness bootstraps PDM through a POSIX venv layout (bin/pdm), so
107+ # every Windows cell skipped; backtest-pdm.py now fails such a cell.
108+ os : [ubuntu-latest]
91109 pdm : ['0.12.3', '1.15.5', '2.0.3', '2.1.5', '2.3.4', '2.6.1', '2.7.4', '2.8.2', '2.9.3', '2.10.4', '2.11.2', '2.17.3', '2.20.1', '2.22.4', '2.25.9', '2.29.2']
92110 include :
93111 - { os: macos-latest, pdm: '0.12.3' }
@@ -152,25 +170,37 @@ jobs:
152170 # The hermetic Rust capstone (wiremock Socket API that also serves the
153171 # hosted wheel) over every PDM release the backtest covers: real hosted +
154172 # vendored flows ending in the manifest-less VEX matrix; refused lock
155- # formats (3.1, 4.0-4.2) must attest nothing.
173+ # formats (3.1, 4.0-4.2) must attest nothing. The cells ci.yml's `e2e`
174+ # job runs on every PR and main push are excluded here
175+ # (scripts/tests/test_ci_e2e_tiers.py keeps the two lists in step).
156176 capstone :
177+ needs : build
157178 strategy :
158179 fail-fast : false
159180 matrix :
160181 os : [ubuntu-latest, macos-latest]
161182 pdm : ['0.12.3', '1.0.0', '1.4.5', '1.8.5', '1.15.5', '2.0.3', '2.7.4', '2.8.2', '2.10.4', '2.11.2', '2.17.3', '2.20.1', '2.22.4', '2.25.9', '2.29.2']
183+ exclude :
184+ - {os: ubuntu-latest, pdm: '1.4.5'}
185+ - {os: ubuntu-latest, pdm: '1.15.5'}
186+ - {os: ubuntu-latest, pdm: '2.7.4'}
187+ - {os: ubuntu-latest, pdm: '2.8.2'}
188+ - {os: ubuntu-latest, pdm: '2.25.9'}
189+ - {os: ubuntu-latest, pdm: '2.29.2'}
190+ - {os: macos-latest, pdm: '2.29.2'}
162191 runs-on : ${{ matrix.os }}
163192 timeout-minutes : 30
164193 steps :
194+ # The binaries resolve fixtures through the build job's checkout path,
195+ # which is the same on every runner of one OS.
165196 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
166197 with :
167198 persist-credentials : false
168- - uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
199+ - uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
169200 with :
170- key : pdm-vex-capstone
171- # Only main writes the cache: 30 PR matrix cells saving would churn
172- # the repo's 10 GiB budget (ci.yml's rust-cache note).
173- save-if : ${{ github.ref == 'refs/heads/main' }}
201+ pattern : pdm-cli-${{ matrix.os }}*
202+ merge-multiple : true
203+ path : target/pdm-e2e
174204 - uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
175205 with :
176206 python-version : ' 3.12'
@@ -179,4 +209,11 @@ jobs:
179209 env :
180210 SOCKET_PATCH_PDM_E2E_REQUIRED : ' 1'
181211 SOCKET_PATCH_PDM_E2E_VERSION : ${{ matrix.pdm }}
182- run : cargo test --locked -p socket-patch-cli --test e2e_vex_build -- 'pdm::' --ignored
212+ run : |
213+ set -euo pipefail
214+ chmod +x target/pdm-e2e/*
215+ mkdir -p target/debug target/tmp
216+ cp target/pdm-e2e/socket-patch target/debug/socket-patch
217+ cd crates/socket-patch-cli
218+ export CARGO_MANIFEST_DIR="$PWD"
219+ ../../target/pdm-e2e/e2e_vex_build 'pdm::' --ignored
0 commit comments