Compare commits

..

1 Commits

Author SHA1 Message Date
Kevin Stillhammer
6a26ee8850 Debug macos python version 2024-12-26 17:04:56 +01:00
33 changed files with 9709 additions and 11663 deletions

View File

@@ -14,6 +14,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🚀 Run Release Drafter
uses: release-drafter/release-drafter@v6.1.0
uses: release-drafter/release-drafter@v6.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -64,39 +64,6 @@ jobs:
fi
env:
UV_VERSION: ${{ steps.setup-uv.outputs.uv-version }}
test-pyproject-file-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install version 0.5.14
id: setup-uv
uses: ./
with:
pyproject-file: "__tests__/fixtures/pyproject-toml-project/pyproject.toml"
- name: Correct version gets installed
run: |
if [ "$UV_VERSION" != "0.5.14" ]; then
exit 1
fi
env:
UV_VERSION: ${{ steps.setup-uv.outputs.uv-version }}
test-uv-file-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install version 0.5.15
id: setup-uv
uses: ./
with:
pyproject-file: "__tests__/fixtures/uv-toml-project/pyproject.toml"
uv-file: "__tests__/fixtures/uv-toml-project/uv.toml"
- name: Correct version gets installed
run: |
if [ "$UV_VERSION" != "0.5.15" ]; then
exit 1
fi
env:
UV_VERSION: ${{ steps.setup-uv.outputs.uv-version }}
test-checksum:
runs-on: ${{ matrix.os }}
strategy:
@@ -200,24 +167,17 @@ jobs:
exit 1
fi
shell: bash
test-malformed-pyproject-file-fallback:
runs-on: ubuntu-latest
test-macos-python-version:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install using malformed pyproject.toml
id: setup-uv
uses: ./
- run: |
/Applications/Xcode_15.4.app/Contents/Developer/usr/bin/python3 --version
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
pyproject-file: "__tests__/fixtures/malformed-pyproject-toml-project/pyproject.toml"
- run: uv sync
working-directory: __tests__/fixtures/uv-project
test-musl:
runs-on: ubuntu-latest
container: alpine
steps:
- uses: actions/checkout@v4
- name: Install latest version
uses: ./
- run: apk add python3
- run: uv sync
working-directory: __tests__/fixtures/uv-project
python-version: 3.9
- run: |
echo "$UV_PYTHON"
python --version
uv python list
shell: bash

View File

@@ -1,8 +1,6 @@
name: "Update known checksums"
on:
workflow_dispatch:
schedule:
- cron: "0 4 * * *" # Run every day at 4am UTC
jobs:
build:
@@ -19,7 +17,7 @@ jobs:
src/download/checksum/known-checksums.ts ${{ secrets.GITHUB_TOKEN }}
- run: npm install && npm run all
- name: Create Pull Request
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
with:
commit-message: "chore: update known checksums"
title:

View File

