Skip to content

Commit 01dddca

Browse files
committed
Merge remote-tracking branch 'origin/main' into agent/v5-nuget-mapping
# Conflicts: # crates/socket-patch-core/src/formats/nuget/mod.rs # crates/socket-patch-core/src/vendor/nuget_feed.rs
2 parents fae65ca + 85105c9 commit 01dddca

29 files changed

Lines changed: 1456 additions & 124 deletions

‎.github/workflows/ci.yml‎

Lines changed: 39 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,12 @@ jobs:
5757
persist-credentials: false
5858

5959
- name: Install Rust
60-
# rustup is pre-installed on GitHub-hosted runners. `rustup show`
61-
# reads rust-toolchain.toml in the repo root, then installs the
62-
# pinned channel + listed components if missing. No third-party
60+
# rustup is pre-installed on GitHub-hosted runners. `toolchain
61+
# install` with no name reads rust-toolchain.toml in the repo root,
62+
# then installs the pinned channel + listed components if missing
63+
# (retried past download blips; see the script). No third-party
6364
# action dependency needed for toolchain setup.
64-
run: rustup show
65+
run: scripts/rustup-retry.sh toolchain install
6566

6667
- name: Cache cargo
6768
# Swatinem/rust-cache instead of a raw actions/cache of the whole
@@ -100,7 +101,7 @@ jobs:
100101
persist-credentials: false
101102

102103
- name: Install Rust
103-
run: rustup show
104+
run: scripts/rustup-retry.sh toolchain install
104105

105106
- name: Cache cargo
106107
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
@@ -283,11 +284,13 @@ jobs:
283284
persist-credentials: false
284285

285286
- name: Install Rust
286-
# rustup is pre-installed on GitHub-hosted runners. `rustup show`
287-
# reads rust-toolchain.toml in the repo root, then installs the
288-
# pinned channel + listed components if missing. No third-party
287+
# rustup is pre-installed on GitHub-hosted runners. `toolchain
288+
# install` with no name reads rust-toolchain.toml in the repo root,
289+
# then installs the pinned channel + listed components if missing
290+
# (retried past download blips; see the script). No third-party
289291
# action dependency needed for toolchain setup.
290-
run: rustup show
292+
shell: bash
293+
run: scripts/rustup-retry.sh toolchain install
291294

292295
- name: Cache cargo
293296
# Swatinem/rust-cache, main-only saves: see the first `Cache cargo`
@@ -449,11 +452,12 @@ jobs:
449452
persist-credentials: false
450453

451454
- name: Install Rust
452-
# rustup is pre-installed on GitHub-hosted runners. `rustup show`
453-
# reads rust-toolchain.toml in the repo root, then installs the
454-
# pinned channel + listed components if missing. No third-party
455+
# rustup is pre-installed on GitHub-hosted runners. `toolchain
456+
# install` with no name reads rust-toolchain.toml in the repo root,
457+
# then installs the pinned channel + listed components if missing
458+
# (retried past download blips; see the script). No third-party
455459
# action dependency needed for toolchain setup.
456-
run: rustup show
460+
run: scripts/rustup-retry.sh toolchain install
457461

458462
- name: Cache cargo
459463
# Swatinem/rust-cache, main-only saves: see the first `Cache cargo`
@@ -493,12 +497,12 @@ jobs:
493497
persist-credentials: false
494498

495499
- name: Install Rust
496-
# `rustup show` installs the rust-toolchain.toml channel + listed
497-
# components; `rustup component add` adds the llvm-tools-preview
500+
# `toolchain install` installs the rust-toolchain.toml channel +
501+
# listed components; `component add` adds the llvm-tools-preview
498502
# bits cargo-llvm-cov needs to merge .profraw files into lcov.
499503
run: |
500-
rustup show
501-
rustup component add llvm-tools-preview
504+
scripts/rustup-retry.sh toolchain install
505+
scripts/rustup-retry.sh component add llvm-tools-preview
502506
503507
- name: Install cargo-llvm-cov
504508
# taiki-e/install-action ships precompiled binaries — much faster
@@ -676,11 +680,11 @@ jobs:
676680
driver: docker
677681

