Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
run-checks: ${{ steps.plan.outputs.run_checks }}
test-publish: ${{ steps.plan.outputs.test_publish }}
test-windows-trampoline: ${{ steps.plan.outputs.test_windows_trampoline }}
test-windows-trampoline-check-binary: ${{ steps.plan.outputs.test_windows_trampoline_check_binary }}
save-rust-cache: ${{ steps.plan.outputs.save_rust_cache }}
run-bench: ${{ steps.plan.outputs.run_bench }}
test-smoke: ${{ steps.plan.outputs.test_smoke }}
Expand Down Expand Up @@ -53,6 +54,7 @@ jobs:
HAS_BUILD_SKIP_RELEASE_LABEL: ${{ contains(github.event.pull_request.labels.*.name, 'build:skip-release') }}
HAS_BUILD_RELEASE_LABEL: ${{ contains(github.event.pull_request.labels.*.name, 'build:release') }}
HAS_BUILD_PUSH_DOCKER_LABEL: ${{ contains(github.event.pull_request.labels.*.name, 'build:push-docker') }}
HAS_BUILD_WINDOWS_TRAMPOLINE_LABEL: ${{ contains(github.event.pull_request.labels.*.name, 'build:windows-trampoline') }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
run: |
[[ "$GH_REF" == "refs/heads/main" ]] && on_main_branch=1
Expand All @@ -67,6 +69,7 @@ jobs:
[[ "$HAS_BUILD_SKIP_RELEASE_LABEL" == "true" ]] && has_build_skip_release_label=1
[[ "$HAS_BUILD_RELEASE_LABEL" == "true" ]] && has_build_release_label=1
[[ "$HAS_BUILD_PUSH_DOCKER_LABEL" == "true" ]] && has_build_push_docker_label=1
[[ "$HAS_BUILD_WINDOWS_TRAMPOLINE_LABEL" == "true" ]] && has_build_windows_trampoline_label=1

# Detect changed files
while IFS= read -r file; do
Expand All @@ -83,6 +86,7 @@ jobs:
[[ "$file" =~ ^crates/uv-publish/ || "$file" =~ ^scripts/publish/ || "$file" == "crates/uv/src/commands/publish.rs" ]] && publish_code_changed=1
[[ "$file" == ".github/workflows/test-windows-trampolines.yml" ]] && trampoline_workflow_changed=1
[[ "$file" =~ ^crates/uv-trampoline/ || "$file" =~ ^crates/uv-trampoline-builder/ ]] && trampoline_code_changed=1
[[ "$file" =~ ^crates/uv-trampoline/.*\.rs$ || "$file" =~ ^crates/uv-trampoline-builder/trampolines/ ]] && trampoline_repro_changed=1
[[ "$file" == "scripts/build-trampolines.sh" || "$file" == "scripts/check-trampoline-version-consistency.py" ]] && trampoline_scripts_changed=1
[[ "$file" =~ ^crates/uv-build/ ]] && uv_build_changed=1
[[ "$file" == "Dockerfile" ]] && dockerfile_changed=1
Expand All @@ -108,7 +112,8 @@ jobs:
[[ ! $has_skip_label && ! $has_build_skip_label && ! $has_build_skip_release_label && ($release_build_changed || $has_build_release_label) ]] && build_release_binaries=1
[[ ! $has_skip_label ]] && run_checks=1
[[ $publish_changed || $has_publish_label || $has_extended_label || $on_main_branch ]] && test_publish=1
[[ ! $has_skip_label && ($trampoline_code_changed || $trampoline_scripts_changed || $trampoline_workflow_changed || $rust_deps_changed || $on_main_branch) ]] && test_windows_trampoline=1
[[ ! $has_skip_label && ($trampoline_code_changed || $trampoline_scripts_changed || $trampoline_workflow_changed || $rust_deps_changed || $has_build_windows_trampoline_label || $on_main_branch) ]] && test_windows_trampoline=1
[[ ! $has_skip_label && ($trampoline_repro_changed || $has_build_windows_trampoline_label) ]] && test_windows_trampoline_check_binary=1
[[ $on_main_branch || $cache_relevant_changed ]] && save_rust_cache=1
[[ ! $has_skip_label && ($any_rust_changed || $bench_workflow_changed || $on_main_branch) ]] && run_bench=1
[[ ! $has_skip_label ]] && test_smoke=1
Expand All @@ -128,6 +133,7 @@ jobs:
out run_checks "$run_checks"
out test_publish "$test_publish"
out test_windows_trampoline "$test_windows_trampoline"
out test_windows_trampoline_check_binary "$test_windows_trampoline_check_binary"
out save_rust_cache "$save_rust_cache"
out run_bench "$run_bench"
out test_smoke "$test_smoke"
Expand Down Expand Up @@ -193,6 +199,8 @@ jobs:
needs: plan
if: ${{ needs.plan.outputs.test-windows-trampoline == 'true' }}
uses: ./.github/workflows/test-windows-trampolines.yml
with:
trampoline-build: ${{ needs.plan.outputs.test-windows-trampoline-check-binary }}

build-dev-binaries:
needs: plan
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/test-windows-trampolines.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
on:
workflow_call:
inputs:
trampoline-build:
description: "Whether to check the committed trampoline binaries"
required: false
type: string
default: "false"

permissions: {}

Expand All @@ -25,15 +31,14 @@ jobs:
- name: "Check windows crate versions match"
run: uv run --no-project scripts/check-trampoline-version-consistency.py

# Verify committed trampolines match a reproducible Docker build
windows-trampoline-reproducible:
# uv version bumps (e.g., https://github.com/astral-sh/uv/pull/18805) cause the reproducible
# check to fail and these are not regenerated as a part of the release process so we temporarily
# disable this job
if: false
# Verify committed trampolines were built with the Docker image
windows-trampoline-check-binary:
# Only run when trampoline sources changed or the `build:windows-trampoline`
# label is set, as otherwise uv version bumps cause the check to fail.
if: ${{ inputs.trampoline-build == 'true' }}
timeout-minutes: 30
runs-on: ubuntu-latest
name: "check reproducible build"
name: "check binary"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
Expand Down
Loading