Add python-arch support (#1079)

Windows ARM64 jobs may need x64 Python independently of their Python
version pin. Add `python-arch` to export `UV_PYTHON_ARCH` for subsequent
steps and include the selected architecture in the uv and managed-Python
cache keys. The input takes precedence over an inherited environment
value, and unsupported uv versions fail before environment creation.

Requires a uv release with `UV_PYTHON_ARCH` support.
This commit is contained in:
Zanie Blue
2026-10-07 09:03:18 +02:00
committed by GitHub
parent c84232ca4f
commit b06acff4b6
15 changed files with 431 additions and 15 deletions
Generated Vendored
+5
View File
@@ -64447,6 +64447,9 @@ function loadInputs() {
const version3 = getInput("version");
const versionFile = getVersionFile(workingDirectory);
const pythonVersion = getPythonVersion(versionFile);
const pythonArchInput = getInput("python-arch");
const pythonArch = pythonArchInput || process.env.UV_PYTHON_ARCH || "";
const exportPythonArch = pythonArchInput !== "";
const activateEnvironment = getBooleanInput("activate-environment");
const noProject = getBooleanInput("no-project");
const venvPath = getVenvPath(workingDirectory, activateEnvironment);
@@ -64484,12 +64487,14 @@ function loadInputs() {
checksum,
downloadFromAstralMirror,
enableCache,
exportPythonArch,
githubToken,
ignoreEmptyWorkdir,
ignoreNothingToCache,
manifestFile,
noProject,
pruneCache: pruneCache2,
pythonArch,
pythonDir,
pythonVersion,
quiet: quiet2,