678682
- name: Install Rust
679-
# `rustup show` consumes rust-toolchain.toml; the explicit
683+
# `toolchain install` consumes rust-toolchain.toml; the explicit
680684
# `component add` covers llvm-tools-preview for cargo-llvm-cov.
681685
run: |
682-
rustup show
683-
rustup component add llvm-tools-preview
686+
scripts/rustup-retry.sh toolchain install
687+
scripts/rustup-retry.sh component add llvm-tools-preview
684688
685689
- name: Install cargo-llvm-cov
686690
uses: taiki-e/install-action@65851e10cd6c377f11a60e600abc07cb08643468 # v2.79.3
@@ -888,7 +892,8 @@ jobs:
888892
persist-credentials: false
889893

890894
- name: Install Rust
891-
run: rustup show
895+
shell: bash
896+
run: scripts/rustup-retry.sh toolchain install
892897

893898
- name: Cache cargo
894899
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
@@ -1104,11 +1109,13 @@ jobs:
11041109
- {os: ubuntu-latest, suite: e2e_bun_lockb, bun: '1.1.45', test_filter: --include-ignored}
11051110
# Bun >= 1.4 migrating a hosted workspace bun.lockb to bun.lock
11061111
# (#803; its reader must be 1.4+) and a vendored one, then
1107-
# reverting it (#784; skipped by the < 1.2 readers above). Both
1112+
# reverting it (#784; skipped by the < 1.2 readers above), and a
1113+
# hosted pin on a record Bun 1.2+ shares between a regular and a
1114+
# bundled install (#1243; also skipped below 1.2). Both
11081115
# 1.4.2 and 1.3.14 also run the isolated-linker vendored re-run
11091116
# after a late dependent (#861); 1.3 re-hoists a frozen binary lock
11101117
# and refuses one whose trees changed.
1111-
- {os: ubuntu-latest, suite: e2e_bun_lockb, bun: '1.4.2', test_filter: --include-ignored text_migration workspace_late_dependent}
1118+
- {os: ubuntu-latest, suite: e2e_bun_lockb, bun: '1.4.2', test_filter: --include-ignored text_migration workspace_late_dependent binary_shared_bundled_record_hosted_pin_is_managed}
11121119
- {os: ubuntu-latest, suite: e2e_bun_lockb, bun: '1.3.14', test_filter: --include-ignored workspace_late_dependent}
11131120
# Real-vlt capstones (DESIGN §8.4): wiremock patch service and a local
11141121
# npm registry fed from npmjs, driven by the pinned vlt release
@@ -1933,7 +1940,7 @@ jobs:
19331940
driver: docker
19341941

19351942
- name: Install Rust
1936-
run: rustup show
1943+
run: scripts/rustup-retry.sh toolchain install
19371944

19381945
# No `actions/cache` here intentionally. This job builds Docker
19391946
# images and would be flagged by zizmor's cache-poisoning audit.
@@ -2010,7 +2017,7 @@ jobs:
20102017
with:
20112018
persist-credentials: false
20122019
- name: Install Rust
2013-
run: rustup show
2020+
run: scripts/rustup-retry.sh toolchain install
20142021
- name: Cache cargo
20152022
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
20162023
with:
@@ -2057,7 +2064,8 @@ jobs:
20572064
with:
20582065
persist-credentials: false
20592066
- name: Install Rust
2060-
run: rustup show
2067+
shell: bash
2068+
run: scripts/rustup-retry.sh toolchain install
20612069
- name: Cache cargo
20622070
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
20632071
with:
@@ -2163,15 +2171,16 @@ jobs:
21632171
tar -xf target/e2e-bin.tar -C target/e2e-bin
21642172
rm target/e2e-bin.tar
21652173
- name: Install Rust
2166-
run: rustup show
2174+
shell: bash
2175+
run: scripts/rustup-retry.sh toolchain install
21672176
- name: Install the cargo under test
21682177
# bash, not the Windows default pwsh: in PowerShell
21692178
# "$CARGO_TEST_TOOLCHAIN" is an (unset) PowerShell variable, so the
21702179
# windows-latest leg ran `rustup toolchain install ""`.
21712180
shell: bash
21722181
env:
21732182
CARGO_TEST_TOOLCHAIN: ${{ matrix.toolchain }}
2174-
run: rustup toolchain install "$CARGO_TEST_TOOLCHAIN" --profile minimal
2183+
run: scripts/rustup-retry.sh toolchain install "$CARGO_TEST_TOOLCHAIN" --profile minimal
21752184
- name: Real-cargo hosted/vendored + manifest-less VEX
21762185
# The e2e-build binaries, run from the package root as `cargo test`
21772186
# would (see the e2e job's staging step).
@@ -2286,7 +2295,7 @@ jobs:
22862295
with:
22872296
persist-credentials: false
22882297
- name: Install Rust
2289-
run: rustup show
2298+
run: scripts/rustup-retry.sh toolchain install
22902299
- name: Pull the old cargos under test
22912300
run: |
22922301
docker pull rust:1.41-slim
@@ -2392,7 +2401,7 @@ jobs:
23922401