@@ -11,11 +11,9 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
## Contents
- [Usage](#usage)
- [Install a required-version or latest (default)](#install-a-required-version-or-latest-default)
- [Install the latest version](#install-the-latest-version)
- [Install the latest version (default)](#install-the-latest-version-default)
- [Install a specific version](#install-a-specific-version)
- [Install a version by supplying a semver range](#install-a-version-by-supplying-a-semver-range)
- [Install a required-version](#install-a-required-version)
- [Python version](#python-version)
- [Validate checksum](#validate-checksum)
- [Enable Caching](#enable-caching)
@@ -32,20 +30,7 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
## Usage
### Install a required-version or latest (default)
```yaml
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
```
If you do not specify a version, this action will look for a [required-version](https://docs.astral.sh/uv/reference/settings/#required-version)
in a `uv.toml` or `pyproject.toml` file in the repository root. If none is found, the latest version will be installed.
For an example workflow, see
[here](https://github.com/charliermarsh/autobot/blob/e42c66659bf97b90ca9ff305a19cc99952d0d43f/.github/workflows/ci.yaml).
### Install the latest version
### Install the latest version (default)
```yaml
- name: Install the latest version of uv
@@ -54,6 +39,9 @@ For an example workflow, see
version: "latest"
```
For an example workflow, see
[here](https://github.com/charliermarsh/autobot/blob/e42c66659bf97b90ca9ff305a19cc99952d0d43f/.github/workflows/ci.yaml).
### Install a specific version
```yaml
@@ -82,25 +70,6 @@ to install the latest version that satisfies the range.
version: "0.4.x"
```
### Install a required-version
You can specify a [required-version](https://docs.astral.sh/uv/reference/settings/#required-version)
in either a `uv.toml` or `pyproject.toml` file:
```yaml
- name: Install required-version defined in uv.toml
uses: astral-sh/setup-uv@v5
with:
uv-file: "path/to/uv.toml"
```
```yaml
- name: Install required-version defined in pyproject.toml
uses: astral-sh/setup-uv@v5
with:
pyproject-file: "path/to/pyproject.toml"
```
### Python version
You can use the input `python-version` to
@@ -412,40 +381,6 @@ output:
run: echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}"
```
### Should I include the resolution strategy in the cache key?
**Yes!**
The cache key gets computed by using the [cache-dependency-glob](#cache-dependency-glob).
If you
have jobs which use the same dependency definitions from `requirements.txt` or
`pyproject.toml` but different
[resolution strategies](https://docs.astral.sh/uv/concepts/resolution/#resolution-strategy),
each job will have different dependencies or dependency versions.
But if you do not add the resolution strategy as a [cache-suffix](#enable-caching),
they will have the same cache key.
This means the first job which starts uploading its cache will win and all other job will fail
uploading the cache,
because they try to upload with the same cache key.
You might see errors like
`Failed to save: Failed to CreateCacheEntry: Received non-retryable error: Failed request: (409) Conflict: cache entry with the same key, version, and scope already exists`
### Why do I see warnings like `Cache not found for keys`
When a workflow runs for the first time on a branch and has a new cache key, because the
[cache-dependency-glob](#cache-dependency-glob) found changed files (changed dependencies),
the cache will not be found and the warning `Cache not found for keys` will be printed.
While this might be irritating at first, it is expected behaviour and the cache will be created
and reused in later workflows.
The reason for the warning is, that we have to way to know if this is the first run of a new
cache key or the user accidentally misconfigured the [cache-dependency-glob](#cache-dependency-glob)
or [cache-suffix](#enable-caching) and the cache never gets used.
## Acknowledgements
`setup-uv` was initially written and published by [Kevin Stillhammer](https://github.com/eifinger)

View File

@@ -1,6 +0,0 @@
def main():
print("Hello from malformed-pyproject-toml-project!")
if __name__ == "__main__":
main()

View File

@@ -1,9 +0,0 @@
[project]
name = "malformed-pyproject-toml-project"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = []
[malformed-toml

View File

@@ -1,6 +0,0 @@
def main():
print("Hello from pyproject-toml-project!")
if __name__ == "__main__":
main()

View File

@@ -1,19 +0,0 @@
[project]
name = "pyproject-toml-project"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = []
[dependency-groups]
dev = [
"reuse==5.0.2",
{include-group = "lint"},
]
lint = [
"flake8==4.0.1",
]
[tool.uv]
required-version = "==0.5.14"

View File

@@ -1 +0,0 @@
3.11

View File

@@ -1,6 +0,0 @@
def main():
print("Hello from uv-toml-project!")
if __name__ == "__main__":
main()

View File

@@ -1,10 +0,0 @@
[project]
name = "uv-toml-project"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = []
[tool.uv]
required-version = "==0.5.14"

View File

@@ -1 +0,0 @@
required-version = "==0.5.15"

View File

@@ -4,14 +4,8 @@ description:
author: "astral-sh"
inputs:
version:
description: "The version of uv to install e.g., `0.5.0` Defaults to the version in pyproject.toml or 'latest'."
default: ""
pyproject-file:
description: "Path to a pyproject.toml"
default: ""
uv-file:
description: "Path to a uv.toml"
default: ""
description: "The version of uv to install"
default: "latest"
python-version:
description: "The version of Python to set UV_PYTHON to"
required: false
@@ -24,7 +18,7 @@ inputs:
required: false
default: ${{ github.token }}
enable-cache:
description: "Enable uploading of the uv cache"
description: "Enable caching of the uv cache"
default: "auto"
cache-dependency-glob:
description:

196
dist/save-cache/index.js generated vendored
View File

@@ -70338,14 +70338,6 @@ const { isUint8Array, isArrayBuffer } = __nccwpck_require__(8253)
const { File: UndiciFile } = __nccwpck_require__(3041)
const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(4322)
let random
try {
const crypto = __nccwpck_require__(7598)
random = (max) => crypto.randomInt(0, max)
} catch {
random = (max) => Math.floor(Math.random(max))
}
let ReadableStream = globalThis.ReadableStream
/** @type {globalThis['File']} */
@@ -70431,7 +70423,7 @@ function extractBody (object, keepalive = false) {
// Set source to a copy of the bytes held by object.
source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))
} else if (util.isFormDataLike(object)) {
const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`
const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}`
const prefix = `--${boundary}\r\nContent-Disposition: form-data`
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
@@ -91452,6 +91444,15 @@ var __importStar = (this && this.__importStar) || (function () {
return result;
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.STATE_CACHE_MATCHED_KEY = exports.STATE_CACHE_KEY = void 0;
exports.restoreCache = restoreCache;
@@ -91464,12 +91465,13 @@ const exec = __importStar(__nccwpck_require__(5236));
exports.STATE_CACHE_KEY = "cache-key";
exports.STATE_CACHE_MATCHED_KEY = "cache-matched-key";
const CACHE_VERSION = "1";
async function restoreCache() {
const cacheKey = await computeKeys();
function restoreCache() {
return __awaiter(this, void 0, void 0, function* () {
const cacheKey = yield computeKeys();
let matchedKey;
core.info(`Trying to restore uv cache from GitHub Actions cache with key: ${cacheKey}`);
try {
matchedKey = await cache.restoreCache([inputs_1.cacheLocalPath], cacheKey);
matchedKey = yield cache.restoreCache([inputs_1.cacheLocalPath], cacheKey);
}
catch (err) {
const message = err.message;
@@ -91479,12 +91481,14 @@ async function restoreCache() {
}
core.saveState(exports.STATE_CACHE_KEY, cacheKey);
handleMatchResult(matchedKey, cacheKey);
});
}
async function computeKeys() {
function computeKeys() {
return __awaiter(this, void 0, void 0, function* () {
let cacheDependencyPathHash = "-";
if (inputs_1.cacheDependencyGlob !== "") {
core.info(`Searching files using cache dependency glob: ${inputs_1.cacheDependencyGlob.split("\n").join(",")}`);
cacheDependencyPathHash += await (0, hash_files_1.hashFiles)(inputs_1.cacheDependencyGlob, true);
cacheDependencyPathHash += yield (0, hash_files_1.hashFiles)(inputs_1.cacheDependencyGlob, true);
if (cacheDependencyPathHash === "-") {
core.warning(`No file matched to [${inputs_1.cacheDependencyGlob.split("\n").join(",")}]. The cache will never get invalidated. Make sure you have checked out the target repository and configured the cache-dependency-glob input correctly.`);
}
@@ -91493,11 +91497,12 @@ async function computeKeys() {
cacheDependencyPathHash = "-no-dependency-glob";
}
const suffix = inputs_1.cacheSuffix ? `-${inputs_1.cacheSuffix}` : "";
const pythonVersion = await getPythonVersion();
const platform = await (0, platforms_1.getPlatform)();
return `setup-uv-${CACHE_VERSION}-${(0, platforms_1.getArch)()}-${platform}-${pythonVersion}${cacheDependencyPathHash}${suffix}`;
const pythonVersion = yield getPythonVersion();
return `setup-uv-${CACHE_VERSION}-${(0, platforms_1.getArch)()}-${(0, platforms_1.getPlatform)()}-${pythonVersion}${cacheDependencyPathHash}${suffix}`;
});
}
async function getPythonVersion() {
function getPythonVersion() {
return __awaiter(this, void 0, void 0, function* () {
if (inputs_1.pythonVersion !== "") {
return inputs_1.pythonVersion;
}
@@ -91512,10 +91517,10 @@ async function getPythonVersion() {
};
try {
const execArgs = ["python", "find"];
await exec.exec("uv", execArgs, options);
yield exec.exec("uv", execArgs, options);
const pythonPath = output.trim();
output = "";
await exec.exec(pythonPath, ["--version"], options);
yield exec.exec(pythonPath, ["--version"], options);
// output is like "Python 3.8.10"
return output.split(" ")[1].trim();
}
@@ -91524,6 +91529,7 @@ async function getPythonVersion() {
core.debug(`Failed to get python version from uv. Error: ${err.message}`);
return "unknown";
}
});
}
function handleMatchResult(matchedKey, primaryKey) {
if (!matchedKey) {
@@ -91577,6 +91583,22 @@ var __importStar = (this && this.__importStar) || (function () {
return result;
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __asyncValues = (this && this.__asyncValues) || function (o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.hashFiles = hashFiles;
const crypto = __importStar(__nccwpck_require__(7598));
@@ -91593,13 +91615,19 @@ const glob_1 = __nccwpck_require__(7206);
* @param pattern The glob pattern to match files.
* @param verbose Whether to log the files being hashed.
*/
async function hashFiles(pattern, verbose = false) {
const globber = await (0, glob_1.create)(pattern);
function hashFiles(pattern_1) {
return __awaiter(this, arguments, void 0, function* (pattern, verbose = false) {
var _a, e_1, _b, _c;
const globber = yield (0, glob_1.create)(pattern);
let hasMatch = false;
const writeDelegate = verbose ? core.info : core.debug;
const result = crypto.createHash("sha256");
let count = 0;
for await (const file of globber.globGenerator()) {
try {
for (var _d = true, _e = __asyncValues(globber.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
_c = _f.value;
_d = false;
const file = _c;
writeDelegate(file);
if (fs.statSync(file).isDirectory()) {
writeDelegate(`Skip directory '${file}'.`);
@@ -91607,13 +91635,21 @@ async function hashFiles(pattern, verbose = false) {
}
const hash = crypto.createHash("sha256");
const pipeline = util.promisify(stream.pipeline);
await pipeline(fs.createReadStream(file), hash);
yield pipeline(fs.createReadStream(file), hash);
result.write(hash.digest());
count++;
if (!hasMatch) {
hasMatch = true;
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
}
finally { if (e_1) throw e_1.error; }
}
result.end();
if (hasMatch) {
writeDelegate(`Found ${count} files to hash.`);
@@ -91621,6 +91657,7 @@ async function hashFiles(pattern, verbose = false) {
}
writeDelegate("No matches found for glob");
return "";
});
}
@@ -91664,6 +91701,15 @@ var __importStar = (this && this.__importStar) || (function () {
return result;
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.run = run;
const cache = __importStar(__nccwpck_require__(5116));
@@ -91672,10 +91718,11 @@ const exec = __importStar(__nccwpck_require__(5236));
const fs = __importStar(__nccwpck_require__(3024));
const restore_cache_1 = __nccwpck_require__(5391);
const inputs_1 = __nccwpck_require__(9612);
async function run() {
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
if (inputs_1.enableCache) {
await saveCache();
yield saveCache();
// node will stay alive if any promises are not resolved,
// which is a possibility if HTTP requests are dangling
// due to retries or timeouts. We know that if we got here
@@ -91688,8 +91735,10 @@ async function run() {
const err = error;
core.setFailed(err.message);
}
});
}
async function saveCache() {
function saveCache() {
return __awaiter(this, void 0, void 0, function* () {
const cacheKey = core.getState(restore_cache_1.STATE_CACHE_KEY);
const matchedKey = core.getState(restore_cache_1.STATE_CACHE_MATCHED_KEY);
if (!cacheKey) {
@@ -91701,14 +91750,14 @@ async function saveCache() {
return;
}
if (inputs_1.pruneCache) {
await pruneCache();
yield pruneCache();
}
core.info(`Saving cache path: ${inputs_1.cacheLocalPath}`);
if (!fs.existsSync(inputs_1.cacheLocalPath) && !inputs_1.ignoreNothingToCache) {
throw new Error(`Cache path ${inputs_1.cacheLocalPath} does not exist on disk. This likely indicates that there are no dependencies to cache. Consider disabling the cache input if it is not needed.`);
}
try {
await cache.saveCache([inputs_1.cacheLocalPath], cacheKey);
yield cache.saveCache([inputs_1.cacheLocalPath], cacheKey);
core.info(`cache saved with the key: ${cacheKey}`);
}
catch (e) {
@@ -91721,14 +91770,17 @@ async function saveCache() {
throw e;
}
}
});
}
async function pruneCache() {
function pruneCache() {
return __awaiter(this, void 0, void 0, function* () {
const options = {
silent: !core.isDebug(),
};
const execArgs = ["cache", "prune", "--ci"];
core.info("Pruning cache...");
await exec.exec("uv", execArgs, options);
yield exec.exec("uv", execArgs, options);
});
}
run();
@@ -91777,12 +91829,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.githubToken = exports.toolDir = exports.toolBinDir = exports.ignoreNothingToCache = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.enableCache = exports.checkSum = exports.pythonVersion = exports.uvFile = exports.pyProjectFile = exports.version = void 0;
exports.githubToken = exports.toolDir = exports.toolBinDir = exports.ignoreNothingToCache = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.enableCache = exports.checkSum = exports.pythonVersion = exports.version = void 0;
const core = __importStar(__nccwpck_require__(7484));
const node_path_1 = __importDefault(__nccwpck_require__(6760));
exports.version = core.getInput("version");
exports.pyProjectFile = core.getInput("pyproject-file");
exports.uvFile = core.getInput("uv-file");
exports.pythonVersion = core.getInput("python-version");
exports.checkSum = core.getInput("checksum");
exports.enableCache = getEnableCache();
@@ -91848,101 +91898,33 @@ function expandTilde(input) {
/***/ }),
/***/ 8361:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
/***/ ((__unused_webpack_module, exports) => {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getArch = getArch;
exports.getPlatform = getPlatform;
const exec = __importStar(__nccwpck_require__(5236));
const core = __importStar(__nccwpck_require__(7484));
function getArch() {
const arch = process.arch;
const archMapping = {
ia32: "i686",
x64: "x86_64",
arm64: "aarch64",
s390x: "s390x",
ppc64: "powerpc64le",
};
if (arch in archMapping) {
return archMapping[arch];
}
}
async function getPlatform() {
const processPlatform = process.platform;
function getPlatform() {
const platform = process.platform;
const platformMapping = {
linux: "unknown-linux-gnu",
darwin: "apple-darwin",
win32: "pc-windows-msvc",
};
if (processPlatform in platformMapping) {
const platform = platformMapping[processPlatform];
if (platform === "unknown-linux-gnu") {
const isMusl = await isMuslOs();
return isMusl ? "unknown-linux-musl" : platform;
}
return platform;
}
}
async function isMuslOs() {
let stdOutput = "";
let errOutput = "";
const options = {
silent: !core.isDebug(),
listeners: {
stdout: (data) => {
stdOutput += data.toString();
},
stderr: (data) => {
errOutput += data.toString();
},
},
ignoreReturnCode: true,
};
try {
const execArgs = ["--version"];
await exec.exec("ldd", execArgs, options);
return stdOutput.includes("musl") || errOutput.includes("musl");
}
catch (error) {
const err = error;
core.warning(`Failed to determine glibc or musl. Falling back to glibc. Error: ${err.message}`);
return false;
if (platform in platformMapping) {
return platformMapping[platform];
}
}

9901
dist/setup/index.js generated vendored

File diff suppressed because it is too large Load Diff

8640
dist/update-known-checksums/index.js generated vendored

File diff suppressed because it is too large Load Diff

775
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -26,22 +26,20 @@
"@actions/cache": "^4.0.0",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
"@actions/glob": "^0.5.0",
"@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.2",
"@octokit/core": "^6.1.3",
"@octokit/plugin-paginate-rest": "^11.4.0",
"@octokit/plugin-rest-endpoint-methods": "^13.3.0",
"smol-toml": "^1.3.1"
"@actions/tool-cache": "^2.0.1",
"@octokit/rest": "^21.0.2"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/node": "^22.12.0",
"@types/node": "^22.10.2",
"@types/semver": "^7.5.8",
"@vercel/ncc": "^0.38.3",
"jest": "^29.7.0",
"js-yaml": "^4.1.0",
"ts-jest": "^29.2.5",
"typescript": "^5.7.3"
"typescript": "^5.7.2"
}
}

View File

@@ -53,8 +53,7 @@ async function computeKeys(): Promise<string> {
}
const suffix = cacheSuffix ? `-${cacheSuffix}` : "";
const pythonVersion = await getPythonVersion();
const platform = await getPlatform();
return `setup-uv-${CACHE_VERSION}-${getArch()}-${platform}-${pythonVersion}${cacheDependencyPathHash}${suffix}`;
return `setup-uv-${CACHE_VERSION}-${getArch()}-${getPlatform()}-${pythonVersion}${cacheDependencyPathHash}${suffix}`;
}
async function getPythonVersion(): Promise<string> {

View File

@@ -1,761 +1,5 @@
// AUTOGENERATED_DO_NOT_EDIT
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
"aarch64-apple-darwin-0.6.2":
"4af802a1216053650dd82eee85ea4241994f432937d41c8b0bc90f2639e6ae14",
"aarch64-pc-windows-msvc-0.6.2":
"02299bd78e4fbd2850532710c52a92368601f77654e3c6c342c651d75e6ca1f6",
"aarch64-unknown-linux-gnu-0.6.2":
"ca4c08724764a2b6c8f2173c4e3ca9dcde0d9d328e73b4d725cfb6b17a925eed",
"aarch64-unknown-linux-musl-0.6.2":
"9a90ef4761d75ee1a5158cc2fbd787c78dcfb1c12532a00a3c13b915db720c2e",
"arm-unknown-linux-musleabihf-0.6.2":
"f3643b8b67d6f711876a5682d4607b4a31e6e2935b4ccb35d7a98ec067b944d9",
"armv7-unknown-linux-gnueabihf-0.6.2":
"79a0df9c7e1df089722ff5338c7766e2437a2d3e40b4e232c72be4a4e9e3a7b9",
"armv7-unknown-linux-musleabihf-0.6.2":
"6aff9c4d54a1466be66234a754181f6e48501ac206d02dd5cf5e81df4c9efbfd",
"i686-pc-windows-msvc-0.6.2":
"29e46887292d4d645cb941731bfbc688fc1689255f9898b25e6b1c96bf1b954c",
"i686-unknown-linux-gnu-0.6.2":
"66301b549ea0e8e6960dc6d1eb7b9dcf5fc8d8913f2bb480434918af25f1c6c4",
"i686-unknown-linux-musl-0.6.2":
"b85ec115f14ca15418db3540c597e13a970546df49a85c1905c16286b86eb471",
"powerpc64-unknown-linux-gnu-0.6.2":
"de17553549280fd877452dd1f7f9d0a604e3544bfad007b8ec0b9943f103796f",
"powerpc64le-unknown-linux-gnu-0.6.2":
"f341fd4874d2d007135626a0657d1478f331a78991d8a1a06aaa0d52fbe16183",
"s390x-unknown-linux-gnu-0.6.2":
"17fd89bd8de75da9c91baf918b8079c1f1f92bb6a398f0cfbc5ddefe0c7f0ee5",
"x86_64-apple-darwin-0.6.2":
"2b9e78b2562aea93f13e42df1177cb07c59a4d4f1c8ff8907d0c31f3a5e5e8db",
"x86_64-pc-windows-msvc-0.6.2":
"5f33c3cc5c183775cc51b3e661a0d2ce31142d32a50406a67c7ad0321fc841d9",
"x86_64-unknown-linux-gnu-0.6.2":
"37ea31f099678a3bee56f8a757d73551aad43f8025d377a8dde80dd946c1b7f2",
"x86_64-unknown-linux-musl-0.6.2":
"fcd01693df76379be5bc325efa43c644cf0704a2e720ccd6695f41ded09934d7",
"aarch64-apple-darwin-0.6.1":
"90e10cc7f26cbaf3eaa867cf99344ffd550e942fd4b660e88f2f91c23022dc5a",
"aarch64-pc-windows-msvc-0.6.1":
"a9bce4582ec8dcc93e19e94b4d7ab653b378a68da1a7e72f5ea82ddd2d42fb44",
"aarch64-unknown-linux-gnu-0.6.1":
"f355989fb5ecf47c9f9087a0b21e2ee7d7c802bc3d0cf6edae07560d4297751f",
"aarch64-unknown-linux-musl-0.6.1":
"6455886f9aef3392df0af630dee9df892787fdffda0f0800245f86a735bd810d",
"arm-unknown-linux-musleabihf-0.6.1":
"4bbd397391134dbfedebb938d40845573eafe6dfd1e8e1882e89c21de702104e",
"armv7-unknown-linux-gnueabihf-0.6.1":
"811e19387997ac14f1b775c3e975a7d560c93f866eb5fd2955132f9718445a0a",
"armv7-unknown-linux-musleabihf-0.6.1":
"a2022883913d55c0913001869f64208b8b3244ec6286c9e097ad9563b9f747b9",
"i686-pc-windows-msvc-0.6.1":
"920e08d6d649a414981c2c1814746fcb0a10f25e2c65e359abf534212e1f0c8c",
"i686-unknown-linux-gnu-0.6.1":
"943a9a4637151d9f950de65725b28f0dfe3f73e7ad5b2b9ab35392cbc44b3cec",
"i686-unknown-linux-musl-0.6.1":
"63d269c67e7da4f645cd6be593b55e2f0e84a9bb7cf2d45faca791c27c5f9f66",
"powerpc64-unknown-linux-gnu-0.6.1":
"8775b00b1c44a7400e8a8d5238efc5ecc636f62ed8e865bd612486c67c6272b3",
"powerpc64le-unknown-linux-gnu-0.6.1":
"becf4913112c475b2713df01a8c0536b38dc2c48f04b1d603cd6f0a74f88caa2",
"s390x-unknown-linux-gnu-0.6.1":
"ee687d56ba1e359a7a2e20e301b992b83882df5ffb1409d301e1b0d21b3fa16a",
"x86_64-apple-darwin-0.6.1":
"d8609b53f280d5e784a7586bf7a3fd90c557656af109cee8572b24a0c1443191",
"x86_64-pc-windows-msvc-0.6.1":
"32de1730597db0a7c5f34e2257ab491b660374b22c016c3d9a59ae279d837697",
"x86_64-unknown-linux-gnu-0.6.1":
"0dcad9831d3f10f3bc4dcd7678948dfc74c0b3ab3f07aa684eb9e5135b971a58",
"x86_64-unknown-linux-musl-0.6.1":
"143dba84867f72107048e1f95be8f894d59f456e018a34276d9d2d6bacdf8f99",
"aarch64-apple-darwin-0.6.0":
"ff4f1ec24a3adb3dd251f9523e4b7a7cba379e9896ae6ed1efa163fcdcd6af8a",
"aarch64-pc-windows-msvc-0.6.0":
"c29a1bfcc3070a3a4834b9aa8e290f25e82e7b2a1d25cdbae3418fb8b72c2b0b",
"aarch64-unknown-linux-gnu-0.6.0":
"47fa7ada7352f69a5efd19628b86b83c0bbda34541de3a4254ba75a188414953",
"aarch64-unknown-linux-musl-0.6.0":
"92b105bb9253a6123a0f8a8412aec9d05b162bf529cbe60fcad75a71a9a43d3f",
"arm-unknown-linux-musleabihf-0.6.0":
"a36895e6bde3bb0a74f2d61230332bd8f2cb60984e86bbbc69e9b2e742e1b971",
"armv7-unknown-linux-gnueabihf-0.6.0":
"01cbd440e41eb9fff4e372a534706156fefefe34ac44d6eb9b8abc7d5739b0fd",
"armv7-unknown-linux-musleabihf-0.6.0":
"62424a2b18a7b4a7cd62912d7cd952a74f755e6b46e46c9bae6029f4b3f2f2cf",
"i686-pc-windows-msvc-0.6.0":
"40422491d697c2da3f30c2b00b5fbfbe5075e33dd64956137959a6536b851213",
"i686-unknown-linux-gnu-0.6.0":
"22ee5cacb0139b065e219e43db84f4f21ea2a316f7341b245786d2f3e748488d",
"i686-unknown-linux-musl-0.6.0":
"1ab5f3ea0e809c5390dbda97558d4176efcbe7e3eb5166eb2c61a41991d7c4f9",
"powerpc64-unknown-linux-gnu-0.6.0":
"b99ba184663eecbd1197d60c3120b5451879009b69e900eed83b8dd5f9b568ec",
"powerpc64le-unknown-linux-gnu-0.6.0":
"d782751a6ec8a0775aa57087275225b6562a115004c1f41935bec1609765508d",
"s390x-unknown-linux-gnu-0.6.0":
"664f4165767a0cd808d1784d1d70243da4789024ec5cd779a861201b54a479b7",
"x86_64-apple-darwin-0.6.0":
"530ef3b6f563448e8e017a8cd6693d6c72c146fb0a3c43440bb0e93fcf36264f",
"x86_64-pc-windows-msvc-0.6.0":
"65836dae55d3a63e5fc1d51ae52e6ea175aaab1c82c4a6660d46462b27d19c2a",
"x86_64-unknown-linux-gnu-0.6.0":
"1a26ce241f7ff1f52634d869f86db533fffba21e528597029ee9d1423bf3df18",
"x86_64-unknown-linux-musl-0.6.0":
"ac2331cda152aa71fed700c7b1ceec4a0662185e65f544b3c3a607be53f856f0",
"aarch64-apple-darwin-0.5.31":
"396c9bd6acd98466fdb585da2ed040eecea15228e580d4bd649c09215b490bf9",
"aarch64-pc-windows-msvc-0.5.31":
"e1c862e67f03f11ff5d359d4b1afa9f624bd52489d09ffb6efcc1c5c743674bc",
"aarch64-unknown-linux-gnu-0.5.31":
"e7f358efb0718bd8f98dc0c29fd0902323b590381ca765537063a2ca23ed34c7",
"aarch64-unknown-linux-musl-0.5.31":
"7a49b56be133a756b8ef589beef33f70176a7ce796e118de2911bdae0ffb9a56",
"arm-unknown-linux-musleabihf-0.5.31":
"2ad1f334295c3ce92c5fd7c3fa9121ffd4569b6db1846c1ecbb6a2007041d09f",
"armv7-unknown-linux-gnueabihf-0.5.31":
"78270187aebe5f37fdff184f65e8aa537fd9a06cb5d5119f59c6dd7badcf95ef",
"armv7-unknown-linux-musleabihf-0.5.31":
"329dba251b81dcc840f261148d6466442b23bad54d75f1a21d5005c9c4d04aa0",
"i686-pc-windows-msvc-0.5.31":
"3860cbf6115f7af85cdf9e83ba1a9ee2bc6cf4da750825014a999738ba6950dd",
"i686-unknown-linux-gnu-0.5.31":
"4347e44f076448a8b37140a762845d65831819c21f1b6b1da4706640b82d3e4a",
"i686-unknown-linux-musl-0.5.31":
"54365460d1dbed67a6106ece17ec50900f1209ec1543172364696e7694c7b64c",
"powerpc64-unknown-linux-gnu-0.5.31":
"1263a21ef5f72d48d03b7051b69102d7addcb647af2e5182b5e6c5313d8ffd48",
"powerpc64le-unknown-linux-gnu-0.5.31":
"e292dc0a7b23fab01bbf2b6fdddf8bb0c531805b1dbc3905637af70a88ff1f5f",
"s390x-unknown-linux-gnu-0.5.31":
"66232646bd15a38cf6877c6af6bf8668fadb2af910d7cf7a1159885487a15e70",
"x86_64-apple-darwin-0.5.31":
"5316b82da14fab9a76b3521c901e7c0a7d641fb9d28eb07874e26a00b0ac2725",
"x86_64-pc-windows-msvc-0.5.31":
"1ad54dace424c259b603ecd36262cb235af2bc8d6f280e24063d57919545f593",
"x86_64-unknown-linux-gnu-0.5.31":
"017ce7ed02c967f1b0489f09162e19ee3df4586a44e681211d16206e007fce62",
"x86_64-unknown-linux-musl-0.5.31":
"b0642eedb1704371f0cf533e2103ebcaebed59e043c71a70c8fa4a971d2032ab",
"aarch64-apple-darwin-0.5.30":
"654c3e010c9c53b024fa752d08b949e0f80f10ec4e3a1acea9437a1d127a1053",
"aarch64-pc-windows-msvc-0.5.30":
"aa5331546935864fe0c627fc22f4ffc60cd2d24ec17900780e95e11436d544a8",
"aarch64-unknown-linux-gnu-0.5.30":
"d1ea4a2299768b2c8263db0abd8ea0de3b8052a34a51f5cf73094051456d4de2",
"aarch64-unknown-linux-musl-0.5.30":
"e9b51e591a852a5bc432df3411acaf2c03efd5c8a1ea4280e356881a0c689d31",
"arm-unknown-linux-musleabihf-0.5.30":
"d143460c27df2b8bcafe8a548eb90fb8000a97921754f13a45cb675d04d366f8",
"armv7-unknown-linux-gnueabihf-0.5.30":
"3d1953151a534e0cbe3c2094e5165a419e75f1ae32444748c5cd69bcfb9906c0",
"armv7-unknown-linux-musleabihf-0.5.30":
"4ef3aee22dc8feb9665df4339d4689c1262a26d36d34c7c543e0caa31eb8f45b",
"i686-pc-windows-msvc-0.5.30":
"3389683ab13451b628cfd95ca5bf56fd7137300af5903180d60eed35c4cbfb82",
"i686-unknown-linux-gnu-0.5.30":
"3ebb74ae2326030c93972f4c1b5e77a17b29bd191349b6244e41e70bb98d8507",
"i686-unknown-linux-musl-0.5.30":
"bc590e89243cf7688709ba39822d0acaee394dc0b4781eef044af411e6ac26af",
"powerpc64-unknown-linux-gnu-0.5.30":
"e289eae011dec0fa5d00133c17efde5e427237e876bfb0e1e27146e45959fc26",
"powerpc64le-unknown-linux-gnu-0.5.30":
"b10ba261377f89e598322f3329beeada6b868119581e2a7294e7585351d3733f",
"s390x-unknown-linux-gnu-0.5.30":
"7341e6d62b0e02fbd33fe6ce0158e9f68617f43e5ec42fc6904d246bda5f6d34",
"x86_64-apple-darwin-0.5.30":
"42c4a5d3611928613342958652ab16943d05980b1ab5057bb47e4283ef7e890d",
"x86_64-pc-windows-msvc-0.5.30":
"43d6b97d2e283f6509a9199fd32411d67a64d5b5dca3e6e63e45ec2faec68f73",
"x86_64-unknown-linux-gnu-0.5.30":
"9d82816c14c44054f0c679f2bcaecfd910c75f207e08874085cb27b482f17776",
"x86_64-unknown-linux-musl-0.5.30":
"7cc79871e5fcd2678474d756bfc32c6c3d28e136963dda10902c516fab67fa2d",
"aarch64-apple-darwin-0.5.29":
"c89e96bde40402cc4db2f59bcb886882ab69e557235279283a2db9dea61135c3",
"aarch64-pc-windows-msvc-0.5.29":
"172509e9824b925082612f19ab0e030e08108033d7e5c10e67ede69b3bf290d8",
"aarch64-unknown-linux-gnu-0.5.29":
"d1f716e8362d7da654a154b8331054a987c1fc16562bd719190a42458e945785",
"aarch64-unknown-linux-musl-0.5.29":
"3f2d03e62b951a3e46e9c1cfae3091235c05ff274c7163162b8726fb56133219",
"arm-unknown-linux-musleabihf-0.5.29":
"5ee7d5e95f93434845c1e14740c5e957f8747b751af054996f45a9095426a496",
"armv7-unknown-linux-gnueabihf-0.5.29":
"98b88f2bc2905241ff460529a9d24cdaa70e8b31c573ba07240eb4a163e7fa3d",
"armv7-unknown-linux-musleabihf-0.5.29":
"95f148fb44c71f817d0f9c7e14591f1364c7da62a3cb9d353a0e45b4332031d3",
"i686-pc-windows-msvc-0.5.29":
"e35c4bba6af151e3a952629c7054b0f6d901c83aa7a3a21aedc3880424790294",
"i686-unknown-linux-gnu-0.5.29":
"9e81a4f621500d161ae810a7f68a25a8bfc141d172267a36c19cf491c5bf8fa7",
"i686-unknown-linux-musl-0.5.29":
"07b4f43a4c561120cd5951c5aa49ad0aa2a1c1ebce870f533f06fa0e0a8ece4f",
"powerpc64-unknown-linux-gnu-0.5.29":
"0eae3ece0811815cbed9619995486a2d4ba4df47abe3f7fcc27153eff9c5a655",
"powerpc64le-unknown-linux-gnu-0.5.29":
"0e38436e4068eec23498f88a5c1b721411986e6a983f243680a60b716b7c301c",
"s390x-unknown-linux-gnu-0.5.29":
"6a42886dd10c6437a1a56982cd0c116d063f05483aa7db1cc0343f705ef96f91",
"x86_64-apple-darwin-0.5.29":
"2f13ef5a82b91ba137fd6441f478c406a0a8b0df41e9573d1e61551a1de5a3a2",
"x86_64-pc-windows-msvc-0.5.29":
"2453b17df889822a5b8dcd3467dd6b75a410d61f5e6504362e3852fb3175c19c",
"x86_64-unknown-linux-gnu-0.5.29":
"46d3fcf04d64be42bded914d648657cd62d968172604e3aaf8386142c09d2317",
"x86_64-unknown-linux-musl-0.5.29":
"bb06a385a918b7b8d927ef08e283843b66005dfccf0a940bfd0882f22cbc1a7f",
"aarch64-apple-darwin-0.5.28":
"57cbf655a5bc5c1ffa7315c0b25ff342f44a919fa099311c0d994914011b421e",
"aarch64-pc-windows-msvc-0.5.28":
"76bb4fe97c78f5de294614cb36294a3204e57117d8ce2f826bf1b8fd28d770ef",
"aarch64-unknown-linux-gnu-0.5.28":
"fe3c481940c5542d034a863239f23d64ee45abcd636c480c1ea0f34469a66c86",
"aarch64-unknown-linux-musl-0.5.28":
"d2f622ffbb129c9368a147672e79f9b7c8e33c4ac0bbba6510c7e92d699d7fb3",
"arm-unknown-linux-musleabihf-0.5.28":
"0bf8b33107e58d15065bce5fd29d24de7b4401ddcaf6791840568876f1247f46",
"armv7-unknown-linux-gnueabihf-0.5.28":
"6a3ceb156b6ced721792ffa1d9d4fd35a28167960cd5b1847bfd39fd1d2d59bf",
"armv7-unknown-linux-musleabihf-0.5.28":
"29dec32b29a5f4736f0062ff47aade2c922e08922241783e7af4aba0639658cc",
"i686-pc-windows-msvc-0.5.28":
"7ff2b7bde705cdca7f6fe6aec9e7047b47e09bf97be9c5ff597ff6e19a369544",
"i686-unknown-linux-gnu-0.5.28":
"27ff0f4d1ce96b5abe5113e3033e48a16d588c2e855439f0d8fbc59b75c041de",
"i686-unknown-linux-musl-0.5.28":
"0f72a1c8321d05dbfc3382d28e7bb9f83079198fd5b16c25560b0f66b6a6a8c7",
"powerpc64-unknown-linux-gnu-0.5.28":
"caf37897a6a3734a706f2d5ffb2c7953f37e903b6a34d02300fbf96f77a44b82",
"powerpc64le-unknown-linux-gnu-0.5.28":
"74bc6aacea26c67305910bcbe4b6178b96fefe643b2002567cc094ad2c209ef1",
"s390x-unknown-linux-gnu-0.5.28":
"b3f49b0268ab971ff7f39ca924fb8291ce3d8ffe8f6c0d7ff16bc12055cd1e85",
"x86_64-apple-darwin-0.5.28":
"36484907ec1988f1553bdc7de659d8bc0b46b8eaca09b0f67359b116caac170d",
"x86_64-pc-windows-msvc-0.5.28":
"31053741c49624726d5ce8cb1ab8f5fc267ed0333ab8257450bd71a7c2a68d05",
"x86_64-unknown-linux-gnu-0.5.28":
"1f2a654627e02fed5f8b883592439b842e74d98091bbafe9e71c7101f4f97d74",
"x86_64-unknown-linux-musl-0.5.28":
"9ca7e51c8ea414aa1a275d12956676da1064e0a1cbf8d5b39b15c45d923a09c3",
"aarch64-apple-darwin-0.5.27":
"efe367393fc02b8e8609c38bce78d743261d7fc885e5eabfbd08ce881816aea3",
"aarch64-pc-windows-msvc-0.5.27":
"5b652867d6dc42946953d786aa1e466e9fbcd877a48d4c18f56c26801abb486b",
"aarch64-unknown-linux-gnu-0.5.27":
"7b8175e7370056efa6e8f4c8fec854f3a026c0ecda628694f5200fdf666167fa",
"aarch64-unknown-linux-musl-0.5.27":
"5df998660ed17555679c7a6b43b25f1c4d76d76b6062d31491663960804060d5",
"arm-unknown-linux-musleabihf-0.5.27":
"d80200d7c0c3ef32b2e938872726de29128a3b9bc080038fb3fc6f2eedbf1f34",
"armv7-unknown-linux-gnueabihf-0.5.27":
"3fa94262b12268c7b9b91ed0ea739752e0c63ef2105396122faa93cd5bbdae8c",
"armv7-unknown-linux-musleabihf-0.5.27":
"86e688ced31f6322d6b4dc544453ba02021685e553995c2c72eb41f82fd2662b",
"i686-pc-windows-msvc-0.5.27":
"0158534490ba4b4cf64716116d73220f019688a22a1eba78535d9d95e918ec71",
"i686-unknown-linux-gnu-0.5.27":
"66b6128cd9b745a312bc81d6d3fedf02850acdf96dfca53ab5a3d11ddb1fe083",
"i686-unknown-linux-musl-0.5.27":
"8e95b813f804e8670aed79608778582b3f64dcf468ec185e49f5188505c3edf6",
"powerpc64-unknown-linux-gnu-0.5.27":
"1a129dbc27566be04ce68f5bc10a626954abe7651b35ce73d8a24b2e7a89ffe1",
"powerpc64le-unknown-linux-gnu-0.5.27":
"b63051bdd5392fa6a3d8d98c661b395c62a2a05a0e96ae877047c4c7be1b92ff",
"s390x-unknown-linux-gnu-0.5.27":
"07377ed611dbf1548f06b65ad6d2bb84f3ff1ccce936ba972d7b7f5492e47d30",
"x86_64-apple-darwin-0.5.27":
"a75c9d77c90c4ac367690134cd471108c09b95226c62cd6422ca0db8bbea2197",
"x86_64-pc-windows-msvc-0.5.27":
"195d43f6578c33838523bf4f3c80d690914496592b2946bda8598b8500e744f6",
"x86_64-unknown-linux-gnu-0.5.27":
"27261ddf7654d4f34ed4600348415e0c30de2a307cc6eff6a671a849263b2dcf",
"x86_64-unknown-linux-musl-0.5.27":
"94cb0a392e5cfb82068476462e6c06e19745ea9e74fc828187f6809d97b529b4",
"aarch64-apple-darwin-0.5.26":
"3b503c630dc65b991502e1d9fe0ffc410ae50c503e8df6d4900f23b9ad436366",
"aarch64-pc-windows-msvc-0.5.26":
"3319e6f4506fdb2e3d8791bae05995f0aeda947ee87e373c17a699fb39165e3d",
"aarch64-unknown-linux-gnu-0.5.26":
"6ce061c2f14bf2f0b12c2b7a0f80c65408bf2dcee9743c4fc4ec1f30b85ecb98",
"aarch64-unknown-linux-musl-0.5.26":
"42ce9a728ecd054268ba5a621002385e79ea10ba4546a8a6a695f430902029f5",
"arm-unknown-linux-musleabihf-0.5.26":
"87b8a2af3b9784a6b7ab5ddb2fff0c505bbccaae0a457f6b228257ed23adfed0",
"armv7-unknown-linux-gnueabihf-0.5.26":
"c311f89e6d23a9bd7d2f62e225d6b54a8fc85889f3519219f3308ea7eb687871",
"armv7-unknown-linux-musleabihf-0.5.26":
"0e4d68538847637c376f51d962796e9336c9ccbcccdfad547e3458cd7cf1a70e",
"i686-pc-windows-msvc-0.5.26":
"ecf2858d13ba0cbe1b82cc10e9b0538309ee53a7c18f71e8afcc56b1e5e909e0",
"i686-unknown-linux-gnu-0.5.26":
"833199e00a8187468c49dd315e041dbaf30e6e6340e65dd3df0c5aec8605c3d8",
"i686-unknown-linux-musl-0.5.26":
"72d4ed889ceac3cf5f7233a7e38eb2dd70a95e36dab0ce9ebed1f6a9a68f19be",
"powerpc64-unknown-linux-gnu-0.5.26":
"7838adddce0d17aa933cbe843ca673e44eb89de508175cc707473540de6388cd",
"powerpc64le-unknown-linux-gnu-0.5.26":
"fe1d770840110b59554228b12382881abefc1ab2d2ca009adc1502179422bc0d",
"s390x-unknown-linux-gnu-0.5.26":
"086c8d03ee4aff702a32d58086accf971ce58a2f000323414935e0f50e816c04",
"x86_64-apple-darwin-0.5.26":
"7cf20dd534545a74290a244d3e8244d1010ba38d2d5950f504b6c93fab169f57",
"x86_64-pc-windows-msvc-0.5.26":
"a938eebb7433eb7097ae1cf3d53f9bb083edd4c746045f284a1c8904af1a1a11",
"x86_64-unknown-linux-gnu-0.5.26":
"555f17717e7663109104b62976e9da6cfda1ad84213407b437fd9c8f573cc0ef",
"x86_64-unknown-linux-musl-0.5.26":
"6858d7951b9ae20c3955b2b0addbf2f184ab68175d1c659d11e0a14f1472fb81",
"aarch64-apple-darwin-0.5.25":
"3c29e941d691614bc4eba95629c8f8dee106e5d44d70a03efed66a544588caa1",
"aarch64-pc-windows-msvc-0.5.25":
"e3c4d014dc8aa14a36fab9316d9f435a93900893d7164472452c39037112b829",
"aarch64-unknown-linux-gnu-0.5.25":
"402342f9a5ff1544b41af368794ab436965a1a03109b43bd0dd552ce6af8256d",
"aarch64-unknown-linux-musl-0.5.25":
"6648d924f01ce01e4968e377c1f32a53592b55485a859f97421619d3a7dd7d86",
"arm-unknown-linux-musleabihf-0.5.25":
"45ed53c20c5852d9dba97deeceaa1cb8fdccdaec69952c0940329e27b3830e83",
"armv7-unknown-linux-gnueabihf-0.5.25":
"54bd4af03e93acdc7ac6546f62923a782fc871a20850356fa8870dd256a6c2e8",
"armv7-unknown-linux-musleabihf-0.5.25":
"f2adbe37fbe57540c39396d6d47878c86027eae91b442d609c2e97da2398dff5",
"i686-pc-windows-msvc-0.5.25":
"7f55c0e6ab90218d2646c3915b111378fc0ffd61308893d495ddc8e49f16ed36",
"i686-unknown-linux-gnu-0.5.25":
"8d71e66e4efcc1097e2beedd3572867eb7ea9b5cdac286c115a5118fcf5d2219",
"i686-unknown-linux-musl-0.5.25":
"406630b6b20bcef76069e08c5eaaa5420e190ae0036f4a85e2a14f3d7c610be6",
"powerpc64-unknown-linux-gnu-0.5.25":
"202aa6bc9e541bc322ad743f6afe334ef31dcb5c568f24cd5c963fa535538f20",
"powerpc64le-unknown-linux-gnu-0.5.25":
"7956759f6543ca7ed4e51ab7d68a2dca6d9e73d12a19afbe40d275f2384b8535",
"s390x-unknown-linux-gnu-0.5.25":
"b17eed40b701252cf6e02c64533bc741dfa6e05340da64cd9feef36afcfed897",
"x86_64-apple-darwin-0.5.25":
"f76e3fb259ec74b2e003ed7e47d1f06a431686381665fc03e2f35e2ee72e6a57",
"x86_64-pc-windows-msvc-0.5.25":
"51ea202a472e552c04e6a13ac7eece0d56748750b9726e4b94f4f3dc96b5f77f",
"x86_64-unknown-linux-gnu-0.5.25":
"fe04914881e2e01fe62001b223344a7c43af734faba447d4764fe92d3baf794e",
"x86_64-unknown-linux-musl-0.5.25":
"aeade1b8fa1fa3c021d30e8f1932fd2c24dca62217c7d6d9da740dde75b7e52f",
"aarch64-apple-darwin-0.5.24":
"8016d47f4cce265b3d122ad8cbbf701713caf803fa7d3ef69d8a1fd6793d939a",
"aarch64-unknown-linux-gnu-0.5.24":
"3cf910468c37c709580d83d19b7b55352cfe05d6e1cc038718698410b6b8c6f0",
"aarch64-unknown-linux-musl-0.5.24":
"aaae0b6fb17b3cafa9869292f4e03104b26fd0de4a36182a6edec44c1665f6a5",
"arm-unknown-linux-musleabihf-0.5.24":
"a11698237ff36b72d119467805c8630d5bfdf6132fe98d01f7c44451c783d450",
"armv7-unknown-linux-gnueabihf-0.5.24":
"e44001c955b7a2c3e53006a262bf74189f75bc2e6d63ac2e71638fb8eee20501",
"armv7-unknown-linux-musleabihf-0.5.24":
"8ca5c602c5a31a6c497abf10dd96694fb2bb9df362fdc604d156fa5044786379",
"i686-pc-windows-msvc-0.5.24":
"d2550254b96753214f9098a03091fa398d948c971738d50ff36113a3b27e391e",
"i686-unknown-linux-gnu-0.5.24":
"7b335c5736fa50aa3092f4212201ea7a65a15c6f40282a315861ec36bf64a41e",
"i686-unknown-linux-musl-0.5.24":
"6b7a8df65d15ad782ca17d82f79b4d7a235e85bf50411e3f7549878909b2a0bb",
"powerpc64-unknown-linux-gnu-0.5.24":
"22c2fb1971cd4ea77d78fc2c7c5574f5e4646525473d08d1b16a4389cda560a8",
"powerpc64le-unknown-linux-gnu-0.5.24":
"1e3cfaa0890d42f448bed7d6c7b66240abfe43130c6923b1d5fb7b0ebc302b94",
"s390x-unknown-linux-gnu-0.5.24":
"a3c8e92deb720dcbf7414d8d0bb91934016d0ace23c3dd452f49a1b92490e0bf",
"x86_64-apple-darwin-0.5.24":
"dcee10ef84309cf0de4153cb7913b0b506eae0a2e6407faa0f1717f015c35f0c",
"x86_64-pc-windows-msvc-0.5.24":
"bd3fedeee0da543d7ac0a530328b3880bc83c1b332b3996f0da691f83423e813",
"x86_64-unknown-linux-gnu-0.5.24":
"a0eb614f7fc38a6e14ef1c4819f1f187591db8e0d3c4218dae38b1bd663a00e2",
"x86_64-unknown-linux-musl-0.5.24":
"5a5a1231a3ecb4f01aab9c839a49764d9ea1ae8e5e467a0aa2a2754c94f9f81c",
"aarch64-apple-darwin-0.5.23":
"bedfc709b281ab4c6ff1c84c0ad7e4525bf2669f56f009f6fb308657bebe165b",
"aarch64-unknown-linux-gnu-0.5.23":
"0f864a958e88693b8102dd7bc0e543a6b6f56e514ba8798235e54fb95c4856a4",
"aarch64-unknown-linux-musl-0.5.23":
"bbfafc3623267d25f63713c934eb57bf521b8b14b94d18412c697d69dbd68251",
"arm-unknown-linux-musleabihf-0.5.23":
"3031d44ae02a6189182956de345c0e22c40b6a8f19bbe67ed7016df228da5cd6",
"armv7-unknown-linux-gnueabihf-0.5.23":
"48429f7f01e9bd6bfb80c2e97db878c05d7d1be1d10de432a33650c65c9d6172",
"armv7-unknown-linux-musleabihf-0.5.23":
"baa22c4e66f80eb1a900437b58966f529af70c89739b690096fa665d6324f540",
"i686-pc-windows-msvc-0.5.23":
"c9d6f5806666921a31f0a3ac88f9848884c67cd7348b0c0dd420c92ae40371ff",
"i686-unknown-linux-gnu-0.5.23":
"91bf1765b77010318d9666601d6ec41108f561a8be5d8a3a0b41c4fbd38c4bb1",
"i686-unknown-linux-musl-0.5.23":
"79093074197e76be9c7699ad361cf6fccc95dd8cea2b10ac2875acc658be55b3",
"powerpc64-unknown-linux-gnu-0.5.23":
"acce824961d78934ec9735bd9dac2a8b7f16e9638c6d909671690c43283bd644",
"powerpc64le-unknown-linux-gnu-0.5.23":
"678773a17cccfa5d8c8e7043e4ebbbaf48b3e1aa482dd334c36e06ba8ebe993e",
"s390x-unknown-linux-gnu-0.5.23":
"34700493c47fcf668ac175ab66c8fb6bdc058dfc56a3f868d34b6e5a586957dd",
"x86_64-apple-darwin-0.5.23":
"40525eceff3a95051e0139839140ec3597a45221cca5000b8290d20d771294f5",
"x86_64-pc-windows-msvc-0.5.23":
"140be2cf57e37c7c86be4840d17b71fbc7daa21e2f46ed60830b4a39ef527663",
"x86_64-unknown-linux-gnu-0.5.23":
"6c45b9a95328b5c250bab14a17af574f7fa284fac0830d6a827e5f6f0b0e6732",
"x86_64-unknown-linux-musl-0.5.23":
"d656e3c274b43e8d9253d79ce3bd20d6bf1bd3fdb13dfd13e5e07d7aa528906d",
"aarch64-apple-darwin-0.5.22":
"95496f513653e7246589b2334a04e2a001f6436919af30d68180ce480fd3971a",
"aarch64-unknown-linux-gnu-0.5.22":
"0ff503ff9d473d25d0460a375ff6ec3ed186ee6be2ffedc67642b3c7d77b6299",
"aarch64-unknown-linux-musl-0.5.22":
"43593ffde18d83f9453a69db70f5dbc61726beefc3bbdb80d1db61612eb26a41",
"arm-unknown-linux-musleabihf-0.5.22":
"78829476fad51a9361aefbb8ee5ed7aa19b981a7d6384e6033115277b761fe94",
"armv7-unknown-linux-gnueabihf-0.5.22":
"2c6b4876c6aa6e642466fb389cc106f5f9cb4ebb9e389bf2c9e883012d3d127b",
"armv7-unknown-linux-musleabihf-0.5.22":
"fc62722c44cd4ccae7e713452bc5d81907852da6d50f3123c4878e510fba52f7",
"i686-pc-windows-msvc-0.5.22":
"4c4e029f05cd94b09cb3c3ac9d2dd4adeb2a1e54d13a09ba79c244d95d960ba7",
"i686-unknown-linux-gnu-0.5.22":
"d17ee5a2ea99875781c21ba2acc3785d86ebf27cc76011fa59ae52f21d349a49",
"i686-unknown-linux-musl-0.5.22":
"092387e1a32a40cee94165d96072e219b299b8d76a25a764659ccb178855c3d8",
"powerpc64-unknown-linux-gnu-0.5.22":
"bd8c2b70f461d6cc189abaaaa0d4e75f6b3044eddaef0f790920436f2d7cb772",
"powerpc64le-unknown-linux-gnu-0.5.22":
"ecd4c18c0a889b7ceaca906340f89ef815b5a7e37fbfb318ec6131f23627b794",
"s390x-unknown-linux-gnu-0.5.22":
"5c092fb46def4c7a45094905990acfab34cf4ad3af60e6accddbfa81b1409c03",
"x86_64-apple-darwin-0.5.22":
"5f636c75a976389ec0a4b03b4a7a78b5634daf1915703079cbc514a26c691e18",
"x86_64-pc-windows-msvc-0.5.22":
"bbe5dc1b2777f170d53d3d7856376eda9229a2c4f74332336e0ef0603325cbe5",
"x86_64-unknown-linux-gnu-0.5.22":
"d15f8595f080817f55f207bf9a67cbce6423e5b1fbfeba58c7e67e86bcc7be41",
"x86_64-unknown-linux-musl-0.5.22":
"fba667f90b0b89b4171127ebe7b29961250ddbcd9f86116eb195c46afe0857c8",
"aarch64-apple-darwin-0.5.21":
"74f501d91b4db0b767d5d621086d3e2e8acc3f5356cf5527de80e97bb312a626",
"aarch64-unknown-linux-gnu-0.5.21":
"c4cc2ec78a294378b867ebd08c5842d3ce71074c2818dc7f641422fb3bf4b2d2",
"aarch64-unknown-linux-musl-0.5.21":
"26152b092f6ace9bec1fe91b39fe11f55428ce5fba87f5de0ec6b16e2c65928f",
"arm-unknown-linux-musleabihf-0.5.21":
"2a90a8976a7efbe5eef613b84285f2f6b0cda7e9547a2e548bf6f253cc06dbb1",
"armv7-unknown-linux-gnueabihf-0.5.21":
"71b0e840af1e50368d60bdb6a4bb22483b0462e7238e7e08fb624466c4b22c65",
"armv7-unknown-linux-musleabihf-0.5.21":
"46a3be0330ebfbeb4c521a523545334ef3bd38ac0b4acab19734c0d50399ac6f",
"i686-pc-windows-msvc-0.5.21":
"a0583cd71a410ce8329cd0951a72966a1219c1a7c12c437c3072779ce7dfe893",
"i686-unknown-linux-gnu-0.5.21":
"5d46307d7883f5ec5416c589b65bfedd17544accbe54eabd13d27417bcdf435e",
"i686-unknown-linux-musl-0.5.21":
"27d220b8e8effd1dc566e6ae7f90e7a074af07f4e61a0406f2c8c9883ef82e33",
"powerpc64-unknown-linux-gnu-0.5.21":
"ca744fee2634dfe203683fa809e4b5998564ebf2b8e7f0c329c1229edbe1ea8a",
"powerpc64le-unknown-linux-gnu-0.5.21":
"1c08d342b4644158eee7723a75f59b3f388ceb4a91106d284d343acfb906bb77",
"s390x-unknown-linux-gnu-0.5.21":
"892c78a989164f1e6e97a8e07d995bf1ab6c5374ee85d4b47c47c6706bb2e8fe",
"x86_64-apple-darwin-0.5.21":
"66a0f5ea3aee2d497450138ae1e99f734eed7457af5e839a41ef219d51e90e17",
"x86_64-pc-windows-msvc-0.5.21":
"9968e8ef4b567d5690ccb9ac6e8338eb56cb964c57430a2843dd21f88ec5b81a",
"x86_64-unknown-linux-gnu-0.5.21":
"e108c300eafae22ad8e6d94519605530f18f8762eb58d2b98a617edfb5d088fc",
"x86_64-unknown-linux-musl-0.5.21":
"71347d2fdda9e3e7105ecd3a8566e3b607da9fddf23ac83adafcf6451ea9139d",
"aarch64-apple-darwin-0.5.20":
"d7f0c219808073f8ae8c6a991e85e5c7539b4e539b014a4ca5b3286911f06fd5",
"aarch64-unknown-linux-gnu-0.5.20":
"3d2281312d047288ecb021f4c761cd351f993514e3ea7f369354701b3a44c756",
"aarch64-unknown-linux-musl-0.5.20":
"162b19dbe6d82fd7846dd6ff25a7a6250ce4ee5d0d55e2e245625382984072b0",
"arm-unknown-linux-musleabihf-0.5.20":
"19a06cf913bfb3d8ecb0e1c0368f98b03e9ec5a35ea3edc03a4e0af04f4f95ad",
"armv7-unknown-linux-gnueabihf-0.5.20":
"769c07de286d607d0e13e9e83051a5ac0cfe1c34695ece976934345e09e97f4b",
"armv7-unknown-linux-musleabihf-0.5.20":
"1330f3e38f6bdae2d2e2d458957e5531cf729989db942832aede12c5e5d5a1ab",
"i686-pc-windows-msvc-0.5.20":
"389182a593b6f761dffb7c82c3eee3f8e4f4848fbf26fa1e6ab95ac3fcad687b",
"i686-unknown-linux-gnu-0.5.20":
"88a1e7b7c08682fb379f540cfab31c38c31d5a7a3f227e5446dd9000519c7195",
"i686-unknown-linux-musl-0.5.20":
"fb105fc9c3bbb4ad44ac5c0066cb9f48912f55a97f65dabaa48367198c0f87ea",
"powerpc64-unknown-linux-gnu-0.5.20":
"a42c4bf4e397ed0d85bc5ed8d589f1e3dbd6f24fdbb16469ffa20b63977894aa",
"powerpc64le-unknown-linux-gnu-0.5.20":
"bf52e43047ad4e7f178b62d2a175f0ee272f014a520726fe293960d03bfa122d",
"s390x-unknown-linux-gnu-0.5.20":
"69c198eca4c81299a7a323df729e03ce6198d84fa26e9d98ea1e02436933469f",
"x86_64-apple-darwin-0.5.20":
"22bb373a2bb0f15e441819a054e68798534d536b1b1943fdb813d6b53ffe48a4",
"x86_64-pc-windows-msvc-0.5.20":
"dede2f71e7a15137ca17e3a1106e3797a650a2e2d607658f31ad4e986de3d67d",
"x86_64-unknown-linux-gnu-0.5.20":
"8fdbfca767917f957e4541747cbf7b23b45c211109dbba97b49962fa3547aab4",
"x86_64-unknown-linux-musl-0.5.20":
"5326a6d14d4668dafee4ecf36f7664103a25bf0918dfe162c8c49dab017b74ed",
"aarch64-apple-darwin-0.5.19":
"f223bb08d04257dbba421736f906d91b040f654ab49963afc2f30f7949ae7b79",
"aarch64-unknown-linux-gnu-0.5.19":
"2da1baa85958e5ee36f2ac85b0c56cb99c0c3140f6ff18c60825485b8193eedb",
"aarch64-unknown-linux-musl-0.5.19":
"ff5b42337bd94f41db157f73b39d41586be8c76d8824550b0f6d5e808e5f0356",
"arm-unknown-linux-musleabihf-0.5.19":
"84ae72130383340e14df47656f1974eb76a28ab7ed8b5c479bdbc8b907ad91e7",
"armv7-unknown-linux-gnueabihf-0.5.19":
"bec22bc7e1d584749f26bc4d84116faf925f9db484fe0afb58f6a2aa0c04707c",
"armv7-unknown-linux-musleabihf-0.5.19":
"79c575e9dcd58cf88e8b2fd37242ac923d04c31a62bed54db78219e35257a262",
"i686-pc-windows-msvc-0.5.19":
"7f0439c0977baf5573d0c31820887fb0c478d2ef29fdad4256bf0a0b536a387f",
"i686-unknown-linux-gnu-0.5.19":
"0b9a88787f80bda623987a314875c7cccfed599b5d2803565734c292e2cd33ef",
"i686-unknown-linux-musl-0.5.19":
"e9a89334fadda0905da42017db76c63da9b1ef02ef9595acea322d1e73f1fea0",
"powerpc64-unknown-linux-gnu-0.5.19":
"d891e5a5849e0220a49a31396371303d7f9de6c86b34f306c129a87dc6debfac",
"powerpc64le-unknown-linux-gnu-0.5.19":
"efeb6ce7adff1ef45ca2e3351011a9a423add39f08676f5f4b85fdf2244fb8cd",
"s390x-unknown-linux-gnu-0.5.19":
"a37620a3ce3d351adc57ce70249ee0bdce2fbd336886db6b4de4d31447644acb",
"x86_64-apple-darwin-0.5.19":
"9af5050495e9fc114cabcb4c2dbaded65569ccc0583ab3f62a6d9977984b65fa",
"x86_64-pc-windows-msvc-0.5.19":
"ada2b3d704a78e118f6c8e215468e8f50eef440211938970cdef79dfafe9ddc5",
"x86_64-unknown-linux-gnu-0.5.19":
"ace8c180865bb87fb3d7004a8cafde78270676d87ab5531615f136cc860db78d",
"x86_64-unknown-linux-musl-0.5.19":
"eb9d0e1db24c6abbfec3e589f55efd2ef9ce9313f89bf1dd934635d194762b57",
"aarch64-apple-darwin-0.5.18":
"13bcde0a15c50af976980b484f140e10969df67488542856a2152534f255c675",
"aarch64-unknown-linux-gnu-0.5.18":
"a511f609236b9bfc9dedfcb9867ef1d0f1dc23cc2012f9e4e38e0c184657fd31",
"aarch64-unknown-linux-musl-0.5.18":
"5b1bd1471f4d8298f11da5f025bdbcc4c8057a24c8b95573003c0320b6fa99a8",
"arm-unknown-linux-musleabihf-0.5.18":
"4262e0a6c14998c8637f1ba018980464a5e6aeb5f35aaa0149643c99a32631b3",
"armv7-unknown-linux-gnueabihf-0.5.18":
"29d4f9b0c020f55de11c9bd24cf8360771c1893275dd9e3b978f0fe4421bfb4f",
"armv7-unknown-linux-musleabihf-0.5.18":
"95049e75c3da2113142da0b9e60451c43fac44702590f4e5abb6fc7cde744429",
"i686-pc-windows-msvc-0.5.18":
"06729cf6685f0271e91bcb5cf748d18a5c5d793fa9e0a611d0c7541a0aed574a",
"i686-unknown-linux-gnu-0.5.18":
"d92146688e5b1a7ddb79e8f91d91c8174d44a5945b06797cd17bbf187f13da64",
"i686-unknown-linux-musl-0.5.18":
"1ec37579d0dec4739c707cb5096c52dea9319196dfd63ea6e121e16074892cac",
"powerpc64-unknown-linux-gnu-0.5.18":
"e6cf16040aabb5b1940e88841dcc90967aa592c8c7492699449ca050713cb567",
"powerpc64le-unknown-linux-gnu-0.5.18":
"3efccbb5820be67b270333f9ca87d2d598e38648a6ea7a3fb9970a5a424be11f",
"s390x-unknown-linux-gnu-0.5.18":
"f7903ade2a7747041d5d10f043e01e0a6c9c881b6fe7cb1bd54b9efac8ed7620",
"x86_64-apple-darwin-0.5.18":
"e77b6b35169d2e0a3b43d43690f813136c94e24e4eef72d560e7901e42621d18",
"x86_64-pc-windows-msvc-0.5.18":
"77f414173d0970c8977a614585fc013290659b0d74ae22be24559fde915832de",
"x86_64-unknown-linux-gnu-0.5.18":
"1dbaeffc5cfac769f99700c0fc8c4ef4494a339720c6bf8b79367b1acd701b46",
"x86_64-unknown-linux-musl-0.5.18":
"d4d3bf7dda0fd66a34ee99407506b753213bbe6e4076c0c38c4b645d00406979",
"aarch64-apple-darwin-0.5.17":
"9e041a7c0bbd8a653b2272e03ba5de5b726dcbbccc3ffcc526dc7de9f14ad334",
"aarch64-unknown-linux-gnu-0.5.17":
"22164a4a86272ab2a4af2b01773a7e636f643426831f4dd9c71b2760c592a57b",
"aarch64-unknown-linux-musl-0.5.17":
"86021b10ad06f97a82d605ae7b7e580cd17d29b2877b65e31ef63db50514d2b0",
"arm-unknown-linux-musleabihf-0.5.17":
"b68e96d7abb87180a44f9b315db2d3f88ad59325b10451b561e0620edd71d476",
"armv7-unknown-linux-gnueabihf-0.5.17":
"125662419ae6b2332d2bab6764ba8ef9396fd0cc9487a5fbbcf41bdcf379e697",
"armv7-unknown-linux-musleabihf-0.5.17":
"f8d2dcee69ad15858a827265db527184bdbd07b60a24e04d2d9787abf781cc0b",
"i686-pc-windows-msvc-0.5.17":
"1aecdd843d15a0149cf83d07c3b36d184578a6a07fcf2730ef9986393259e960",
"i686-unknown-linux-gnu-0.5.17":
"4165443b8757cdcd615ccfe721aac5137c7d4165ae9dc2640975c1035018f09c",
"i686-unknown-linux-musl-0.5.17":
"0242308d2ffe1de6538d79a13aae4cee8a48bfc76e71d559836a2f43808393c0",
"powerpc64-unknown-linux-gnu-0.5.17":
"a79bfc1c004339c1da253421b35471af383e724eaffe8ab332685b253402a7c1",
"powerpc64le-unknown-linux-gnu-0.5.17":
"db2f384a7b9605b9ae03ca493f0c35174577a3b53d238861b11b9dc1c404cb16",
"s390x-unknown-linux-gnu-0.5.17":
"4312abce9f52dca597c4b4896e8f2f7575d50b2183af4c74412bc26eb6278d3f",
"x86_64-apple-darwin-0.5.17":
"f66f961bf0c6e2bbc3e45de4692cdebb126edd5af4e920dea91a3fedabc502ee",
"x86_64-pc-windows-msvc-0.5.17":
"00aed721abc4bb125d92b45733aa65a2254344bffed984d85cf0de6b164f5011",
"x86_64-unknown-linux-gnu-0.5.17":
"6121d9693b2013e970e495872c5a750ff0e471c2618821c2d4314666c0bd9ee7",
"x86_64-unknown-linux-musl-0.5.17":
"0aa0d03f80422a066396a54c7d9f7f78576a22827860273fd635f97e04f3e1a7",
"aarch64-apple-darwin-0.5.16":
"0b16039f469df078c1445f5b7f84d3c0342580c4592b5a4b604db2c86dc37c3e",
"aarch64-unknown-linux-gnu-0.5.16":
"59d28abe79037f835020ba834f01ac5c1f96c8556c6ff9a06a8fd5701048731c",
"aarch64-unknown-linux-musl-0.5.16":
"8913580d960e1d5a24316506b9925cb6aa4ab6547d88d7cab1aa5049825e1d4a",
"arm-unknown-linux-musleabihf-0.5.16":
"e97d623d641a3c807bcafef222544786813ed5176d0dbea8d0f6adc2deea88b7",
"armv7-unknown-linux-gnueabihf-0.5.16":
"fe814f38a72c7f264e4cd8fdcb84519bf92a88f0e67d7a0a6a38dc18e938c0fc",
"armv7-unknown-linux-musleabihf-0.5.16":
"f72c8302fa59190a90ccb743d90d3efae71e78ea7c6b52c68b3e23b6c6fb3276",
"i686-pc-windows-msvc-0.5.16":
"fe24a7b1438152d8dcc7acedaad3b15362ef2e58d496611819fd8b99942dc2ed",
"i686-unknown-linux-gnu-0.5.16":
"d2ddc285d3962b45e05a59e62fb188d7bad3f969b45ff5256db0226efe44208b",
"i686-unknown-linux-musl-0.5.16":
"ac6b59b6b383a852ba5c22df777f9c3f39a85364a485bcc4203ca427417cb25b",
"powerpc64-unknown-linux-gnu-0.5.16":
"1ff9c39c6660548aa69934a25c8d92ffb11a7c9c1f39db9795e9f061ff34a8bd",
"powerpc64le-unknown-linux-gnu-0.5.16":
"87c568a126d59d66b99ec087182f4cd9de336678dfb60c51da35d678160875d6",
"s390x-unknown-linux-gnu-0.5.16":
"23c8331689d99c6fb70646a41a9d8ef5211d4eefe25baebb08b6b6c7f126af6e",
"x86_64-apple-darwin-0.5.16":
"72732a379d2aff6585c6bfd52593042a470e752d6af685cc01e1ee06d817cddb",
"x86_64-pc-windows-msvc-0.5.16":
"3fe298d7b10b63e9cec6711d03853874735f1dd33f655ad3ee6677965807883f",
"x86_64-unknown-linux-gnu-0.5.16":
"a320393232ac29acfe75cd0d3fb943ee2a5cc3727d2c9d1bb14bb9eea1fc60c9",
"x86_64-unknown-linux-musl-0.5.16":
"82962a1ef9ca888c32933fe9022c4b946e9bf047ffb0084a614b8cf7a5306dbf",
"aarch64-apple-darwin-0.5.15":
"bb7409c4d7d503e929bcd31bf179ae6f555f5092d0d5dc38df37be9f29832859",
"aarch64-unknown-linux-gnu-0.5.15":
"02f69686d0e1fe9673bb449fc45e53e6bfb0f48c5d371b35c145828c4239f123",
"aarch64-unknown-linux-musl-0.5.15":
"78ac5d4c7b9773bb3f6867f452ed83dd2f38f26116d2369ff5b4ea02eb7519bd",
"arm-unknown-linux-musleabihf-0.5.15":
"f416a9350161feacc48a96f90a1a38244d70f3ba07fbf96010ed477ff69814ed",
"armv7-unknown-linux-gnueabihf-0.5.15":
"182c316f44df157979e7430fb952eced1ad8020d1d8d810e88ce6985c9428615",
"armv7-unknown-linux-musleabihf-0.5.15":
"0b4400e8c22921355d5e69cf17cb0a44da93af09125e1dc636a69d2175a23898",
"i686-pc-windows-msvc-0.5.15":
"9092e142ce3a35f8c9f36058c3278f6b99718c02d8b904001ccc1cd918a0c798",
"i686-unknown-linux-gnu-0.5.15":
"d945431e618c2688ac62e640c16022c587a6f80677c64346280143d83939f93f",
"i686-unknown-linux-musl-0.5.15":
"6e1a968662a0952083e9a297ec067606621f93b55ccfbdd8ca475fd13b328d90",
"powerpc64-unknown-linux-gnu-0.5.15":
"58a6663e477645194c34dfac96b4c42ba6e7c4b5aa851c1e52276769b279b605",
"powerpc64le-unknown-linux-gnu-0.5.15":
"c7281fa8fedd6332c594faa7e1dc1555960c7fb60d3e1b013309651b8d53377d",
"s390x-unknown-linux-gnu-0.5.15":
"590751ffaf36f3f01b66afcb7de844ed0f69aeb2b54595cf191a4e60ddfab11c",
"x86_64-apple-darwin-0.5.15":
"6a729cb237d895eebeb65363419f41b217dbcd745819bcef61098a5ddd583f08",
"x86_64-pc-windows-msvc-0.5.15":
"2c49a892f793b957b0add32aa21a64940caf4bc03319cf0bb3b27caeebb985f7",
"x86_64-unknown-linux-gnu-0.5.15":
"6c650324daafc07331c00b458872d50f56f160544015c8a499fd2e160b404ebb",
"x86_64-unknown-linux-musl-0.5.15":
"40d8564e954bbd18f2c5ba80978491c3a25ab49e067664daf525e34c38a370b8",
"aarch64-apple-darwin-0.5.14":
"d548dffc256014c4c8c693e148140a3a21bcc2bf066a35e1d5f0d24c91d32112",
"aarch64-unknown-linux-gnu-0.5.14":
"1c9cdb265b0c24ce2e74b7795a00842dc6d487c11ba49aa6c9ca1c784b82755a",
"aarch64-unknown-linux-musl-0.5.14":
"64c5321f5141db39e04209d170db34fcef5c8de3f561346dc0c1d132801c4f88",
"arm-unknown-linux-musleabihf-0.5.14":
"903f87c609479099c87c229429f2a25f451689d862ee19170f6d87ab656815a0",
"armv7-unknown-linux-gnueabihf-0.5.14":
"c33a4caa441c770ca720d301059eeb6af5473ceb22b69adf08b99043c3e4a854",
"armv7-unknown-linux-musleabihf-0.5.14":
"c3b1bbe0d70e916abdd557092bf94c4830f98c471fe7d45b23d4dec8546251f3",
"i686-pc-windows-msvc-0.5.14":
"2ea709cf816b70661c6aa43d6aff7526faebafc2d45f7167d3192c5b9bb0a28f",
"i686-unknown-linux-gnu-0.5.14":
"74fd05a1e04bb8c591cb4531d517848d1e2cdc05762ccd291429c165e2a19aa1",
"i686-unknown-linux-musl-0.5.14":
"a616553164336a57fc154a424d44cd75eb06104bc4e69f3d757e3da90a90d31f",
"powerpc64-unknown-linux-gnu-0.5.14":
"4b675ac963f4d90034f8b8de8b03e0691b7e48eb8ce7bf5449ea65774750dfd4",
"powerpc64le-unknown-linux-gnu-0.5.14":
"2a7bb1d27a6a057cbd5f62a5bc2ec77175c71224de8fb1bb5107acb1a07cc02a",
"s390x-unknown-linux-gnu-0.5.14":
"68acbfadd9e100b69b31f4995265b716465df909a7d110bba76d93e8adc3a76b",
"x86_64-apple-darwin-0.5.14":
"8caf91b936ede1167abaebae07c2a1cbb22473355fa0ad7ebb2580307e84fb47",
"x86_64-pc-windows-msvc-0.5.14":
"ee2468e40320a0a2a36435e66bbd0d861228c4c06767f22d97876528138f4ba0",
"x86_64-unknown-linux-gnu-0.5.14":
"22034760075b92487b326da5aa1a2a3e1917e2e766c12c0fd466fccda77013c7",
"x86_64-unknown-linux-musl-0.5.14":
"e1ccdfe1691c1f791d84bb6e1697e49416ca4b62103dcdf3b63772f03834f113",
"aarch64-apple-darwin-0.5.13":
"8a1ddbe5131c50cbf5247f2f335252d14767a7ff74f08c8a1813f003bc86d37f",
"aarch64-unknown-linux-gnu-0.5.13":
"d0054db9ba0ec472ee6d28fa3eda94fb021b5e77c962f3bb1ff4b4fa7934e66d",
"aarch64-unknown-linux-musl-0.5.13":
"fcbc405bdf8f6edf25818b756af702e8161528f4317d65310d9a0d4e02d7f544",
"arm-unknown-linux-musleabihf-0.5.13":
"ba382034294dffcbe36d4a299a5c69c4f48caac9c4b78a1727c7fc9101175202",
"armv7-unknown-linux-gnueabihf-0.5.13":
"cc28eeaa29b85f17c27cefe96497b3448024e14b5bc92921e1b7d157375d2334",
"armv7-unknown-linux-musleabihf-0.5.13":
"449b680c4a3d936e9005e39983208a183e0fffa62fe73e6daed85f51389fc40e",
"i686-pc-windows-msvc-0.5.13":
"c1531c2f1eb8c36b2947abf039caf1aeba4253c3c35716705ca339a0a3d96594",
"i686-unknown-linux-gnu-0.5.13":
"35b964c75699b6569d950fb39561146b830101403c9a937ace1fc64fc1967c1b",
"i686-unknown-linux-musl-0.5.13":
"a33007ed60d67fa4c5b7689c1adb33751a5c1a8732057ed84b9deddbb39cd3a6",
"powerpc64-unknown-linux-gnu-0.5.13":
"9e34fc400e51f3331452083dd5e54fadc0f3be81f7901772366faf4c75e2680b",
"powerpc64le-unknown-linux-gnu-0.5.13":
"ee01812f102379bc9bb6ea991f81536c9546a5f0d4990b9ed1fbb1900cb5f647",
"s390x-unknown-linux-gnu-0.5.13":
"f43c42318411ff5f3e8ea4be2228e71fb28b01ffcc08259bb301877c7f7155e0",
"x86_64-apple-darwin-0.5.13":
"f871b2b002b750438e5e6df4b0809a9f7d089bc5d4d0466bc63577c9ecc59979",
"x86_64-pc-windows-msvc-0.5.13":
"c8a2e7e8bd87866fd1d52dbd4b4c0d85f328a6dcdeff17b85cc9c9af447ef3c3",
"x86_64-unknown-linux-gnu-0.5.13":
"0127da50d3c361d094545aab32921bbce856b3fcc24f1d10436a6426b3f16330",
"x86_64-unknown-linux-musl-0.5.13":
"1afaef0180a6b9fe43fa6658443796b8e235fc41382a451634515890cf3aca06",
"aarch64-apple-darwin-0.5.12":
"9eb8e0d3487f5389bec2c60cea37bb0a4d028513bffe854b9ece82d538c0f312",
"aarch64-unknown-linux-gnu-0.5.12":
"ed8b4928a148365a84133ce96344fc22ac62674db2c6bef88853d0e38791e8d8",
"aarch64-unknown-linux-musl-0.5.12":
"3ce19d81232cd2dcc2646060370a1583ca5558e7f61d934ae22798006719341d",
"arm-unknown-linux-musleabihf-0.5.12":
"744409cd0b7f6314b8ba140cb63f72e2576dfec5c83491d12455775d870d508d",
"armv7-unknown-linux-gnueabihf-0.5.12":
"452f8b769818858c3343444396d270d34026f0f7649cc89c4076ecdc8eb6d391",
"armv7-unknown-linux-musleabihf-0.5.12":
"35abf5e98f2c9a8250045a58a568086f0e223be703c090134bedaf6279ebaac5",
"i686-pc-windows-msvc-0.5.12":
"04f91508e6aeb7a2054e98552ff537b9863afbcbd4f72ba8bf8d9e9e25b37808",
"i686-unknown-linux-gnu-0.5.12":
"38c8fbdb74ee9eb95ecdb4b843d9014d47214cdf5415520378161979d1b0cb34",
"i686-unknown-linux-musl-0.5.12":
"6a8bb35f83c2a66711da3cee8d939e8893b34b25ae6cb53590c111637a93d527",
"powerpc64-unknown-linux-gnu-0.5.12":
"d1477f41b919c60d10a191bd81aeec0185cec7efb0364d9689b202b3a6607912",
"powerpc64le-unknown-linux-gnu-0.5.12":
"12629950b444487c66a3a99f0ff0f82f11a7b0a57e8305b2767eed5b85a4a3bb",
"s390x-unknown-linux-gnu-0.5.12":
"36fc6d9ee6294ce54a2e3e92f10df094bebdd2862c29223bde18361aad9a9f1d",
"x86_64-apple-darwin-0.5.12":
"78f38c88bf5e410600cd8f8ee4d5ba3ee781c94c091b1a57566256a2178ef4a3",
"x86_64-pc-windows-msvc-0.5.12":
"04b45a4af12c0bb7cc31004dfcfed2e722c4ca07e1ac58850f93a9343dd5d06f",
"x86_64-unknown-linux-gnu-0.5.12":
"65b8dcf3f3e592887fae0daf1b3a9e3aad1262f74bb21cf80d1700c7caba7f23",
"x86_64-unknown-linux-musl-0.5.12":
"bd517e6508feef0261289b16c844c377127f21377c18c4a564d0d09add556fca",
"aarch64-apple-darwin-0.5.11":
"695f3640d5b1a4e28de7e36e3a2e14072852dcc6c70bf9e4deec6ada00d516b4",
"aarch64-unknown-linux-gnu-0.5.11":

View File

@@ -2,14 +2,15 @@ import * as core from "@actions/core";
import * as tc from "@actions/tool-cache";
import * as path from "node:path";
import { promises as fs } from "node:fs";
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
import {
GITHUB_COM_API,
OWNER,
REPO,
TOOL_CACHE_NAME,
} from "../utils/constants";
import type { Architecture, Platform } from "../utils/platforms";
import { validateChecksum } from "./checksum/checksum";
import { Octokit } from "@octokit/core";
import { paginateRest } from "@octokit/plugin-paginate-rest";
import { restEndpointMethods } from "@octokit/plugin-rest-endpoint-methods";
const PaginatingOctokit = Octokit.plugin(paginateRest, restEndpointMethods);
import * as github from "@actions/github";
export function tryGetFromToolCache(
arch: Architecture,
@@ -78,7 +79,6 @@ export async function resolveVersion(
versionInput: string,
githubToken: string,
): Promise<string> {
core.debug(`Resolving version: ${versionInput}`);
const version =
versionInput === "latest"
? await getLatestVersion(githubToken)
@@ -88,7 +88,6 @@ export async function resolveVersion(
return version;
}
const availableVersions = await getAvailableVersions(githubToken);
core.debug(`Available versions: ${availableVersions}`);
const resolvedVersion = tc.evaluateVersions(availableVersions, version);
if (resolvedVersion === "") {
throw new Error(`No version found for ${version}`);
@@ -97,26 +96,8 @@ export async function resolveVersion(
}
async function getAvailableVersions(githubToken: string): Promise<string[]> {
try {
const octokit = new PaginatingOctokit({
auth: githubToken,
});
return await getReleaseTagNames(octokit);
} catch (err) {
if ((err as Error).message.includes("Bad credentials")) {
core.info(
"No (valid) GitHub token provided. Falling back to anonymous. Requests might be rate limited.",
);
const octokit = new PaginatingOctokit();
return await getReleaseTagNames(octokit);
}
throw err;
}
}
const octokit = github.getOctokit(githubToken, { baseUrl: GITHUB_COM_API });
async function getReleaseTagNames(
octokit: InstanceType<typeof PaginatingOctokit>,
): Promise<string[]> {
const response = await octokit.paginate(octokit.rest.repos.listReleases, {
owner: OWNER,
repo: REPO,
@@ -125,39 +106,15 @@ async function getReleaseTagNames(
}
async function getLatestVersion(githubToken: string) {
core.debug("Getting latest version...");
const octokit = new PaginatingOctokit({
auth: githubToken,
});
const octokit = github.getOctokit(githubToken, { baseUrl: GITHUB_COM_API });
let latestRelease: { tag_name: string } | undefined;
try {
latestRelease = await getLatestRelease(octokit);
} catch (err) {
if ((err as Error).message.includes("Bad credentials")) {
core.info(
"No (valid) GitHub token provided. Falling back to anonymous. Requests might be rate limited.",
);
const octokit = new PaginatingOctokit();
latestRelease = await getLatestRelease(octokit);
} else {
throw err;
}
}
if (!latestRelease) {
throw new Error("Could not determine latest release.");
}
core.debug(`Latest version: ${latestRelease.tag_name}`);
return latestRelease.tag_name;
}
async function getLatestRelease(
octokit: InstanceType<typeof PaginatingOctokit>,
) {
const { data: latestRelease } = await octokit.rest.repos.getLatestRelease({
owner: OWNER,
repo: REPO,
});
return latestRelease;
if (!latestRelease) {
throw new Error("Could not determine latest release.");
}
return latestRelease.tag_name;
}

View File

@@ -18,19 +18,15 @@ import {
checkSum,
enableCache,
githubToken,
pyProjectFile,
pythonVersion,
toolBinDir,
toolDir,
uvFile,
version as versionInput,
version,
} from "./utils/inputs";
import * as exec from "@actions/exec";
import fs from "node:fs";
import { getUvVersionFromConfigFile } from "./utils/pyproject";
async function run(): Promise<void> {
const platform = await getPlatform();
const platform = getPlatform();
const arch = getArch();
try {
@@ -40,7 +36,13 @@ async function run(): Promise<void> {
if (arch === undefined) {
throw new Error(`Unsupported architecture: ${process.arch}`);
}
const setupResult = await setupUv(platform, arch, checkSum, githubToken);
const setupResult = await setupUv(
platform,
arch,
version,
checkSum,
githubToken,
);
addUvToPath(setupResult.uvDir);
addToolBinToPath();
@@ -64,10 +66,11 @@ async function run(): Promise<void> {
async function setupUv(
platform: Platform,
arch: Architecture,
versionInput: string,
checkSum: string | undefined,
githubToken: string,
): Promise<{ uvDir: string; version: string }> {
const resolvedVersion = await determineVersion();
const resolvedVersion = await resolveVersion(versionInput, githubToken);
const toolCacheResult = tryGetFromToolCache(arch, resolvedVersion);
if (toolCacheResult.installedPath) {
core.info(`Found uv in tool-cache for ${toolCacheResult.version}`);
@@ -91,28 +94,6 @@ async function setupUv(
};
}
async function determineVersion(): Promise<string> {
if (versionInput !== "") {
return await resolveVersion(versionInput, githubToken);
}
const configFile = uvFile !== "" ? uvFile : pyProjectFile;
if (configFile !== "") {
const versionFromConfigFile = getUvVersionFromConfigFile(configFile);
if (versionFromConfigFile === undefined) {
core.warning(
`Could not find required-version under [tool.uv] in ${configFile}. Falling back to latest`,
);
}
return await resolveVersion(versionFromConfigFile || "latest", githubToken);
}
if (!fs.existsSync("uv.toml") && !fs.existsSync("pyproject.toml")) {
return await resolveVersion("latest", githubToken);
}
const versionFile = fs.existsSync("uv.toml") ? "uv.toml" : "pyproject.toml";
const versionFromConfigFile = getUvVersionFromConfigFile(versionFile);
return await resolveVersion(versionFromConfigFile || "latest", githubToken);
}
function addUvToPath(cachedPath: string): void {
core.addPath(cachedPath);
core.info(`Added ${cachedPath} to the path`);
@@ -161,8 +142,8 @@ async function setupPython(): Promise<void> {
if (process.platform === "win32") {
venvBinPath = ".venv/Scripts";
}
core.addPath(path.resolve(venvBinPath));
core.exportVariable("VIRTUAL_ENV", path.resolve(".venv"));
core.addPath(venvBinPath);
core.exportVariable("VIRTUAL_ENV", ".venv");
}
}

View File

@@ -1,22 +1,16 @@
import * as semver from "semver";
import * as github from "@actions/github";
import * as core from "@actions/core";
import { Octokit } from "@octokit/core";
import { paginateRest } from "@octokit/plugin-paginate-rest";
import { restEndpointMethods } from "@octokit/plugin-rest-endpoint-methods";
import { OWNER, REPO } from "./utils/constants";
import { GITHUB_COM_API, OWNER, REPO } from "./utils/constants";
import * as semver from "semver";
import { updateChecksums } from "./download/checksum/update-known-checksums";
const PaginatingOctokit = Octokit.plugin(paginateRest, restEndpointMethods);
async function run(): Promise<void> {
const checksumFilePath = process.argv.slice(2)[0];
const github_token = process.argv.slice(2)[1];
const octokit = new PaginatingOctokit({
auth: github_token,
});
const octokit = github.getOctokit(github_token, { baseUrl: GITHUB_COM_API });
const response = await octokit.paginate(octokit.rest.repos.listReleases, {
owner: OWNER,

View File

@@ -1,3 +1,4 @@
export const REPO = "uv";
export const OWNER = "astral-sh";
export const TOOL_CACHE_NAME = "uv";
export const GITHUB_COM_API = "https://api.github.com";

View File

@@ -2,8 +2,6 @@ import * as core from "@actions/core";
import path from "node:path";
export const version = core.getInput("version");
export const pyProjectFile = core.getInput("pyproject-file");
export const uvFile = core.getInput("uv-file");
export const pythonVersion = core.getInput("python-version");
export const checkSum = core.getInput("checksum");
export const enableCache = getEnableCache();

View File

@@ -1,17 +1,10 @@
import * as exec from "@actions/exec";
import * as core from "@actions/core";
export type Platform =
| "unknown-linux-gnu"
| "unknown-linux-musl"
| "unknown-linux-musleabihf"
| "apple-darwin"
| "pc-windows-msvc";
export type Architecture =
| "i686"
| "x86_64"
| "aarch64"
| "s390x"
| "powerpc64le";
export type Architecture = "i686" | "x86_64" | "aarch64";
export function getArch(): Architecture | undefined {
const arch = process.arch;
@@ -19,8 +12,6 @@ export function getArch(): Architecture | undefined {
ia32: "i686",
x64: "x86_64",
arm64: "aarch64",
s390x: "s390x",
ppc64: "powerpc64le",
};
if (arch in archMapping) {
@@ -28,49 +19,15 @@ export function getArch(): Architecture | undefined {
}
}
export async function getPlatform(): Promise<Platform | undefined> {
const processPlatform = process.platform;
export function getPlatform(): Platform | undefined {
const platform = process.platform;
const platformMapping: { [key: string]: Platform } = {
linux: "unknown-linux-gnu",
darwin: "apple-darwin",
win32: "pc-windows-msvc",
};
if (processPlatform in platformMapping) {
const platform = platformMapping[processPlatform];
if (platform === "unknown-linux-gnu") {
const isMusl = await isMuslOs();
return isMusl ? "unknown-linux-musl" : platform;
}
return platform;
}
}
async function isMuslOs(): Promise<boolean> {
let stdOutput = "";
let errOutput = "";
const options: exec.ExecOptions = {
silent: !core.isDebug(),
listeners: {
stdout: (data: Buffer) => {
stdOutput += data.toString();
},
stderr: (data: Buffer) => {
errOutput += data.toString();
},
},
ignoreReturnCode: true,
};
try {
const execArgs = ["--version"];
await exec.exec("ldd", execArgs, options);
return stdOutput.includes("musl") || errOutput.includes("musl");
} catch (error) {
const err = error as Error;
core.warning(
`Failed to determine glibc or musl. Falling back to glibc. Error: ${err.message}`,
);
return false;
if (platform in platformMapping) {
return platformMapping[platform];
}
}

View File

@@ -1,46 +0,0 @@
import fs from "node:fs";
import * as core from "@actions/core";
import * as toml from "smol-toml";
export function getUvVersionFromConfigFile(
filePath: string,
): string | undefined {
core.debug(`Trying to find required-version for uv in: ${filePath}`);
if (!fs.existsSync(filePath)) {
core.warning(`Could not find file: ${filePath}`);
return undefined;
}
let requiredVersion: string | undefined;
try {
requiredVersion = getRequiredVersion(filePath);
} catch (err) {
const message = (err as Error).message;
core.warning(`Error while parsing ${filePath}: ${message}`);
return undefined;
}
if (requiredVersion?.startsWith("==")) {
requiredVersion = requiredVersion.slice(2);
}
if (requiredVersion !== undefined) {
core.info(
`Found required-version for uv in ${filePath}: ${requiredVersion}`,
);
}
return requiredVersion;
}
function getRequiredVersion(filePath: string): string | undefined {
const fileContent = fs.readFileSync(filePath, "utf-8");
if (filePath.endsWith("pyproject.toml")) {
const tomlContent = toml.parse(fileContent) as {
tool?: { uv?: { "required-version"?: string } };
};
return tomlContent?.tool?.uv?.["required-version"];
}
const tomlContent = toml.parse(fileContent) as {
"required-version"?: string;
};
return tomlContent["required-version"];
}

View File

@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "ES2022" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
"target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
"outDir": "./lib" /* Redirect output structure to the directory. */,
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,