mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Update cargo-dist (#14156)
Also took the time to migrate to the external config format to normalize our projects for team comfort (`ty` *has* to use this format for its workspace structure).
This commit is contained in:
parent
e9d5780369
commit
c710246d76
3 changed files with 90 additions and 84 deletions
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
@ -69,7 +69,7 @@ jobs:
|
||||||
# we specify bash to get pipefail; it guards against the `curl` command
|
# we specify bash to get pipefail; it guards against the `curl` command
|
||||||
# failing. otherwise `sh` won't catch that `curl` returned non-0
|
# failing. otherwise `sh` won't catch that `curl` returned non-0
|
||||||
shell: bash
|
shell: bash
|
||||||
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/cargo-dist/releases/download/v0.28.4/cargo-dist-installer.sh | sh"
|
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/cargo-dist/releases/download/v0.28.7-prerelease.1/cargo-dist-installer.sh | sh"
|
||||||
- name: Cache dist
|
- name: Cache dist
|
||||||
uses: actions/upload-artifact@6027e3dd177782cd8ab9af838c04fd81a07f1d47
|
uses: actions/upload-artifact@6027e3dd177782cd8ab9af838c04fd81a07f1d47
|
||||||
with:
|
with:
|
||||||
|
|
83
Cargo.toml
83
Cargo.toml
|
@ -297,89 +297,6 @@ codegen-units = 1
|
||||||
[profile.dist]
|
[profile.dist]
|
||||||
inherits = "release"
|
inherits = "release"
|
||||||
|
|
||||||
# Config for 'dist'
|
|
||||||
[workspace.metadata.dist]
|
|
||||||
# The preferred dist version to use in CI (Cargo.toml SemVer syntax)
|
|
||||||
cargo-dist-version = "0.28.4"
|
|
||||||
# make a package being included in our releases opt-in instead of opt-out
|
|
||||||
dist = false
|
|
||||||
# CI backends to support
|
|
||||||
ci = "github"
|
|
||||||
# The installers to generate for each app
|
|
||||||
installers = ["shell", "powershell"]
|
|
||||||
# The archive format to use for windows builds (defaults .zip)
|
|
||||||
windows-archive = ".zip"
|
|
||||||
# The archive format to use for non-windows builds (defaults .tar.xz)
|
|
||||||
unix-archive = ".tar.gz"
|
|
||||||
# Target platforms to build apps for (Rust target-triple syntax)
|
|
||||||
targets = [
|
|
||||||
"aarch64-apple-darwin",
|
|
||||||
"aarch64-pc-windows-msvc",
|
|
||||||
"aarch64-unknown-linux-gnu",
|
|
||||||
"aarch64-unknown-linux-musl",
|
|
||||||
"arm-unknown-linux-musleabihf",
|
|
||||||
"armv7-unknown-linux-gnueabihf",
|
|
||||||
"armv7-unknown-linux-musleabihf",
|
|
||||||
"i686-pc-windows-msvc",
|
|
||||||
"i686-unknown-linux-gnu",
|
|
||||||
"i686-unknown-linux-musl",
|
|
||||||
"powerpc64-unknown-linux-gnu",
|
|
||||||
"powerpc64le-unknown-linux-gnu",
|
|
||||||
"riscv64gc-unknown-linux-gnu",
|
|
||||||
"s390x-unknown-linux-gnu",
|
|
||||||
"x86_64-apple-darwin",
|
|
||||||
"x86_64-pc-windows-msvc",
|
|
||||||
"x86_64-unknown-linux-gnu",
|
|
||||||
"x86_64-unknown-linux-musl",
|
|
||||||
]
|
|
||||||
# Whether to auto-include files like READMEs, LICENSEs, and CHANGELOGs (default true)
|
|
||||||
auto-includes = false
|
|
||||||
# Whether dist should create a Github Release or use an existing draft
|
|
||||||
create-release = true
|
|
||||||
# Which actions to run on pull requests
|
|
||||||
pr-run-mode = "plan"
|
|
||||||
# Whether CI should trigger releases with dispatches instead of tag pushes
|
|
||||||
dispatch-releases = true
|
|
||||||
# Which phase dist should use to create the GitHub release
|
|
||||||
github-release = "announce"
|
|
||||||
# Whether CI should include auto-generated code to build local artifacts
|
|
||||||
build-local-artifacts = false
|
|
||||||
# Local artifacts jobs to run in CI
|
|
||||||
local-artifacts-jobs = ["./build-binaries", "./build-docker"]
|
|
||||||
# Publish jobs to run in CI
|
|
||||||
publish-jobs = ["./publish-pypi"]
|
|
||||||
# Post-announce jobs to run in CI
|
|
||||||
post-announce-jobs = ["./publish-docs"]
|
|
||||||
# Custom permissions for GitHub Jobs
|
|
||||||
github-custom-job-permissions = { "build-docker" = { packages = "write", contents = "read", id-token = "write", attestations = "write" } }
|
|
||||||
# Whether to install an updater program
|
|
||||||
install-updater = false
|
|
||||||
# Path that installers should place binaries in
|
|
||||||
install-path = ["$XDG_BIN_HOME/", "$XDG_DATA_HOME/../bin", "~/.local/bin"]
|
|
||||||
|
|
||||||
[workspace.metadata.dist.github-custom-runners]
|
|
||||||
global = "depot-ubuntu-latest-4"
|
|
||||||
|
|
||||||
[workspace.metadata.dist.min-glibc-version]
|
|
||||||
# Override glibc version for specific target triplets.
|
|
||||||
aarch64-unknown-linux-gnu = "2.28"
|
|
||||||
riscv64gc-unknown-linux-gnu = "2.31"
|
|
||||||
# Override all remaining glibc versions.
|
|
||||||
"*" = "2.17"
|
|
||||||
|
|
||||||
[workspace.metadata.dist.github-action-commits]
|
|
||||||
"actions/checkout" = "11bd71901bbe5b1630ceea73d27597364c9af683" # v4
|
|
||||||
"actions/upload-artifact" = "6027e3dd177782cd8ab9af838c04fd81a07f1d47" # v4.6.2
|
|
||||||
"actions/download-artifact" = "d3f86a106a0bac45b974a628896c90dbdf5c8093" # v4.3.0
|
|
||||||
"actions/attest-build-provenance" = "c074443f1aee8d4aeeae555aebba3282517141b2" #v2.2.3
|
|
||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
reqwest-middleware = { git = "https://github.com/astral-sh/reqwest-middleware", rev = "ad8b9d332d1773fde8b4cd008486de5973e0a3f8" }
|
reqwest-middleware = { git = "https://github.com/astral-sh/reqwest-middleware", rev = "ad8b9d332d1773fde8b4cd008486de5973e0a3f8" }
|
||||||
reqwest-retry = { git = "https://github.com/astral-sh/reqwest-middleware", rev = "ad8b9d332d1773fde8b4cd008486de5973e0a3f8" }
|
reqwest-retry = { git = "https://github.com/astral-sh/reqwest-middleware", rev = "ad8b9d332d1773fde8b4cd008486de5973e0a3f8" }
|
||||||
|
|
||||||
[workspace.metadata.dist.binaries]
|
|
||||||
"*" = ["uv", "uvx"]
|
|
||||||
# Add "uvw" binary for Windows targets
|
|
||||||
aarch64-pc-windows-msvc = ["uv", "uvx", "uvw"]
|
|
||||||
i686-pc-windows-msvc = ["uv", "uvx", "uvw"]
|
|
||||||
x86_64-pc-windows-msvc = ["uv", "uvx", "uvw"]
|
|
||||||
|
|
89
dist-workspace.toml
Normal file
89
dist-workspace.toml
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
[workspace]
|
||||||
|
members = ["cargo:."]
|
||||||
|
|
||||||
|
# Config for 'dist'
|
||||||
|
[dist]
|
||||||
|
# The preferred dist version to use in CI (Cargo.toml SemVer syntax)
|
||||||
|
cargo-dist-version = "0.28.7-prerelease.1"
|
||||||
|
# make a package being included in our releases opt-in instead of opt-out
|
||||||
|
dist = false
|
||||||
|
# CI backends to support
|
||||||
|
ci = "github"
|
||||||
|
# The installers to generate for each app
|
||||||
|
installers = ["shell", "powershell"]
|
||||||
|
# The archive format to use for windows builds (defaults .zip)
|
||||||
|
windows-archive = ".zip"
|
||||||
|
# The archive format to use for non-windows builds (defaults .tar.xz)
|
||||||
|
unix-archive = ".tar.gz"
|
||||||
|
# Target platforms to build apps for (Rust target-triple syntax)
|
||||||
|
targets = [
|
||||||
|
"aarch64-apple-darwin",
|
||||||
|
"aarch64-unknown-linux-gnu",
|
||||||
|
"aarch64-unknown-linux-musl",
|
||||||
|
"aarch64-pc-windows-msvc",
|
||||||
|
"arm-unknown-linux-musleabihf",
|
||||||
|
"armv7-unknown-linux-gnueabihf",
|
||||||
|
"armv7-unknown-linux-musleabihf",
|
||||||
|
"x86_64-apple-darwin",
|
||||||
|
"powerpc64-unknown-linux-gnu",
|
||||||
|
"powerpc64le-unknown-linux-gnu",
|
||||||
|
"riscv64gc-unknown-linux-gnu",
|
||||||
|
"s390x-unknown-linux-gnu",
|
||||||
|
"x86_64-unknown-linux-gnu",
|
||||||
|
"x86_64-unknown-linux-musl",
|
||||||
|
"x86_64-pc-windows-msvc",
|
||||||
|
"i686-unknown-linux-gnu",
|
||||||
|
"i686-unknown-linux-musl",
|
||||||
|
"i686-pc-windows-msvc"
|
||||||
|
]
|
||||||
|
# Whether to auto-include files like READMEs, LICENSEs, and CHANGELOGs (default true)
|
||||||
|
auto-includes = false
|
||||||
|
# Whether dist should create a Github Release or use an existing draft
|
||||||
|
create-release = true
|
||||||
|
# Which actions to run on pull requests
|
||||||
|
pr-run-mode = "plan"
|
||||||
|
# Whether CI should trigger releases with dispatches instead of tag pushes
|
||||||
|
dispatch-releases = true
|
||||||
|
# Which phase dist should use to create the GitHub release
|
||||||
|
github-release = "announce"
|
||||||
|
# Whether CI should include auto-generated code to build local artifacts
|
||||||
|
build-local-artifacts = false
|
||||||
|
# Local artifacts jobs to run in CI
|
||||||
|
local-artifacts-jobs = ["./build-binaries", "./build-docker"]
|
||||||
|
# Publish jobs to run in CI
|
||||||
|
publish-jobs = ["./publish-pypi"]
|
||||||
|
# Post-announce jobs to run in CI
|
||||||
|
post-announce-jobs = ["./publish-docs"]
|
||||||
|
# Custom permissions for GitHub Jobs
|
||||||
|
github-custom-job-permissions = { "build-docker" = { packages = "write", contents = "read", id-token = "write", attestations = "write" } }
|
||||||
|
# Whether to install an updater program
|
||||||
|
install-updater = false
|
||||||
|
# Path that installers should place binaries in
|
||||||
|
install-path = [
|
||||||
|
"$XDG_BIN_HOME/",
|
||||||
|
"$XDG_DATA_HOME/../bin",
|
||||||
|
"~/.local/bin"
|
||||||
|
]
|
||||||
|
|
||||||
|
[dist.github-custom-runners]
|
||||||
|
global = "depot-ubuntu-latest-4"
|
||||||
|
|
||||||
|
[dist.min-glibc-version]
|
||||||
|
# Override glibc version for specific target triplets.
|
||||||
|
aarch64-unknown-linux-gnu = "2.28"
|
||||||
|
riscv64gc-unknown-linux-gnu = "2.31"
|
||||||
|
# Override all remaining glibc versions.
|
||||||
|
"*" = "2.17"
|
||||||
|
|
||||||
|
[dist.github-action-commits]
|
||||||
|
"actions/checkout" = "11bd71901bbe5b1630ceea73d27597364c9af683" # v4
|
||||||
|
"actions/upload-artifact" = "6027e3dd177782cd8ab9af838c04fd81a07f1d47" # v4.6.2
|
||||||
|
"actions/download-artifact" = "d3f86a106a0bac45b974a628896c90dbdf5c8093" # v4.3.0
|
||||||
|
"actions/attest-build-provenance" = "c074443f1aee8d4aeeae555aebba3282517141b2" #v2.2.3
|
||||||
|
|
||||||
|
[dist.binaries]
|
||||||
|
"*" = ["uv", "uvx"]
|
||||||
|
# Add "uvw" binary for Windows targets
|
||||||
|
aarch64-pc-windows-msvc = ["uv", "uvx", "uvw"]
|
||||||
|
i686-pc-windows-msvc = ["uv", "uvx", "uvw"]
|
||||||
|
x86_64-pc-windows-msvc = ["uv", "uvx", "uvw"]
|
Loading…
Add table
Add a link
Reference in a new issue