23932402
- name: Install Rust
23942403
if: steps.gate.outputs.run == 'true'
2395-
run: rustup show
2404+
run: scripts/rustup-retry.sh toolchain install
23962405

23972406
- name: Cache cargo
23982407
if: steps.gate.outputs.run == 'true'

‎.github/workflows/vlt-compatibility.yml‎

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ on:
4343
- 'scripts/vlt-historical-integrity.json'
4444
- 'scripts/gen-vlt-collation-golden.mjs'
4545
- 'scripts/ci-vlt-proof-suites.py'
46+
- 'scripts/vlt-compat-gate.py'
47+
- 'scripts/tests/test_vlt_compat_gate.py'
4648
- '.github/workflows/ci.yml'
4749
- 'scripts/tests/test_ci_vlt_rows.py'
4850
push:
@@ -84,6 +86,8 @@ on:
8486
- 'scripts/vlt-historical-integrity.json'
8587
- 'scripts/gen-vlt-collation-golden.mjs'
8688
- 'scripts/ci-vlt-proof-suites.py'
89+
- 'scripts/vlt-compat-gate.py'
90+
- 'scripts/tests/test_vlt_compat_gate.py'
8791
- '.github/workflows/ci.yml'
8892
- 'scripts/tests/test_ci_vlt_rows.py'
8993
schedule:
@@ -136,8 +140,41 @@ jobs:
136140
- name: Every era, suite and OS is covered
137141
run: python3 -B -m unittest scripts/tests/test_ci_vlt_rows.py -v
138142

139-
build:
143+
# Both filters list ci.yml for its vlt `e2e` rows, which install-proof
144+
# leaves out. A PR or push whose only matching change is ci.yml, with
145+
# those rows untouched, would rerun the matrix exactly as on the base:
146+
# matrix-coverage above still checks it, the rest is skipped.
147+
changes:
140148
if: github.event.pull_request.draft != true
149+
runs-on: ubuntu-latest
150+
timeout-minutes: 5
151+
outputs:
152+
matrix: ${{ steps.gate.outputs.matrix }}
153+
steps:
154+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
155+
with:
156+
persist-credentials: false
157+
# A PR's merge commit has the base it was merged onto as parent 1.
158+
fetch-depth: 2
159+
- id: gate
160+
env:
161+
EVENT_NAME: ${{ github.event_name }}
162+
PUSH_BEFORE: ${{ github.event.before }}
163+
run: |
164+
set -euo pipefail
165+
case "$EVENT_NAME" in
166+
pull_request) base=HEAD^1 ;;
167+
push) base="$PUSH_BEFORE" ;;
168+
*) base='' ;;
169+
esac
170+
if [ -n "$base" ] && ! git rev-parse --verify --quiet "$base^{commit}" >/dev/null; then
171+
git fetch --quiet --depth 1 origin "$base" || true
172+
fi
173+
python3 -B scripts/vlt-compat-gate.py --event "$EVENT_NAME" --base "$base" >> "$GITHUB_OUTPUT"
174+
175+
build:
176+
needs: changes
177+
if: needs.changes.outputs.matrix == 'true'
141178
strategy:
142179
fail-fast: false
143180
matrix:
@@ -373,7 +410,8 @@ jobs:
373410
steps: *install-proof-steps
374411

375412
plan:
376-
if: github.event.pull_request.draft != true
413+
needs: changes
414+
if: needs.changes.outputs.matrix == 'true'
377415
runs-on: ubuntu-latest
378416
timeout-minutes: 5
379417
outputs:
@@ -468,8 +506,8 @@ jobs:
468506
retention-days: 14
469507

470508
lock-diff:
471-
needs: native
472-
if: ${{ !cancelled() }}
509+
needs: [changes, native]
510+
if: ${{ !cancelled() && needs.changes.outputs.matrix == 'true' }}
473511
runs-on: ubuntu-latest
474512
timeout-minutes: 10
475513
steps:

0 commit comments

Comments
 (0)