mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-12-13 11:13:45 +00:00
Compare commits
59 Commits
v6.4.2
...
copilot/ad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60c3d12f39 | ||
|
|
4dcb799aa0 | ||
|
|
d18bcc753a | ||
|
|
bd1f875aba | ||
|
|
1a91c3851d | ||
|
|
c79f606987 | ||
|
|
e0249f1599 | ||
|
|
6d2eb15b49 | ||
|
|
3495667518 | ||
|
|
eb1897b8dc | ||
|
|
d78d791822 | ||
|
|
535dc2664c | ||
|
|
f610be5ff9 | ||
|
|
3deccc0075 | ||
|
|
d9ee7e2f26 | ||
|
|
59a0868fea | ||
|
|
c952556164 | ||
|
|
51c3328db2 | ||
|
|
f2859da213 | ||
|
|
f9c6974d8b | ||
|
|
82f21a54fe | ||
|
|
d8a37f6566 | ||
|
|
d0cc045d04 | ||
|
|
2841f9f5c1 | ||
|
|
e554b93b80 | ||
|
|
c7d85d9988 | ||
|
|
07f2cb5db9 | ||
|
|
208b0c0ee4 | ||
|
|
b75a909f75 | ||
|
|
ffff8aa2b5 | ||
|
|
95d0e233fa | ||
|
|
dc724a12b6 | ||
|
|
f67343ac2e | ||
|
|
4dd9f52a47 | ||
|
|
e1e6fe7910 | ||
|
|
b1836110f7 | ||
|
|
557e51de59 | ||
|
|
1b46e13ec8 | ||
|
|
26cf676705 | ||
|
|
4e1e303f7d | ||
|
|
4959332f0f | ||
|
|
adeb28643f | ||
|
|
fce199e243 | ||
|
|
f758a4a1eb | ||
|
|
c0e7e93474 | ||
|
|
fda2399cb3 | ||
|
|
d9e0f98d3f | ||
|
|
e5d42a2b46 | ||
|
|
d664c2a1d1 | ||
|
|
c35b8eac36 | ||
|
|
4109b4033f | ||
|
|
1463845d3c | ||
|
|
ad5ded2d63 | ||
|
|
142240426d | ||
|
|
632449003a | ||
|
|
2a967c9b97 | ||
|
|
43f37368c9 | ||
|
|
4fb0c07c55 | ||
|
|
e92bafb625 |
4
.github/actionlint.yaml
vendored
4
.github/actionlint.yaml
vendored
@@ -7,3 +7,7 @@ self-hosted-runner:
|
||||
# organization. `null` means disabling configuration variables check.
|
||||
# Empty array means no configuration variable is allowed.
|
||||
config-variables: null
|
||||
paths:
|
||||
.github/workflows/test.yml:
|
||||
ignore:
|
||||
- 'invalid runner name.+'
|
||||
|
||||
225
.github/copilot-instructions.md
vendored
Normal file
225
.github/copilot-instructions.md
vendored
Normal file
@@ -0,0 +1,225 @@
|
||||
# Copilot Instructions for setup-uv
|
||||
|
||||
This document provides essential information for GitHub Copilot coding agents working on the `astral-sh/setup-uv` repository.
|
||||
|
||||
## Repository Overview
|
||||
|
||||
**setup-uv** is a GitHub Action that sets up the [uv](https://docs.astral.sh/uv/) Python package installer in GitHub Actions workflows. It's a TypeScript-based action that downloads uv binaries, manages caching, handles version resolution, and configures the environment for subsequent workflow steps.
|
||||
|
||||
### Key Features
|
||||
- Downloads and installs specific uv versions from GitHub releases
|
||||
- Supports version resolution from config files (pyproject.toml, uv.toml, .tool-versions)
|
||||
- Implements intelligent caching for both uv cache and Python installations
|
||||
- Provides cross-platform support (Linux, macOS, Windows, including ARM architectures)
|
||||
- Includes problem matchers for Python error reporting
|
||||
- Supports environment activation and custom tool directories
|
||||
|
||||
## Repository Structure
|
||||
|
||||
**Size**: Small-medium repository (~50 source files, ~400 total files including dependencies)
|
||||
**Languages**: TypeScript (primary), JavaScript (compiled output), JSON (configuration)
|
||||
**Runtime**: Node.js 24 (GitHub Actions runtime)
|
||||
**Key Dependencies**: @actions/core, @actions/cache, @actions/tool-cache, @octokit/core
|
||||
|
||||
### Core Architecture
|
||||
```
|
||||
src/
|
||||
├── setup-uv.ts # Main entry point and orchestration
|
||||
├── save-cache.ts # Post-action cache saving logic
|
||||
├── update-known-versions.ts # Maintenance script for version updates
|
||||
├── cache/ # Cache management functionality
|
||||
├── download/ # Version resolution and binary downloading
|
||||
├── utils/ # Input parsing, platform detection, configuration
|
||||
└── version/ # Version resolution from various file formats
|
||||
```
|
||||
|
||||
### Key Files and Locations
|
||||
- **Action Definition**: `action.yml` - Defines all inputs/outputs and entry points
|
||||
- **Main Source**: `src/setup-uv.ts` - Primary action logic
|
||||
- **Configuration**: `biome.json` (linting), `tsconfig.json` (TypeScript), `jest.config.js` (testing)
|
||||
- **Compiled Output**: `dist/` - Contains compiled Node.js bundles (auto-generated, committed)
|
||||
- **Test Fixtures**: `__tests__/fixtures/` - Sample projects for different configuration scenarios
|
||||
- **Workflows**: `.github/workflows/test.yml` - Comprehensive CI/CD pipeline
|
||||
|
||||
## Build and Development Process
|
||||
|
||||
### Prerequisites
|
||||
- Node.js 24+ (matches GitHub Actions runtime)
|
||||
- npm (included with Node.js)
|
||||
|
||||
### Essential Commands (ALWAYS run in this order)
|
||||
|
||||
#### 1. Install Dependencies
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
**Timing**: ~20-30 seconds
|
||||
**Note**: Always run this first after cloning or when package.json changes
|
||||
|
||||
#### 2. Build TypeScript
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
**Timing**: ~5-10 seconds
|
||||
**Purpose**: Compiles TypeScript source to JavaScript in `lib/` directory
|
||||
|
||||
#### 3. Lint and Format Code
|
||||
```bash
|
||||
npm run check
|
||||
```
|
||||
**Timing**: ~2-5 seconds
|
||||
**Tool**: Biome (replaces ESLint/Prettier)
|
||||
**Auto-fixes**: Formatting, import organization, basic linting issues
|
||||
|
||||
#### 4. Package for Distribution
|
||||
```bash
|
||||
npm run package
|
||||
```
|
||||
**Timing**: ~20-30 seconds
|
||||
**Purpose**: Creates bundled distributions in `dist/` using @vercel/ncc
|
||||
**Critical**: This step MUST be run before committing - the `dist/` files are used by GitHub Actions
|
||||
|
||||
#### 5. Run Tests
|
||||
```bash
|
||||
npm test
|
||||
```
|
||||
**Timing**: ~10-15 seconds
|
||||
**Framework**: Jest with TypeScript support
|
||||
**Coverage**: Unit tests for version resolution, input parsing, checksum validation
|
||||
|
||||
#### 6. Complete Validation (Recommended)
|
||||
```bash
|
||||
npm run all
|
||||
```
|
||||
**Timing**: ~60-90 seconds
|
||||
**Purpose**: Runs build → check → package → test in sequence
|
||||
**Use**: Before making pull requests or when unsure about build state
|
||||
|
||||
### Important Build Notes
|
||||
|
||||
**CRITICAL**: Always run `npm run package` after making code changes. The `dist/` directory contains the compiled bundles that GitHub Actions actually executes. Forgetting this step will cause your changes to have no effect.
|
||||
|
||||
**TypeScript Warnings**: You may see ts-jest warnings about "isolatedModules" - these are harmless and don't affect functionality.
|
||||
|
||||
**Biome**: This project uses Biome instead of ESLint/Prettier. Run `npm run check` to fix formatting and linting issues automatically.
|
||||
|
||||
## Testing Strategy
|
||||
|
||||
### Unit Tests
|
||||
- **Location**: `__tests__/` directory
|
||||
- **Framework**: Jest with ts-jest transformer
|
||||
- **Coverage**: Version resolution, input parsing, checksum validation, utility functions
|
||||
|
||||
### Integration Tests
|
||||
- **Location**: `.github/workflows/test.yml`
|
||||
- **Scope**: Full end-to-end testing across multiple platforms and scenarios
|
||||
- **Key Test Categories**:
|
||||
- Version installation (specific, latest, semver ranges)
|
||||
- Cache behavior (setup, restore, invalidation)
|
||||
- Cross-platform compatibility (Ubuntu, macOS, Windows, ARM)
|
||||
- Configuration file parsing (pyproject.toml, uv.toml, requirements.txt)
|
||||
- Error handling and edge cases
|
||||
|
||||
### Test Fixtures
|
||||
Located in `__tests__/fixtures/`, these provide sample projects with different configurations:
|
||||
- `pyproject-toml-project/` - Standard Python project with uv version specification
|
||||
- `uv-toml-project/` - Project using uv.toml configuration
|
||||
- `requirements-txt-project/` - Legacy requirements.txt format
|
||||
- `cache-dir-defined-project/` - Custom cache directory configuration
|
||||
|
||||
## Continuous Integration
|
||||
|
||||
### GitHub Workflows
|
||||
|
||||
#### Primary Test Suite (`.github/workflows/test.yml`)
|
||||
- **Triggers**: PRs, pushes to main, manual dispatch
|
||||
- **Matrix**: Multiple OS (Ubuntu, macOS, Windows), architecture (x64, ARM), and configuration combinations
|
||||
- **Duration**: ~20-30 minutes for full matrix
|
||||
- **Key Validations**:
|
||||
- Cross-platform installation and functionality
|
||||
- Cache behavior and performance
|
||||
- Version resolution from various sources
|
||||
- Tool directory configurations
|
||||
- Problem matcher functionality
|
||||
|
||||
#### Maintenance Workflows
|
||||
- **CodeQL Analysis**: Security scanning on pushes/PRs
|
||||
- **Update Known Versions**: Daily job to sync with latest uv releases
|
||||
- **Dependabot**: Automated dependency updates
|
||||
|
||||
### Pre-commit Validation
|
||||
The CI runs these checks that you should run locally:
|
||||
1. `npm run all` - Complete build and test suite
|
||||
2. ActionLint - GitHub Actions workflow validation
|
||||
3. Change detection - Ensures no uncommitted build artifacts
|
||||
|
||||
## Key Configuration Files
|
||||
|
||||
### Action Configuration (`action.yml`)
|
||||
Defines 20+ inputs including version specifications, cache settings, tool directories, and environment options. This file is the authoritative source for understanding available action parameters.
|
||||
|
||||
### TypeScript Configuration (`tsconfig.json`)
|
||||
- Target: ES2024
|
||||
- Module: nodenext (Node.js modules)
|
||||
- Strict mode enabled
|
||||
- Output directory: `lib/`
|
||||
|
||||
### Linting Configuration (`biome.json`)
|
||||
- Formatter and linter combined
|
||||
- Enforces consistent code style
|
||||
- Automatically organizes imports and sorts object keys
|
||||
|
||||
## Common Development Patterns
|
||||
|
||||
### Making Code Changes
|
||||
1. Edit TypeScript source files in `src/`
|
||||
2. Run `npm run build` to compile
|
||||
3. Run `npm run check` to format and lint
|
||||
4. Run `npm run package` to update distribution bundles
|
||||
5. Run `npm test` to verify functionality
|
||||
6. Commit all changes including `dist/` files
|
||||
|
||||
### Adding New Features
|
||||
- Follow existing patterns in `src/utils/inputs.ts` for new action inputs
|
||||
- Update `action.yml` to declare new inputs/outputs
|
||||
- Add corresponding tests in `__tests__/`
|
||||
- Update README.md with usage examples
|
||||
|
||||
### Cache-Related Changes
|
||||
- Cache logic is complex and affects performance significantly
|
||||
- Test with multiple cache scenarios (hit, miss, invalidation)
|
||||
- Consider impact on both GitHub-hosted and self-hosted runners
|
||||
- Validate cache key generation and dependency detection
|
||||
|
||||
### Version Resolution Changes
|
||||
- Version resolution supports multiple file formats and precedence rules
|
||||
- Test with fixtures in `__tests__/fixtures/`
|
||||
- Consider backward compatibility with existing projects
|
||||
- Validate semver and PEP 440 specification handling
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Build Failures
|
||||
- **"Module not found"**: Run `npm install` to ensure dependencies are installed
|
||||
- **TypeScript errors**: Check `tsconfig.json` and ensure all imports are valid
|
||||
- **Test failures**: Check if test fixtures have been modified or if logic changes broke assumptions
|
||||
|
||||
### Action Failures in Workflows
|
||||
- **Changes not taking effect**: Ensure `npm run package` was run and `dist/` files committed
|
||||
- **Version resolution issues**: Check version specification format and file existence
|
||||
- **Cache problems**: Verify cache key generation and dependency glob patterns
|
||||
|
||||
### Common Gotchas
|
||||
- **Forgetting to package**: Code changes won't work without running `npm run package`
|
||||
- **Platform differences**: Windows paths use backslashes, test cross-platform behavior
|
||||
- **Cache invalidation**: Cache keys are sensitive to dependency file changes
|
||||
- **Tool directory permissions**: Some platforms require specific directory setups
|
||||
|
||||
## Trust These Instructions
|
||||
|
||||
These instructions are comprehensive and current. Only search for additional information if:
|
||||
- You encounter specific error messages not covered here
|
||||
- You need to understand implementation details of specific functions
|
||||
- The instructions appear outdated (check repository commit history)
|
||||
|
||||
For most development tasks, following the build process and development patterns outlined above will be sufficient.
|
||||
8
.github/python.json
vendored
8
.github/python.json
vendored
@@ -4,13 +4,13 @@
|
||||
"owner": "python",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^\\s*File\\s\\\"(.*)\\\",\\sline\\s(\\d+),\\sin\\s(.*)$",
|
||||
"file": 1,
|
||||
"line": 2
|
||||
"line": 2,
|
||||
"regexp": "^\\s*File\\s\\\"(.*)\\\",\\sline\\s(\\d+),\\sin\\s(.*)$"
|
||||
},
|
||||
{
|
||||
"regexp": "^\\s*raise\\s(.*)\\(\\'(.*)\\'\\)$",
|
||||
"message": 2
|
||||
"message": 2,
|
||||
"regexp": "^\\s*raise\\s(.*)\\(\\'(.*)\\'\\)$"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
16
.github/scripts/check-all-tests-passed-needs.js
vendored
Normal file
16
.github/scripts/check-all-tests-passed-needs.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var fs = require("node:fs");
|
||||
var yaml = require("js-yaml");
|
||||
var workflow = yaml.load(fs.readFileSync("../workflows/test.yml", "utf8"));
|
||||
var jobs = Object.keys(workflow.jobs);
|
||||
var allTestsPassed = workflow.jobs["all-tests-passed"];
|
||||
var needs = allTestsPassed.needs || [];
|
||||
var expectedNeeds = jobs.filter(function (j) { return j !== "all-tests-passed"; });
|
||||
var missing = expectedNeeds.filter(function (j) { return !needs.includes(j); });
|
||||
if (missing.length > 0) {
|
||||
console.error("Missing jobs in all-tests-passed needs: ".concat(missing.join(", ")));
|
||||
console.info("Please add the missing jobs to the needs section of all-tests-passed in test.yml.");
|
||||
process.exit(1);
|
||||
}
|
||||
console.log("All jobs in test.yml are in the needs section of all-tests-passed.");
|
||||
12
.github/workflows/codeql-analysis.yml
vendored
12
.github/workflows/codeql-analysis.yml
vendored
@@ -21,6 +21,8 @@ on:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
@@ -39,11 +41,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
uses: github/codeql-action/init@e296a935590eb16afc0c0108289f68c87e2a89a5 # v4.30.7
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
source-root: src
|
||||
@@ -55,7 +59,7 @@ jobs:
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
uses: github/codeql-action/autobuild@e296a935590eb16afc0c0108289f68c87e2a89a5 # v4.30.7
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
@@ -69,4 +73,4 @@ jobs:
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
uses: github/codeql-action/analyze@e296a935590eb16afc0c0108289f68c87e2a89a5 # v4.30.7
|
||||
|
||||
4
.github/workflows/release-drafter.yml
vendored
4
.github/workflows/release-drafter.yml
vendored
@@ -8,6 +8,8 @@ on:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
update_release_draft:
|
||||
name: ✏️ Draft release
|
||||
@@ -17,6 +19,6 @@ jobs:
|
||||
pull-requests: read
|
||||
steps:
|
||||
- name: 🚀 Run Release Drafter
|
||||
uses: release-drafter/release-drafter@v6.1.0
|
||||
uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6.1.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
586
.github/workflows/test.yml
vendored
586
.github/workflows/test.yml
vendored
@@ -18,13 +18,19 @@ permissions:
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
security-events: write # for zizmor
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Actionlint
|
||||
uses: eifinger/actionlint-action@23c85443d840cd73bbecb9cddfc933cc21649a38 # v1.9.1
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
node-version: "20"
|
||||
persist-credentials: false
|
||||
- name: Actionlint
|
||||
uses: eifinger/actionlint-action@23c85443d840cd73bbecb9cddfc933cc21649a38 # v1.9.1
|
||||
- name: Run zizmor
|
||||
uses: zizmorcore/zizmor-action@e673c3917a1aef3c65c972347ed84ccd013ecda4 # v0.2.0
|
||||
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
||||
with:
|
||||
node-version: "24"
|
||||
- run: |
|
||||
npm install
|
||||
- run: |
|
||||
@@ -44,7 +50,9 @@ jobs:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, macos-14, windows-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install latest version
|
||||
id: setup-uv
|
||||
uses: ./
|
||||
@@ -52,78 +60,150 @@ jobs:
|
||||
working-directory: __tests__/fixtures/uv-project
|
||||
shell: bash
|
||||
- name: Check uv-path is set
|
||||
run: ${{ steps.setup-uv.outputs.uv-path }} --version
|
||||
run: |
|
||||
"${UV_PATH}" --version
|
||||
shell: bash
|
||||
env:
|
||||
UV_PATH: ${{ steps.setup-uv.outputs.uv-path }}
|
||||
- name: Check uvx-path is set
|
||||
run: ${{ steps.setup-uv.outputs.uvx-path }} --version
|
||||
run: |
|
||||
"${UVX_PATH}" --version
|
||||
shell: bash
|
||||
env:
|
||||
UVX_PATH: ${{ steps.setup-uv.outputs.uvx-path }}
|
||||
|
||||
test-uv-no-modify-path:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install with UV_NO_MODIFY_PATH set
|
||||
id: setup-uv
|
||||
uses: ./
|
||||
env:
|
||||
UV_NO_MODIFY_PATH: 1
|
||||
- run: |
|
||||
"${UV_PATH}" sync
|
||||
working-directory: __tests__/fixtures/uv-project
|
||||
shell: bash
|
||||
env:
|
||||
UV_PATH: ${{ steps.setup-uv.outputs.uv-path }}
|
||||
- name: uv is not on PATH
|
||||
run: |
|
||||
if command -v uv; then
|
||||
echo "uv should not be on PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test-specific-version:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
uv-version: ["0.3.0", "0.3.2", "0.3", "0.3.x", ">=0.3.0"]
|
||||
input:
|
||||
- version-input: "0.3.0"
|
||||
expected-version: "0.3.0"
|
||||
- version-input: "0.3.2"
|
||||
expected-version: "0.3.2"
|
||||
- version-input: "0.3"
|
||||
expected-version: "0.3.5"
|
||||
- version-input: "0.3.x"
|
||||
expected-version: "0.3.5"
|
||||
- version-input: ">=0.4.25,<0.5"
|
||||
expected-version: "0.4.30"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install version ${{ matrix.uv-version }}
|
||||
uses: ./
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
version: ${{ matrix.uv-version }}
|
||||
- run: uv sync
|
||||
working-directory: __tests__/fixtures/uv-project
|
||||
|
||||
test-semver-range:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest, selfhosted-ubuntu-arm64 ]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install version 0.3
|
||||
persist-credentials: false
|
||||
- name: Install version ${{ matrix.input.version-input }}
|
||||
id: setup-uv
|
||||
uses: ./
|
||||
with:
|
||||
version: "0.3"
|
||||
version: ${{ matrix.input.version-input }}
|
||||
- name: Correct version gets installed
|
||||
run: |
|
||||
if [ "$(uv --version)" != "uv 0.3.5" ]; then
|
||||
if [ "$(uv --version)" != "uv ${{ matrix.input.expected-version }}" ]; then
|
||||
echo "Wrong uv version: $(uv --version)"
|
||||
exit 1
|
||||
fi
|
||||
- name: Output has correct version
|
||||
run: |
|
||||
if [ "$UV_VERSION" != "0.3.5" ]; then
|
||||
if [ "$UV_VERSION" != "${{ matrix.input.expected-version }}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
env:
|
||||
UV_VERSION: ${{ steps.setup-uv.outputs.uv-version }}
|
||||
|
||||
test-pep440-version:
|
||||
test-latest-version:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
version-input: ["latest", ">=0.8"]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install version 0.4.30
|
||||
id: setup-uv
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install version ${{ matrix.version-input }}
|
||||
uses: ./
|
||||
with:
|
||||
version: ">=0.4.25,<0.5"
|
||||
version: ${{ matrix.version-input }}
|
||||
- name: Latest version gets installed
|
||||
run: |
|
||||
LATEST_VERSION=$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/astral-sh/uv/releases/latest | jq -r '.tag_name')
|
||||
echo "Latest version is $LATEST_VERSION"
|
||||
if [ "$(uv --version)" != "uv $LATEST_VERSION" ]; then
|
||||
echo "Wrong uv version: $(uv --version)"
|
||||
exit 1
|
||||
fi
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
|
||||
test-from-working-directory-version:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
input:
|
||||
- working-directory: "__tests__/fixtures/pyproject-toml-project"
|
||||
expected-version: "0.5.14"
|
||||
- working-directory: "__tests__/fixtures/uv-toml-project"
|
||||
expected-version: "0.5.15"
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install version from ${{ matrix.input.working-directory }}
|
||||
uses: ./
|
||||
with:
|
||||
working-directory: ${{ matrix.input.working-directory }}
|
||||
- name: Correct version gets installed
|
||||
run: |
|
||||
if [ "$(uv --version)" != "uv 0.4.30" ]; then
|
||||
if [ "$(uv --version)" != "uv ${{ matrix.input.expected-version }}" ]; then
|
||||
echo "Wrong uv version: $(uv --version)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test-pyproject-file-version:
|
||||
test-version-file-version:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
input:
|
||||
- version-file: "__tests__/fixtures/uv-in-requirements-txt-project/requirements.txt"
|
||||
expected-version: "0.6.17"
|
||||
- version-file: "__tests__/fixtures/uv-in-requirements-hash-txt-project/requirements.txt"
|
||||
expected-version: "0.8.3"
|
||||
- version-file: "__tests__/fixtures/.tool-versions"
|
||||
expected-version: "0.5.15"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install version 0.5.14
|
||||
id: setup-uv
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install version from ${{ matrix.input.version-file }}
|
||||
uses: ./
|
||||
with:
|
||||
working-directory: "__tests__/fixtures/pyproject-toml-project"
|
||||
version-file: ${{ matrix.input.version-file }}
|
||||
- name: Correct version gets installed
|
||||
run: |
|
||||
if [ "$(uv --version)" != "uv 0.5.14" ]; then
|
||||
if [ "$(uv --version)" != "uv ${{ matrix.input.expected-version }}" ]; then
|
||||
echo "Wrong uv version: $(uv --version)"
|
||||
exit 1
|
||||
fi
|
||||
@@ -131,7 +211,9 @@ jobs:
|
||||
test-malformed-pyproject-file-fallback:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install using malformed pyproject.toml
|
||||
id: setup-uv
|
||||
uses: ./
|
||||
@@ -139,38 +221,6 @@ jobs:
|
||||
working-directory: "__tests__/fixtures/malformed-pyproject-toml-project"
|
||||
- run: uv --help
|
||||
|
||||
test-uv-file-version:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install version 0.5.15
|
||||
id: setup-uv
|
||||
uses: ./
|
||||
with:
|
||||
working-directory: "__tests__/fixtures/uv-toml-project"
|
||||
- name: Correct version gets installed
|
||||
run: |
|
||||
if [ "$(uv --version)" != "uv 0.5.15" ]; then
|
||||
echo "Wrong uv version: $(uv --version)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test-version-file-version:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install from requirements file
|
||||
id: setup-uv
|
||||
uses: ./
|
||||
with:
|
||||
version-file: "__tests__/fixtures/uv-in-requirements-txt-project/requirements.txt"
|
||||
- name: Correct version gets installed
|
||||
run: |
|
||||
if [ "$(uv --version)" != "uv 0.6.17" ]; then
|
||||
echo "Wrong uv version: $(uv --version)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test-checksum:
|
||||
runs-on: ${{ matrix.inputs.os }}
|
||||
strategy:
|
||||
@@ -181,7 +231,9 @@ jobs:
|
||||
- os: macos-latest
|
||||
checksum: "a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Checksum matches expected
|
||||
uses: ./
|
||||
with:
|
||||
@@ -193,7 +245,9 @@ jobs:
|
||||
test-with-explicit-token:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install default version
|
||||
uses: ./
|
||||
with:
|
||||
@@ -204,7 +258,9 @@ jobs:
|
||||
test-uvx:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install default version
|
||||
uses: ./
|
||||
- run: uvx ruff --version
|
||||
@@ -213,15 +269,11 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
[
|
||||
ubuntu-latest,
|
||||
macos-latest,
|
||||
macos-14,
|
||||
windows-latest,
|
||||
]
|
||||
os: [ubuntu-latest, macos-latest, macos-14, windows-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install default version
|
||||
uses: ./
|
||||
- run: uv tool install ruff
|
||||
@@ -230,7 +282,9 @@ jobs:
|
||||
test-tilde-expansion-tool-dirs:
|
||||
runs-on: selfhosted-ubuntu-arm64
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup with cache
|
||||
uses: ./
|
||||
with:
|
||||
@@ -253,7 +307,9 @@ jobs:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install latest version
|
||||
uses: ./
|
||||
with:
|
||||
@@ -272,10 +328,13 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest, macos-latest, windows-latest ]
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install latest version
|
||||
id: setup-uv
|
||||
uses: ./
|
||||
with:
|
||||
python-version: 3.13.1t
|
||||
@@ -290,12 +349,27 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
shell: bash
|
||||
- name: Verify output venv is set
|
||||
run: |
|
||||
if [ -z "$UV_VENV" ]; then
|
||||
echo "output venv is not set"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d "$UV_VENV" ]; then
|
||||
echo "output venv not point to a directory: $UV_VENV"
|
||||
exit 1
|
||||
fi
|
||||
shell: bash
|
||||
env:
|
||||
UV_VENV: ${{ steps.setup-uv.outputs.venv }}
|
||||
|
||||
test-musl:
|
||||
runs-on: ubuntu-latest
|
||||
container: alpine
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install latest version
|
||||
uses: ./
|
||||
- run: uv sync
|
||||
@@ -305,10 +379,12 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
enable-cache: [ "true", "false", "auto" ]
|
||||
os: [ "ubuntu-latest", "selfhosted-ubuntu-arm64", "windows-latest" ]
|
||||
enable-cache: ["true", "false", "auto"]
|
||||
os: ["ubuntu-latest", "selfhosted-ubuntu-arm64", "windows-latest"]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup with cache
|
||||
uses: ./
|
||||
with:
|
||||
@@ -321,11 +397,13 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
enable-cache: [ "true", "false", "auto" ]
|
||||
os: [ "ubuntu-latest", "selfhosted-ubuntu-arm64", "windows-latest" ]
|
||||
enable-cache: ["true", "false", "auto"]
|
||||
os: ["ubuntu-latest", "selfhosted-ubuntu-arm64", "windows-latest"]
|
||||
needs: test-setup-cache
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Restore with cache
|
||||
id: restore
|
||||
uses: ./
|
||||
@@ -357,7 +435,9 @@ jobs:
|
||||
test-setup-cache-requirements-txt:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup with cache
|
||||
uses: ./
|
||||
with:
|
||||
@@ -369,9 +449,11 @@ jobs:
|
||||
working-directory: __tests__/fixtures/requirements-txt-project
|
||||
test-restore-cache-requirements-txt:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test-setup-cache
|
||||
needs: test-setup-cache-requirements-txt
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Restore with cache
|
||||
id: restore
|
||||
uses: ./
|
||||
@@ -393,7 +475,9 @@ jobs:
|
||||
test-setup-cache-dependency-glob:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup with cache
|
||||
uses: ./
|
||||
with:
|
||||
@@ -408,7 +492,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test-setup-cache-dependency-glob
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Change pyproject.toml
|
||||
run: |
|
||||
echo '[tool.uv]' >> __tests__/fixtures/uv-project/pyproject.toml
|
||||
@@ -431,6 +517,78 @@ jobs:
|
||||
env:
|
||||
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
|
||||
|
||||
test-setup-cache-save-cache-false:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup with cache
|
||||
uses: ./
|
||||
with:
|
||||
enable-cache: true
|
||||
save-cache: false
|
||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-save-cache-false
|
||||
- run: uv sync
|
||||
working-directory: __tests__/fixtures/uv-project
|
||||
shell: bash
|
||||
test-restore-cache-save-cache-false:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test-setup-cache-save-cache-false
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Restore with cache
|
||||
id: restore
|
||||
uses: ./
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-save-cache-false
|
||||
- name: Cache was not hit
|
||||
run: |
|
||||
if [ "$CACHE_HIT" == "true" ]; then
|
||||
exit 1
|
||||
fi
|
||||
env:
|
||||
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
|
||||
|
||||
test-setup-cache-restore-cache-false:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup with cache
|
||||
uses: ./
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-restore-cache-false
|
||||
- run: uv sync
|
||||
working-directory: __tests__/fixtures/uv-project
|
||||
shell: bash
|
||||
test-restore-cache-restore-cache-false:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test-setup-cache-restore-cache-false
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Restore with cache
|
||||
id: restore
|
||||
uses: ./
|
||||
with:
|
||||
enable-cache: true
|
||||
restore-cache: false
|
||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-setup-cache-restore-cache-false
|
||||
- name: Cache was not hit
|
||||
run: |
|
||||
if [ "$CACHE_HIT" == "true" ]; then
|
||||
exit 1
|
||||
fi
|
||||
env:
|
||||
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
|
||||
|
||||
test-cache-local:
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -443,10 +601,13 @@ jobs:
|
||||
expected-cache-dir: "/home/ubuntu/.cache/uv"
|
||||
runs-on: ${{ matrix.inputs.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup with cache
|
||||
uses: ./
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-cache-local
|
||||
- run: |
|
||||
if [ "$UV_CACHE_DIR" != "${{ matrix.inputs.expected-cache-dir }}" ]; then
|
||||
@@ -455,10 +616,31 @@ jobs:
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
test-cache-local-cache-disabled:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup without cache
|
||||
uses: ./
|
||||
with:
|
||||
enable-cache: false
|
||||
|
||||
- name: Check UV_CACHE_DIR is not set
|
||||
run: |
|
||||
if [ -n "$UV_CACHE_DIR" ]; then
|
||||
echo "UV_CACHE_DIR should not be set when cache is disabled: $UV_CACHE_DIR"
|
||||
exit 1
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
test-setup-cache-local:
|
||||
runs-on: selfhosted-ubuntu-arm64
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup with cache
|
||||
uses: ./
|
||||
with:
|
||||
@@ -471,7 +653,9 @@ jobs:
|
||||
runs-on: selfhosted-ubuntu-arm64
|
||||
needs: test-setup-cache-local
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Restore with cache
|
||||
id: restore
|
||||
uses: ./
|
||||
@@ -492,7 +676,9 @@ jobs:
|
||||
test-tilde-expansion-cache-local-path:
|
||||
runs-on: selfhosted-ubuntu-arm64
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Create cache directory
|
||||
run: mkdir -p ~/uv-cache
|
||||
shell: bash
|
||||
@@ -506,7 +692,9 @@ jobs:
|
||||
test-tilde-expansion-cache-dependency-glob:
|
||||
runs-on: selfhosted-ubuntu-arm64
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Create cache directory
|
||||
run: mkdir -p ~/uv-cache
|
||||
shell: bash
|
||||
@@ -539,7 +727,9 @@ jobs:
|
||||
test-no-python-version:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Fake pyproject.toml at root
|
||||
run: cp __tests__/fixtures/old-python-constraint-project/pyproject.toml pyproject.toml
|
||||
- name: Setup with cache
|
||||
@@ -552,7 +742,9 @@ jobs:
|
||||
test-custom-manifest-file:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install from custom manifest file
|
||||
uses: ./
|
||||
with:
|
||||
@@ -569,7 +761,9 @@ jobs:
|
||||
test-absolute-path:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Create requirements.txt
|
||||
run: echo "uv==0.6.17" > /tmp/setup-uv-requirements.txt
|
||||
- name: Install from requirements file
|
||||
@@ -584,17 +778,172 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test-relative-path:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: mkdir
|
||||
run: mkdir -p /tmp/setup-uv-test-relative-path
|
||||
- name: Create requirements.txt
|
||||
run: echo "uv==0.6.17" > /tmp/setup-uv-test-relative-path/setup-uv-requirements.txt
|
||||
- name: Install from requirements file
|
||||
id: setup-uv
|
||||
uses: ./
|
||||
with:
|
||||
version-file: "./setup-uv-requirements.txt"
|
||||
working-directory: "/tmp/setup-uv-test-relative-path"
|
||||
cache-dependency-glob: "./setup-uv-requirements.txt"
|
||||
- name: Correct version gets installed
|
||||
run: |
|
||||
if [ "$(uv --version)" != "uv 0.6.17" ]; then
|
||||
echo "Wrong uv version: $(uv --version)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test-cache-prune-force:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup uv
|
||||
uses: ./
|
||||
with:
|
||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-cache-prune-force
|
||||
- name: Create long running python script
|
||||
run: |
|
||||
echo 'import time' > __tests__/fixtures/uv-project/long-running.py
|
||||
echo 'time.sleep(300)' >> __tests__/fixtures/uv-project/long-running.py
|
||||
- run: uv run long-running.py &
|
||||
working-directory: __tests__/fixtures/uv-project
|
||||
|
||||
test-cache-dir-from-file:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Verify uv cache dir is not populated
|
||||
run: |
|
||||
if [ -f "/tmp/pyproject-toml-defined-cache-path/CACHEDIR.TAG" ]; then
|
||||
echo "Cache dir should not exist"
|
||||
exit 1
|
||||
fi
|
||||
- name: Setup uv
|
||||
uses: ./
|
||||
with:
|
||||
working-directory: __tests__/fixtures/cache-dir-defined-project
|
||||
- run: uv sync
|
||||
working-directory: __tests__/fixtures/cache-dir-defined-project
|
||||
- name: Verify uv cache dir is populated
|
||||
run: |
|
||||
if [ ! -f "/tmp/pyproject-toml-defined-cache-path/CACHEDIR.TAG" ]; then
|
||||
echo "Cache dir should exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test-cache-python-installs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Verify Python install dir is not populated
|
||||
run: |
|
||||
if [ -d /home/runner/work/_temp/uv-python-dir ]; then
|
||||
echo "Python install dir should not exist"
|
||||
exit 1
|
||||
fi
|
||||
- name: Setup uv with cache
|
||||
uses: ./
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-python: true
|
||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-cache-python-installs
|
||||
- run: uv sync --managed-python
|
||||
working-directory: __tests__/fixtures/uv-project
|
||||
- name: Verify Python install dir exists
|
||||
run: |
|
||||
if [ ! -d /home/runner/work/_temp/uv-python-dir ]; then
|
||||
echo "Python install dir should exist"
|
||||
exit 1
|
||||
fi
|
||||
test-restore-python-installs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test-cache-python-installs
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Verify Python install dir does not exist
|
||||
run: |
|
||||
if [ -d /home/runner/work/_temp/uv-python-dir ]; then
|
||||
echo "Python install dir should not exist"
|
||||
exit 1
|
||||
fi
|
||||
- name: Restore with cache
|
||||
id: restore
|
||||
uses: ./
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-python: true
|
||||
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}-test-cache-python-installs
|
||||
- name: Verify Python install dir exists
|
||||
run: |
|
||||
if [ ! -d /home/runner/work/_temp/uv-python-dir ]; then
|
||||
echo "Python install dir should exist"
|
||||
exit 1
|
||||
fi
|
||||
- name: Cache was hit
|
||||
run: |
|
||||
if [ "$CACHE_HIT" != "true" ]; then
|
||||
exit 1
|
||||
fi
|
||||
env:
|
||||
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
|
||||
- run: uv sync --managed-python
|
||||
working-directory: __tests__/fixtures/uv-project
|
||||
|
||||
test-python-install-dir:
|
||||
strategy:
|
||||
matrix:
|
||||
inputs:
|
||||
- os: ubuntu-latest
|
||||
expected-python-dir: "/home/runner/work/_temp/uv-python-dir"
|
||||
- os: windows-latest
|
||||
expected-python-dir: "D:\\a\\_temp\\uv-python-dir"
|
||||
- os: selfhosted-ubuntu-arm64
|
||||
expected-python-dir: "/home/ubuntu/.local/share/uv/python"
|
||||
runs-on: ${{ matrix.inputs.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install latest version
|
||||
id: setup-uv
|
||||
uses: ./
|
||||
- name: Check Python dir is expected dir
|
||||
run: |
|
||||
if [ "$UV_PYTHON_INSTALL_DIR" != "${{ matrix.inputs.expected-python-dir }}" ]; then
|
||||
echo "Wrong UV_PYTHON_INSTALL_DIR: UV_PYTHON_INSTALL_DIR"
|
||||
exit 1
|
||||
fi
|
||||
shell: bash
|
||||
- name: Install python works
|
||||
run: uv python install
|
||||
|
||||
all-tests-passed:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- lint
|
||||
- test-default-version
|
||||
- test-uv-no-modify-path
|
||||
- test-specific-version
|
||||
- test-semver-range
|
||||
- test-pep440-version
|
||||
- test-pyproject-file-version
|
||||
- test-latest-version
|
||||
- test-from-working-directory-version
|
||||
- test-malformed-pyproject-file-fallback
|
||||
- test-uv-file-version
|
||||
- test-version-file-version
|
||||
- test-checksum
|
||||
- test-with-explicit-token
|
||||
@@ -605,12 +954,17 @@ jobs:
|
||||
- test-activate-environment
|
||||
- test-musl
|
||||
- test-cache-local
|
||||
- test-cache-local-cache-disabled
|
||||
- test-setup-cache
|
||||
- test-restore-cache
|
||||
- test-setup-cache-requirements-txt
|
||||
- test-restore-cache-requirements-txt
|
||||
- test-setup-cache-dependency-glob
|
||||
- test-restore-cache-dependency-glob
|
||||
- test-setup-cache-save-cache-false
|
||||
- test-restore-cache-save-cache-false
|
||||
- test-setup-cache-restore-cache-false
|
||||
- test-restore-cache-restore-cache-false
|
||||
- test-setup-cache-local
|
||||
- test-restore-cache-local
|
||||
- test-tilde-expansion-cache-local-path
|
||||
@@ -619,10 +973,16 @@ jobs:
|
||||
- test-no-python-version
|
||||
- test-custom-manifest-file
|
||||
- test-absolute-path
|
||||
- test-relative-path
|
||||
- test-cache-prune-force
|
||||
- test-cache-dir-from-file
|
||||
- test-cache-python-installs
|
||||
- test-restore-python-installs
|
||||
- test-python-install-dir
|
||||
if: always()
|
||||
steps:
|
||||
- name: All tests passed
|
||||
run: |
|
||||
echo "All jobs passed: ${{ !contains(needs.*.result, 'failure') }}"
|
||||
echo "All jobs passed: ${{ !(contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) }}"
|
||||
# shellcheck disable=SC2242
|
||||
exit ${{ contains(needs.*.result, 'failure') && 1 || 0 }}
|
||||
exit ${{ (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) && 1 || 0 }}
|
||||
|
||||
43
.github/workflows/update-known-versions.yml
vendored
43
.github/workflows/update-known-versions.yml
vendored
@@ -3,6 +3,10 @@ on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 4 * * *" # Run every day at 4am UTC
|
||||
repository_dispatch:
|
||||
types: [ pypi_release ]
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -11,8 +15,10 @@ jobs:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: true
|
||||
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
||||
with:
|
||||
node-version: "20"
|
||||
- name: Update known versions
|
||||
@@ -22,16 +28,41 @@ jobs:
|
||||
src/download/checksum/known-checksums.ts
|
||||
version-manifest.json
|
||||
${{ secrets.GITHUB_TOKEN }}
|
||||
- run: npm install && npm run all
|
||||
- name: Check for changes
|
||||
id: changes-exist
|
||||
run: |
|
||||
git status --porcelain
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo "changes-exist=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "changes-exist=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
- name: Compile changes
|
||||
if: ${{ steps.changes-exist.outputs.changes-exist == 'true' }}
|
||||
run: npm ci && npm run all
|
||||
- name: Commit and push changes
|
||||
if: ${{ steps.changes-exist.outputs.changes-exist == 'true' }}
|
||||
id: commit-and-push
|
||||
continue-on-error: true
|
||||
run: |
|
||||
git config user.name "$GITHUB_ACTOR"
|
||||
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
||||
git add .
|
||||
git commit -m "chore: update known versions for $LATEST_VERSION"
|
||||
git push origin HEAD:refs/heads/main
|
||||
env:
|
||||
LATEST_VERSION: ${{ steps.update-known-versions.outputs.latest-version }}
|
||||
|
||||
- name: Create Pull Request
|
||||
if: ${{ steps.changes-exist.outputs.changes-exist == 'true' && steps.commit-and-push.outcome != 'success' }}
|
||||
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
||||
with:
|
||||
commit-message: "chore: update known versions"
|
||||
commit-message: "chore: update known checksums"
|
||||
title:
|
||||
"chore: update known versions for ${{
|
||||
"chore: update known checksums for ${{
|
||||
steps.update-known-versions.outputs.latest-version }}"
|
||||
body:
|
||||
"chore: update known versions for ${{
|
||||
"chore: update known checksums for ${{
|
||||
steps.update-known-versions.outputs.latest-version }}"
|
||||
base: main
|
||||
labels: "automated-pr,update-known-versions"
|
||||
|
||||
@@ -8,6 +8,8 @@ on:
|
||||
tags:
|
||||
- "v*.*.*"
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
update_major_minor_tags:
|
||||
name: Make sure major and minor tags are up to date on a patch release
|
||||
@@ -15,7 +17,9 @@ jobs:
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: true # needed for git push below
|
||||
- name: Update Major Minor Tags
|
||||
run: |
|
||||
set -x
|
||||
|
||||
3
.vscode/extensions.json
vendored
Normal file
3
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"recommendations": ["biomejs.biome"]
|
||||
}
|
||||
16
.vscode/settings.json
vendored
Normal file
16
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.action.useSortedAttributes.biome": "explicit",
|
||||
"source.action.useSortedKeys.biome": "explicit",
|
||||
"source.fixAll.biome": "explicit"
|
||||
},
|
||||
"editor.defaultFormatter": "biomejs.biome",
|
||||
"editor.formatOnSave": true,
|
||||
"explorer.excludeGitIgnore": false,
|
||||
"search.defaultViewMode": "list",
|
||||
"search.exclude": {
|
||||
"**/node_modules": true
|
||||
},
|
||||
"typescript.enablePromptUseWorkspaceTsdk": true,
|
||||
"typescript.tsdk": "node_modules/typescript/lib"
|
||||
}
|
||||
83
README.md
83
README.md
@@ -22,14 +22,18 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
|
||||
- [Validate checksum](#validate-checksum)
|
||||
- [Enable Caching](#enable-caching)
|
||||
- [Cache dependency glob](#cache-dependency-glob)
|
||||
- [Restore cache](#restore-cache)
|
||||
- [Save cache](#save-cache)
|
||||
- [Local cache path](#local-cache-path)
|
||||
- [Disable cache pruning](#disable-cache-pruning)
|
||||
- [Cache Python installs](#cache-python-installs)
|
||||
- [Ignore nothing to cache](#ignore-nothing-to-cache)
|
||||
- [GitHub authentication token](#github-authentication-token)
|
||||
- [UV_TOOL_DIR](#uv_tool_dir)
|
||||
- [UV_TOOL_BIN_DIR](#uv_tool_bin_dir)
|
||||
- [Tilde Expansion](#tilde-expansion)
|
||||
- [Manifest file](#manifest-file)
|
||||
- [Add problem matchers](#add-problem-matchers)
|
||||
- [How it works](#how-it-works)
|
||||
- [FAQ](#faq)
|
||||
|
||||
@@ -99,6 +103,8 @@ You can use the `version-file` input to specify a file that contains the version
|
||||
This can either be a `pyproject.toml` or `uv.toml` file which defines a `required-version` or
|
||||
uv defined as a dependency in `pyproject.toml` or `requirements.txt`.
|
||||
|
||||
[asdf](https://asdf-vm.com/) `.tool-versions` is also supported, but without the `ref` syntax.
|
||||
|
||||
```yaml
|
||||
- name: Install uv based on the version defined in pyproject.toml
|
||||
uses: astral-sh/setup-uv@v6
|
||||
@@ -120,7 +126,7 @@ This will override any python version specifications in `pyproject.toml` and `.p
|
||||
- run: uv pip install --python=3.13t pip
|
||||
```
|
||||
|
||||
You can combine this with a matrix to test multiple python versions:
|
||||
You can combine this with a matrix to test multiple Python versions:
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
@@ -128,9 +134,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
||||
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Install the latest version of uv and set the python version
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
@@ -193,6 +199,10 @@ are automatically verified by this action. The sha256 hashes can be found on the
|
||||
|
||||
### Enable caching
|
||||
|
||||
> [!NOTE]
|
||||
> The cache is pruned before it is uploaded to the GitHub Actions cache. This can lead to
|
||||
> a small or empty cache. See [Disable cache pruning](#disable-cache-pruning) for more details.
|
||||
|
||||
If you enable caching, the [uv cache](https://docs.astral.sh/uv/concepts/cache/) will be uploaded to
|
||||
the GitHub Actions cache. This can speed up runs that reuse the cache by several minutes.
|
||||
Caching is enabled by default on GitHub-hosted runners.
|
||||
@@ -241,6 +251,7 @@ changes. If you use relative paths, they are relative to the repository root.
|
||||
> **/*constraints*.in
|
||||
> **/pyproject.toml
|
||||
> **/uv.lock
|
||||
> **/*.py.lock
|
||||
> ```
|
||||
|
||||
```yaml
|
||||
@@ -277,13 +288,47 @@ changes. If you use relative paths, they are relative to the repository root.
|
||||
cache-dependency-glob: ""
|
||||
```
|
||||
|
||||
#### Restore cache
|
||||
|
||||
Restoring an existing cache can be enabled or disabled with the `restore-cache` input.
|
||||
By default, the cache will be restored.
|
||||
|
||||
```yaml
|
||||
- name: Don't restore an existing cache
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
restore-cache: false
|
||||
```
|
||||
|
||||
#### Save cache
|
||||
|
||||
You can also disable saving the cache after the run with the `save-cache` input.
|
||||
This can be useful to save cache storage when you know you will not use the cache of the run again.
|
||||
By default, the cache will be saved.
|
||||
|
||||
```yaml
|
||||
- name: Don't save the cache after the run
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
save-cache: false
|
||||
```
|
||||
|
||||
### Local cache path
|
||||
|
||||
This action controls where uv stores its cache on the runner's filesystem by setting `UV_CACHE_DIR`.
|
||||
If caching is enabled, this action controls where uv stores its cache on the runner's filesystem
|
||||
by setting `UV_CACHE_DIR`.
|
||||
|
||||
It defaults to `setup-uv-cache` in the `TMP` dir, `D:\a\_temp\uv-tool-dir` on Windows and
|
||||
`/tmp/setup-uv-cache` on Linux/macOS. You can change the default by specifying the path with the
|
||||
`cache-local-path` input.
|
||||
|
||||
> [!NOTE]
|
||||
> If the environment variable `UV_CACHE_DIR` is already set this action will not override it.
|
||||
> If you configured [cache-dir](https://docs.astral.sh/uv/reference/settings/#cache-dir) in your
|
||||
> config file then it is also respected and this action will not set `UV_CACHE_DIR`.
|
||||
|
||||
```yaml
|
||||
- name: Define a custom uv cache path
|
||||
uses: astral-sh/setup-uv@v6
|
||||
@@ -311,6 +356,20 @@ input.
|
||||
prune-cache: false
|
||||
```
|
||||
|
||||
### Cache Python installs
|
||||
|
||||
By default, the Python install dir (`uv python dir` / `UV_PYTHON_INSTALL_DIR`) is not cached,
|
||||
for the same reason that the dependency cache is pruned.
|
||||
If you want to cache Python installs along with your dependencies, set the `cache-python` input to `true`.
|
||||
|
||||
```yaml
|
||||
- name: Cache Python installs
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-python: true
|
||||
```
|
||||
|
||||
### Ignore nothing to cache
|
||||
|
||||
By default, the action will fail if caching is enabled but there is nothing to upload (the uv cache directory does not exist).
|
||||
@@ -396,6 +455,7 @@ If you want to change this behaviour (especially on self-hosted runners) you can
|
||||
|
||||
This action supports expanding the `~` character to the user's home directory for the following inputs:
|
||||
|
||||
- `version-file`
|
||||
- `cache-local-path`
|
||||
- `tool-dir`
|
||||
- `tool-bin-dir`
|
||||
@@ -449,6 +509,21 @@ This is useful if you maintain your own uv builds or want to override the defaul
|
||||
> This means the action will install the latest version available in the custom manifest file.
|
||||
> This is different from the default behavior of installing the latest version from the official uv releases.
|
||||
|
||||
### Add problem matchers
|
||||
|
||||
This action automatically adds
|
||||
[problem matchers](https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md)
|
||||
for python errors.
|
||||
|
||||
You can disable this by setting the `add-problem-matchers` input to `false`.
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv without problem matchers
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
add-problem-matchers: false
|
||||
```
|
||||
|
||||
## How it works
|
||||
|
||||
This action downloads uv from the uv repo's official
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { expect, test, it } from "@jest/globals";
|
||||
import { expect, it, test } from "@jest/globals";
|
||||
import {
|
||||
isknownVersion,
|
||||
validateChecksum,
|
||||
@@ -22,12 +22,12 @@ type KnownVersionFixture = { version: string; known: boolean };
|
||||
|
||||
it.each<KnownVersionFixture>([
|
||||
{
|
||||
version: "0.3.0",
|
||||
known: true,
|
||||
version: "0.3.0",
|
||||
},
|
||||
{
|
||||
version: "0.0.15",
|
||||
known: false,
|
||||
version: "0.0.15",
|
||||
},
|
||||
])(
|
||||
"isknownVersion should return $known for version $version",
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[
|
||||
{
|
||||
"version": "0.7.12-alpha.1",
|
||||
"artifactName": "uv-x86_64-unknown-linux-gnu.tar.gz",
|
||||
"arch": "x86_64",
|
||||
"artifactName": "uv-x86_64-unknown-linux-gnu.tar.gz",
|
||||
"downloadUrl": "https://release.pyx.dev/0.7.12-alpha.1/uv-x86_64-unknown-linux-gnu.tar.gz",
|
||||
"platform": "unknown-linux-gnu",
|
||||
"downloadUrl": "https://release.pyx.dev/0.7.12-alpha.1/uv-x86_64-unknown-linux-gnu.tar.gz"
|
||||
"version": "0.7.12-alpha.1"
|
||||
}
|
||||
]
|
||||
|
||||
1
__tests__/fixtures/.tool-versions
Normal file
1
__tests__/fixtures/.tool-versions
Normal file
@@ -0,0 +1 @@
|
||||
uv 0.5.15
|
||||
16
__tests__/fixtures/cache-dir-defined-project/pyproject.toml
Normal file
16
__tests__/fixtures/cache-dir-defined-project/pyproject.toml
Normal file
@@ -0,0 +1,16 @@
|
||||
[project]
|
||||
name = "uv-project"
|
||||
version = "0.1.0"
|
||||
description = "Add your description here"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.12"
|
||||
dependencies = [
|
||||
"ruff>=0.6.2",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.uv]
|
||||
cache-dir = "/tmp/pyproject-toml-defined-cache-path"
|
||||
@@ -0,0 +1,2 @@
|
||||
def hello() -> str:
|
||||
return "Hello from uv-project!"
|
||||
38
__tests__/fixtures/cache-dir-defined-project/uv.lock
generated
Normal file
38
__tests__/fixtures/cache-dir-defined-project/uv.lock
generated
Normal file
@@ -0,0 +1,38 @@
|
||||
version = 1
|
||||
requires-python = ">=3.12"
|
||||
|
||||
[[package]]
|
||||
name = "ruff"
|
||||
version = "0.6.2"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/23/f4/279d044f66b79261fd37df76bf72b64471afab5d3b7906a01499c4451910/ruff-0.6.2.tar.gz", hash = "sha256:239ee6beb9e91feb8e0ec384204a763f36cb53fb895a1a364618c6abb076b3be", size = 2460281 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/72/4b/47dd7a69287afb4069fa42c198e899463605460a58120196711bfcf0446b/ruff-0.6.2-py3-none-linux_armv6l.whl", hash = "sha256:5c8cbc6252deb3ea840ad6a20b0f8583caab0c5ef4f9cca21adc5a92b8f79f3c", size = 9695871 },
|
||||
{ url = "https://files.pythonhosted.org/packages/ae/c3/8aac62ac4638c14a740ee76a755a925f2d0d04580ab790a9887accb729f6/ruff-0.6.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:17002fe241e76544448a8e1e6118abecbe8cd10cf68fde635dad480dba594570", size = 9459354 },
|
||||
{ url = "https://files.pythonhosted.org/packages/2f/cf/77fbd8d4617b9b9c503f9bffb8552c4e3ea1a58dc36975e7a9104ffb0f85/ruff-0.6.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:3dbeac76ed13456f8158b8f4fe087bf87882e645c8e8b606dd17b0b66c2c1158", size = 9163871 },
|
||||
{ url = "https://files.pythonhosted.org/packages/05/1c/765192bab32b79efbb498b06f0b9dcb3629112b53b8777ae1d19b8209e09/ruff-0.6.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:094600ee88cda325988d3f54e3588c46de5c18dae09d683ace278b11f9d4d534", size = 10096250 },
|
||||
{ url = "https://files.pythonhosted.org/packages/08/d0/86f3cb0f6934c99f759c232984a5204d67a26745cad2d9edff6248adf7d2/ruff-0.6.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:316d418fe258c036ba05fbf7dfc1f7d3d4096db63431546163b472285668132b", size = 9475376 },
|
||||
{ url = "https://files.pythonhosted.org/packages/cd/cc/4c8d0e225b559a3fae6092ec310d7150d3b02b4669e9223f783ef64d82c0/ruff-0.6.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d72b8b3abf8a2d51b7b9944a41307d2f442558ccb3859bbd87e6ae9be1694a5d", size = 10295634 },
|
||||
{ url = "https://files.pythonhosted.org/packages/db/96/d2699cfb1bb5a01c68122af43454c76c31331e1c8a9bd97d653d7c82524b/ruff-0.6.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:2aed7e243be68487aa8982e91c6e260982d00da3f38955873aecd5a9204b1d66", size = 11024941 },
|
||||
{ url = "https://files.pythonhosted.org/packages/8b/a9/6ecd66af8929e0f2a1ed308a4137f3521789f28f0eb97d32c2ca3aa7000c/ruff-0.6.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d371f7fc9cec83497fe7cf5eaf5b76e22a8efce463de5f775a1826197feb9df8", size = 10606894 },
|
||||
{ url = "https://files.pythonhosted.org/packages/e4/73/2ee4cd19f44992fedac1cc6db9e3d825966072f6dcbd4032f21cbd063170/ruff-0.6.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8f310d63af08f583363dfb844ba8f9417b558199c58a5999215082036d795a1", size = 11552886 },
|
||||
{ url = "https://files.pythonhosted.org/packages/60/4c/c0f1cd35ce4a93c54a6bb1ee6934a3a205fa02198dd076678193853ceea1/ruff-0.6.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7db6880c53c56addb8638fe444818183385ec85eeada1d48fc5abe045301b2f1", size = 10264945 },
|
||||
{ url = "https://files.pythonhosted.org/packages/c4/89/e45c9359b9cdd4245512ea2b9f2bb128a997feaa5f726fc9e8c7a66afadf/ruff-0.6.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:1175d39faadd9a50718f478d23bfc1d4da5743f1ab56af81a2b6caf0a2394f23", size = 10100007 },
|
||||
{ url = "https://files.pythonhosted.org/packages/06/74/0bd4e0a7ed5f6908df87892f9bf60a2356c0fd74102d8097298bd9b4f346/ruff-0.6.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:5b939f9c86d51635fe486585389f54582f0d65b8238e08c327c1534844b3bb9a", size = 9559267 },
|
||||
{ url = "https://files.pythonhosted.org/packages/54/03/3dc6dc9419f276f05805bf888c279e3e0b631284abd548d9e87cebb93aec/ruff-0.6.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:d0d62ca91219f906caf9b187dea50d17353f15ec9bb15aae4a606cd697b49b4c", size = 9905304 },
|
||||
{ url = "https://files.pythonhosted.org/packages/5c/5b/d6a72a6a6bbf097c09de468326ef5fa1c9e7aa5e6e45979bc0d984b0dbe7/ruff-0.6.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:7438a7288f9d67ed3c8ce4d059e67f7ed65e9fe3aa2ab6f5b4b3610e57e3cb56", size = 10341480 },
|
||||
{ url = "https://files.pythonhosted.org/packages/79/a9/0f2f21fe15ba537c46598f96aa9ae4a3d4b9ec64926664617ca6a8c772f4/ruff-0.6.2-py3-none-win32.whl", hash = "sha256:279d5f7d86696df5f9549b56b9b6a7f6c72961b619022b5b7999b15db392a4da", size = 7961901 },
|
||||
{ url = "https://files.pythonhosted.org/packages/b0/80/fff12ffe11853d9f4ea3e5221e6dd2e93640a161c05c9579833e09ad40a7/ruff-0.6.2-py3-none-win_amd64.whl", hash = "sha256:d9f3469c7dd43cd22eb1c3fc16926fb8258d50cb1b216658a07be95dd117b0f2", size = 8783320 },
|
||||
{ url = "https://files.pythonhosted.org/packages/56/91/577cdd64cce5e74d3f8b5ecb93f29566def569c741eb008aed4f331ef821/ruff-0.6.2-py3-none-win_arm64.whl", hash = "sha256:f28fcd2cd0e02bdf739297516d5643a945cc7caf09bd9bcb4d932540a5ea4fa9", size = 8225886 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uv-project"
|
||||
version = "0.1.0"
|
||||
source = { editable = "." }
|
||||
dependencies = [
|
||||
{ name = "ruff" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [{ name = "ruff" }]
|
||||
@@ -0,0 +1 @@
|
||||
print("Hello world")
|
||||
@@ -0,0 +1,33 @@
|
||||
# This file was autogenerated by uv via the following command:
|
||||
# uv pip compile --generate-hashes - -o ex-requirements.txt
|
||||
click==8.2.1 \
|
||||
--hash=sha256:27c491cc05d968d271d5a1db13e3b5a184636d9d930f148c50b038f0d0646202 \
|
||||
--hash=sha256:61a3265b914e850b85317d0b3109c7f8cd35a670f963866005d6ef1d5175a12b
|
||||
# via uvicorn
|
||||
h11==0.16.0 \
|
||||
--hash=sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1 \
|
||||
--hash=sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86
|
||||
# via uvicorn
|
||||
uv==0.8.3 \
|
||||
--hash=sha256:1121ad1c9389b865d029385031d3fd7d90d343c92a2149a4d4aa20bf469cb27f \
|
||||
--hash=sha256:17bcdb0615e37cc5f985f7d7546f755ac6343c1dc8bbe876c892437f14f8f904 \
|
||||
--hash=sha256:2ccaae4c749126c99f6404d67a0ae1eae29cbafb05603d09094a775061fdf4e5 \
|
||||
--hash=sha256:2e311c029bff2ca07c6ddf877ccc5935cabb78e09b94b53a849542665b6a6fa1 \
|
||||
--hash=sha256:391c97577048a40fd8c85b370055df6420f26e81df7fa906f0e0ce1aa2af3527 \
|
||||
--hash=sha256:3f904f574dc2d7aa1d96ddf2483480ecd121dc9d060108cadd8bff100b754b64 \
|
||||
--hash=sha256:526f2c3bd6f311ce31f6f7b6b7d818b191f41e76bed3aaab671b716220c02d8f \
|
||||
--hash=sha256:5313ee776ad65731ffa8ac585246f987d3a2bf72e6153c12add1fff22ad6e500 \
|
||||
--hash=sha256:5843cc43bafad05cc710d8e31bd347ee37202462a63d32c30746e9df48cfbda2 \
|
||||
--hash=sha256:76de331a07e5ae9b6490e70a9439a072b91b3167a5684510af10c2752c4ece9a \
|
||||
--hash=sha256:8486f7576d15cc73509f93f47b3190f44701ea36839906369301b58c8604d5db \
|
||||
--hash=sha256:8b16f1bddfdf8f7470924ab34a7b55e4c372d5340c7c1e47e7fc84a743dc541f \
|
||||
--hash=sha256:966ec7d7f57521fef0fee685d71e183c9cafb358ddcfe27519dfeaf40550f247 \
|
||||
--hash=sha256:989898caeb6e972979543b57547d1c28ab8af81ff8fc15921fd354c17d432749 \
|
||||
--hash=sha256:9ce7981f4fbeecf93dc5cf0a5a7915e84956fd99ad3ac977c048fe0cfdb1a17e \
|
||||
--hash=sha256:ad13453ab0a1dfa64a221aac8f52199efdcaa52c97134fffd7bcebed794a6f4b \
|
||||
--hash=sha256:ae7efe91dcfc24126fa91e0fb69a1daf6c0e494a781ba192bb0cc62d7ab623ee \
|
||||
--hash=sha256:daa6e0d657a94f20e962d4a03d833ef7af5c8e51b7c8a2d92ba6cf64a4c07ac1 \
|
||||
--hash=sha256:f1eb7c896fc0d80ed534748aaf46697b6ebc8ce401f1c51666ce0b9923c3db9a
|
||||
uvicorn==0.35.0 \
|
||||
--hash=sha256:197535216b25ff9b785e29a0b79199f55222193d47f820816e7da751e9bc8d4a \
|
||||
--hash=sha256:bc662f087f7cf2ce11a1d7fd70b90c9f98ef2e2831556dd078d131b96cc94a01
|
||||
86
__tests__/utils/inputs.test.ts
Normal file
86
__tests__/utils/inputs.test.ts
Normal file
@@ -0,0 +1,86 @@
|
||||
jest.mock("@actions/core", () => {
|
||||
return {
|
||||
debug: jest.fn(),
|
||||
getBooleanInput: jest.fn(
|
||||
(name: string) => (mockInputs[name] ?? "") === "true",
|
||||
),
|
||||
getInput: jest.fn((name: string) => mockInputs[name] ?? ""),
|
||||
};
|
||||
});
|
||||
|
||||
import {
|
||||
afterEach,
|
||||
beforeEach,
|
||||
describe,
|
||||
expect,
|
||||
it,
|
||||
jest,
|
||||
} from "@jest/globals";
|
||||
|
||||
// Will be mutated per test before (re-)importing the module under test
|
||||
let mockInputs: Record<string, string> = {};
|
||||
const ORIGINAL_HOME = process.env.HOME;
|
||||
|
||||
describe("cacheDependencyGlob", () => {
|
||||
beforeEach(() => {
|
||||
jest.resetModules();
|
||||
mockInputs = {};
|
||||
process.env.HOME = "/home/testuser";
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
process.env.HOME = ORIGINAL_HOME;
|
||||
});
|
||||
|
||||
it("returns empty string when input not provided", async () => {
|
||||
mockInputs["working-directory"] = "/workspace";
|
||||
const { cacheDependencyGlob } = await import("../../src/utils/inputs");
|
||||
expect(cacheDependencyGlob).toBe("");
|
||||
});
|
||||
|
||||
it("resolves a single relative path", async () => {
|
||||
mockInputs["working-directory"] = "/workspace";
|
||||
mockInputs["cache-dependency-glob"] = "requirements.txt";
|
||||
const { cacheDependencyGlob } = await import("../../src/utils/inputs");
|
||||
expect(cacheDependencyGlob).toBe("/workspace/requirements.txt");
|
||||
});
|
||||
|
||||
it("strips leading ./ from relative path", async () => {
|
||||
mockInputs["working-directory"] = "/workspace";
|
||||
mockInputs["cache-dependency-glob"] = "./uv.lock";
|
||||
const { cacheDependencyGlob } = await import("../../src/utils/inputs");
|
||||
expect(cacheDependencyGlob).toBe("/workspace/uv.lock");
|
||||
});
|
||||
|
||||
it("handles multiple lines, trimming whitespace, tilde expansion and absolute paths", async () => {
|
||||
mockInputs["working-directory"] = "/workspace";
|
||||
mockInputs["cache-dependency-glob"] =
|
||||
" ~/.cache/file1\n ./rel/file2 \nfile3.txt";
|
||||
const { cacheDependencyGlob } = await import("../../src/utils/inputs");
|
||||
expect(cacheDependencyGlob).toBe(
|
||||
[
|
||||
"/home/testuser/.cache/file1", // expanded tilde, absolute path unchanged
|
||||
"/workspace/rel/file2", // ./ stripped and resolved
|
||||
"/workspace/file3.txt", // relative path resolved
|
||||
].join("\n"),
|
||||
);
|
||||
});
|
||||
|
||||
it("keeps absolute path unchanged in multiline input", async () => {
|
||||
mockInputs["working-directory"] = "/workspace";
|
||||
mockInputs["cache-dependency-glob"] = "/abs/path.lock\nrelative.lock";
|
||||
const { cacheDependencyGlob } = await import("../../src/utils/inputs");
|
||||
expect(cacheDependencyGlob).toBe(
|
||||
["/abs/path.lock", "/workspace/relative.lock"].join("\n"),
|
||||
);
|
||||
});
|
||||
|
||||
it("handles exclusions in relative paths correct", async () => {
|
||||
mockInputs["working-directory"] = "/workspace";
|
||||
mockInputs["cache-dependency-glob"] = "!/abs/path.lock\n!relative.lock";
|
||||
const { cacheDependencyGlob } = await import("../../src/utils/inputs");
|
||||
expect(cacheDependencyGlob).toBe(
|
||||
["!/abs/path.lock", "!/workspace/relative.lock"].join("\n"),
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -1,6 +1,5 @@
|
||||
import { getUvVersionFromFile } from "../../src/version/resolve";
|
||||
|
||||
import { expect, test } from "@jest/globals";
|
||||
import { getUvVersionFromFile } from "../../src/version/resolve";
|
||||
|
||||
test("ignores dependencies starting with uv", async () => {
|
||||
const parsedVersion = getUvVersionFromFile(
|
||||
|
||||
9
__tests__/version/requirements-hashes-file.test.ts
Normal file
9
__tests__/version/requirements-hashes-file.test.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { expect, test } from "@jest/globals";
|
||||
import { getUvVersionFromFile } from "../../src/version/resolve";
|
||||
|
||||
test("ignores dependencies starting with uv", async () => {
|
||||
const parsedVersion = getUvVersionFromFile(
|
||||
"__tests__/fixtures/uv-in-requirements-hash-txt-project/requirements.txt",
|
||||
);
|
||||
expect(parsedVersion).toBe("0.8.3");
|
||||
});
|
||||
115
__tests__/version/tool-versions-file.test.ts
Normal file
115
__tests__/version/tool-versions-file.test.ts
Normal file
@@ -0,0 +1,115 @@
|
||||
jest.mock("node:fs");
|
||||
jest.mock("@actions/core", () => ({
|
||||
warning: jest.fn(),
|
||||
}));
|
||||
|
||||
import fs from "node:fs";
|
||||
import * as core from "@actions/core";
|
||||
import { beforeEach, describe, expect, it, jest } from "@jest/globals";
|
||||
import { getUvVersionFromToolVersions } from "../../src/version/tool-versions-file";
|
||||
|
||||
const mockedFs = fs as jest.Mocked<typeof fs>;
|
||||
const mockedCore = core as jest.Mocked<typeof core>;
|
||||
|
||||
describe("getUvVersionFromToolVersions", () => {
|
||||
beforeEach(() => {
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
it("should return undefined for non-.tool-versions files", () => {
|
||||
const result = getUvVersionFromToolVersions("package.json");
|
||||
expect(result).toBeUndefined();
|
||||
expect(mockedFs.readFileSync).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("should return version for valid uv entry", () => {
|
||||
const fileContent = "python 3.11.0\nuv 0.1.0\nnodejs 18.0.0";
|
||||
mockedFs.readFileSync.mockReturnValue(fileContent);
|
||||
|
||||
const result = getUvVersionFromToolVersions(".tool-versions");
|
||||
|
||||
expect(result).toBe("0.1.0");
|
||||
expect(mockedFs.readFileSync).toHaveBeenCalledWith(
|
||||
".tool-versions",
|
||||
"utf8",
|
||||
);
|
||||
});
|
||||
|
||||
it("should return version for uv entry with v prefix", () => {
|
||||
const fileContent = "uv v0.2.0";
|
||||
mockedFs.readFileSync.mockReturnValue(fileContent);
|
||||
|
||||
const result = getUvVersionFromToolVersions(".tool-versions");
|
||||
|
||||
expect(result).toBe("0.2.0");
|
||||
});
|
||||
|
||||
it("should handle whitespace around uv entry", () => {
|
||||
const fileContent = " uv 0.3.0 ";
|
||||
mockedFs.readFileSync.mockReturnValue(fileContent);
|
||||
|
||||
const result = getUvVersionFromToolVersions(".tool-versions");
|
||||
|
||||
expect(result).toBe("0.3.0");
|
||||
});
|
||||
|
||||
it("should skip commented lines", () => {
|
||||
const fileContent = "# uv 0.1.0\npython 3.11.0\nuv 0.2.0";
|
||||
mockedFs.readFileSync.mockReturnValue(fileContent);
|
||||
|
||||
const result = getUvVersionFromToolVersions(".tool-versions");
|
||||
|
||||
expect(result).toBe("0.2.0");
|
||||
});
|
||||
|
||||
it("should return first matching uv version", () => {
|
||||
const fileContent = "uv 0.1.0\npython 3.11.0\nuv 0.2.0";
|
||||
mockedFs.readFileSync.mockReturnValue(fileContent);
|
||||
|
||||
const result = getUvVersionFromToolVersions(".tool-versions");
|
||||
|
||||
expect(result).toBe("0.1.0");
|
||||
});
|
||||
|
||||
it("should return undefined when no uv entry found", () => {
|
||||
const fileContent = "python 3.11.0\nnodejs 18.0.0";
|
||||
mockedFs.readFileSync.mockReturnValue(fileContent);
|
||||
|
||||
const result = getUvVersionFromToolVersions(".tool-versions");
|
||||
|
||||
expect(result).toBeUndefined();
|
||||
});
|
||||
|
||||
it("should return undefined for empty file", () => {
|
||||
mockedFs.readFileSync.mockReturnValue("");
|
||||
|
||||
const result = getUvVersionFromToolVersions(".tool-versions");
|
||||
|
||||
expect(result).toBeUndefined();
|
||||
});
|
||||
|
||||
it("should warn and return undefined for ref syntax", () => {
|
||||
const fileContent = "uv ref:main";
|
||||
mockedFs.readFileSync.mockReturnValue(fileContent);
|
||||
|
||||
const result = getUvVersionFromToolVersions(".tool-versions");
|
||||
|
||||
expect(result).toBeUndefined();
|
||||
expect(mockedCore.warning).toHaveBeenCalledWith(
|
||||
"The ref syntax of .tool-versions is not supported. Please use a released version instead.",
|
||||
);
|
||||
});
|
||||
|
||||
it("should handle file path with .tool-versions extension", () => {
|
||||
const fileContent = "uv 0.1.0";
|
||||
mockedFs.readFileSync.mockReturnValue(fileContent);
|
||||
|
||||
const result = getUvVersionFromToolVersions("path/to/.tool-versions");
|
||||
|
||||
expect(result).toBe("0.1.0");
|
||||
expect(mockedFs.readFileSync).toHaveBeenCalledWith(
|
||||
"path/to/.tool-versions",
|
||||
"utf8",
|
||||
);
|
||||
});
|
||||
});
|
||||
21
action.yml
21
action.yml
@@ -21,10 +21,6 @@ inputs:
|
||||
checksum:
|
||||
description: "The checksum of the uv version to install"
|
||||
required: false
|
||||
server-url:
|
||||
description: "(Deprecated) The server url to use when downloading uv"
|
||||
required: false
|
||||
default: "https://github.com"
|
||||
github-token:
|
||||
description:
|
||||
"Used to increase the rate limit when retrieving versions and downloading uv."
|
||||
@@ -44,6 +40,13 @@ inputs:
|
||||
**/*constraints*.in
|
||||
**/pyproject.toml
|
||||
**/uv.lock
|
||||
**/*.py.lock
|
||||
restore-cache:
|
||||
description: "Whether to restore the cache if found."
|
||||
default: "true"
|
||||
save-cache:
|
||||
description: "Whether to save the cache after the run."
|
||||
default: "true"
|
||||
cache-suffix:
|
||||
description: "Suffix for the cache key"
|
||||
required: false
|
||||
@@ -53,6 +56,9 @@ inputs:
|
||||
prune-cache:
|
||||
description: "Prune cache before saving."
|
||||
default: "true"
|
||||
cache-python:
|
||||
description: "Upload managed Python installations to the Github Actions cache."
|
||||
default: "false"
|
||||
ignore-nothing-to-cache:
|
||||
description: "Ignore when nothing is found to cache."
|
||||
default: "false"
|
||||
@@ -68,6 +74,9 @@ inputs:
|
||||
manifest-file:
|
||||
description: "URL to the manifest file containing available versions and download URLs."
|
||||
required: false
|
||||
add-problem-matchers:
|
||||
description: "Add problem matchers."
|
||||
default: "true"
|
||||
outputs:
|
||||
uv-version:
|
||||
description: "The installed uv version. Useful when using latest."
|
||||
@@ -77,8 +86,10 @@ outputs:
|
||||
description: "The path to the installed uvx binary."
|
||||
cache-hit:
|
||||
description: "A boolean value to indicate a cache entry was found"
|
||||
venv:
|
||||
description: "Path to the activated venv if activate-environment is true"
|
||||
runs:
|
||||
using: "node20"
|
||||
using: "node24"
|
||||
main: "dist/setup/index.js"
|
||||
post: "dist/save-cache/index.js"
|
||||
post-if: success()
|
||||
|
||||
39
biome.json
39
biome.json
@@ -1,20 +1,34 @@
|
||||
{
|
||||
"$schema": "https://biomejs.dev/schemas/1.9.2/schema.json",
|
||||
"vcs": {
|
||||
"enabled": true,
|
||||
"clientKind": "git",
|
||||
"useIgnoreFile": false
|
||||
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
|
||||
"assist": {
|
||||
"actions": {
|
||||
"source": {
|
||||
"organizeImports": "on",
|
||||
"useSortedAttributes": "on",
|
||||
"useSortedKeys": "on"
|
||||
}
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"ignoreUnknown": false,
|
||||
"ignore": ["dist", "lib", "node_modules"]
|
||||
"includes": [
|
||||
"**",
|
||||
"!**/dist",
|
||||
"!**/lib",
|
||||
"!**/node_modules",
|
||||
"!**/package*.json",
|
||||
"!**/known-checksums.*"
|
||||
]
|
||||
},
|
||||
"formatter": {
|
||||
"enabled": true,
|
||||
"indentStyle": "space"
|
||||
},
|
||||
"organizeImports": {
|
||||
"enabled": true
|
||||
"javascript": {
|
||||
"formatter": {
|
||||
"quoteStyle": "double",
|
||||
"trailingCommas": "all"
|
||||
}
|
||||
},
|
||||
"linter": {
|
||||
"enabled": true,
|
||||
@@ -22,10 +36,9 @@
|
||||
"recommended": true
|
||||
}
|
||||
},
|
||||
"javascript": {
|
||||
"formatter": {
|
||||
"quoteStyle": "double",
|
||||
"trailingCommas": "all"
|
||||
}
|
||||
"vcs": {
|
||||
"clientKind": "git",
|
||||
"enabled": true,
|
||||
"useIgnoreFile": false
|
||||
}
|
||||
}
|
||||
|
||||
3392
dist/save-cache/index.js
generated
vendored
3392
dist/save-cache/index.js
generated
vendored
File diff suppressed because it is too large
Load Diff
8493
dist/setup/index.js
generated
vendored
8493
dist/setup/index.js
generated
vendored
File diff suppressed because one or more lines are too long
6475
dist/update-known-versions/index.js
generated
vendored
6475
dist/update-known-versions/index.js
generated
vendored
File diff suppressed because one or more lines are too long
7436
package-lock.json
generated
7436
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
32
package.json
32
package.json
@@ -6,14 +6,12 @@
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"format": "biome format --fix",
|
||||
"format-check": "biome format",
|
||||
"lint": "biome lint --fix",
|
||||
"check": "biome check --write",
|
||||
"package": "ncc build -o dist/setup src/setup-uv.ts && ncc build -o dist/save-cache src/save-cache.ts && ncc build -o dist/update-known-versions src/update-known-versions.ts",
|
||||
"test": "jest",
|
||||
"act": "act pull_request -W .github/workflows/test.yml --container-architecture linux/amd64 -s GITHUB_TOKEN=\"$(gh auth token)\"",
|
||||
"update-known-versions": "RUNNER_TEMP=known_versions node dist/update-known-versions/index.js src/download/checksum/known-versions.ts \"$(gh auth token)\"",
|
||||
"all": "npm run build && npm run format && npm run lint && npm run package && npm test"
|
||||
"all": "npm run build && npm run check && npm run package && npm test"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -23,28 +21,28 @@
|
||||
"author": "@eifinger",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/cache": "^4.0.3",
|
||||
"@actions/cache": "^4.0.5",
|
||||
"@actions/core": "^1.11.1",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/glob": "^0.5.0",
|
||||
"@actions/io": "^1.1.3",
|
||||
"@actions/tool-cache": "^2.0.2",
|
||||
"@octokit/core": "^7.0.2",
|
||||
"@octokit/core": "^7.0.5",
|
||||
"@octokit/plugin-paginate-rest": "^13.1.1",
|
||||
"@octokit/plugin-rest-endpoint-methods": "^16.0.0",
|
||||
"@renovatebot/pep440": "^4.1.0",
|
||||
"smol-toml": "^1.3.4",
|
||||
"undici": "^7.10.0"
|
||||
"@octokit/plugin-rest-endpoint-methods": "^16.1.0",
|
||||
"@renovatebot/pep440": "^4.2.1",
|
||||
"smol-toml": "^1.4.2",
|
||||
"undici": "^7.16.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "1.9.4",
|
||||
"@biomejs/biome": "2.2.4",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/node": "^24.0.14",
|
||||
"@types/semver": "^7.7.0",
|
||||
"@vercel/ncc": "^0.38.3",
|
||||
"jest": "^29.7.0",
|
||||
"@types/node": "^24.7.0",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@vercel/ncc": "^0.38.4",
|
||||
"jest": "^30.1.3",
|
||||
"js-yaml": "^4.1.0",
|
||||
"ts-jest": "^29.4.0",
|
||||
"typescript": "^5.8.3"
|
||||
"ts-jest": "^29.4.4",
|
||||
"typescript": "^5.9.2"
|
||||
}
|
||||
}
|
||||
|
||||
26
src/cache/restore-cache.ts
vendored
26
src/cache/restore-cache.ts
vendored
@@ -1,16 +1,19 @@
|
||||
import * as cache from "@actions/cache";
|
||||
import * as core from "@actions/core";
|
||||
import * as exec from "@actions/exec";
|
||||
import { hashFiles } from "../hash/hash-files";
|
||||
import {
|
||||
cacheDependencyGlob,
|
||||
cacheLocalPath,
|
||||
cachePython,
|
||||
cacheSuffix,
|
||||
pruneCache,
|
||||
pythonDir,
|
||||
pythonVersion as pythonVersionInput,
|
||||
restoreCache as shouldRestoreCache,
|
||||
workingDirectory,
|
||||
} from "../utils/inputs";
|
||||
import { getArch, getPlatform } from "../utils/platforms";
|
||||
import { hashFiles } from "../hash/hash-files";
|
||||
import * as exec from "@actions/exec";
|
||||
|
||||
export const STATE_CACHE_KEY = "cache-key";
|
||||
export const STATE_CACHE_MATCHED_KEY = "cache-matched-key";
|
||||
@@ -18,13 +21,23 @@ const CACHE_VERSION = "1";
|
||||
|
||||
export async function restoreCache(): Promise<void> {
|
||||
const cacheKey = await computeKeys();
|
||||
core.saveState(STATE_CACHE_KEY, cacheKey);
|
||||
|
||||
if (!shouldRestoreCache) {
|
||||
core.info("restore-cache is false. Skipping restore cache step.");
|
||||
return;
|
||||
}
|
||||
|
||||
let matchedKey: string | undefined;
|
||||
core.info(
|
||||
`Trying to restore uv cache from GitHub Actions cache with key: ${cacheKey}`,
|
||||
);
|
||||
const cachePaths = [cacheLocalPath];
|
||||
if (cachePython) {
|
||||
cachePaths.push(pythonDir);
|
||||
}
|
||||
try {
|
||||
matchedKey = await cache.restoreCache([cacheLocalPath], cacheKey);
|
||||
matchedKey = await cache.restoreCache(cachePaths, cacheKey);
|
||||
} catch (err) {
|
||||
const message = (err as Error).message;
|
||||
core.warning(message);
|
||||
@@ -32,8 +45,6 @@ export async function restoreCache(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
core.saveState(STATE_CACHE_KEY, cacheKey);
|
||||
|
||||
handleMatchResult(matchedKey, cacheKey);
|
||||
}
|
||||
|
||||
@@ -57,7 +68,8 @@ async function computeKeys(): Promise<string> {
|
||||
const pythonVersion = await getPythonVersion();
|
||||
const platform = await getPlatform();
|
||||
const pruned = pruneCache ? "-pruned" : "";
|
||||
return `setup-uv-${CACHE_VERSION}-${getArch()}-${platform}-${pythonVersion}${pruned}${cacheDependencyPathHash}${suffix}`;
|
||||
const python = cachePython ? "-py" : "";
|
||||
return `setup-uv-${CACHE_VERSION}-${getArch()}-${platform}-${pythonVersion}${pruned}${python}${cacheDependencyPathHash}${suffix}`;
|
||||
}
|
||||
|
||||
async function getPythonVersion(): Promise<string> {
|
||||
@@ -67,12 +79,12 @@ async function getPythonVersion(): Promise<string> {
|
||||
|
||||
let output = "";
|
||||
const options: exec.ExecOptions = {
|
||||
silent: !core.isDebug(),
|
||||
listeners: {
|
||||
stdout: (data: Buffer) => {
|
||||
output += data.toString();
|
||||
},
|
||||
},
|
||||
silent: !core.isDebug(),
|
||||
};
|
||||
|
||||
try {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import * as fs from "node:fs";
|
||||
import * as crypto from "node:crypto";
|
||||
import * as fs from "node:fs";
|
||||
|
||||
import * as core from "@actions/core";
|
||||
import { KNOWN_CHECKSUMS } from "./known-checksums";
|
||||
import type { Architecture, Platform } from "../../utils/platforms";
|
||||
import { KNOWN_CHECKSUMS } from "./known-checksums";
|
||||
|
||||
export async function validateChecksum(
|
||||
checkSum: string | undefined,
|
||||
@@ -12,7 +12,7 @@ export async function validateChecksum(
|
||||
platform: Platform,
|
||||
version: string,
|
||||
): Promise<void> {
|
||||
let isValid: boolean | undefined = undefined;
|
||||
let isValid: boolean | undefined;
|
||||
if (checkSum !== undefined && checkSum !== "") {
|
||||
isValid = await validateFileCheckSum(downloadPath, checkSum);
|
||||
} else {
|
||||
|
||||
@@ -1,5 +1,909 @@
|
||||
// AUTOGENERATED_DO_NOT_EDIT
|
||||
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
|
||||
"aarch64-apple-darwin-0.9.2":
|
||||
"90b1e69da3d04772565dd556ae8e72c86bdb7da85a8dfc2c6b50c400b0e6aa97",
|
||||
"aarch64-pc-windows-msvc-0.9.2":
|
||||
"b28ae90188f00c6d9e6f32fe252ace25a3698eeca1458d435ac1ca55049607ff",
|
||||
"aarch64-unknown-linux-gnu-0.9.2":
|
||||
"0f0ecf2abcb50f8fb5d2b52c8095af4c133897086e3f2e0259f4fcb3d8ddf273",
|
||||
"aarch64-unknown-linux-musl-0.9.2":
|
||||
"1456894c855d38a56d541b201abae306780d8494c3a3497aff2815abd3eba12f",
|
||||
"arm-unknown-linux-musleabihf-0.9.2":
|
||||
"f6a969f0506b4d9e1d73d223243457825a2544ef9cd8dabc0a8e7e7bea697a62",
|
||||
"armv7-unknown-linux-gnueabihf-0.9.2":
|
||||
"93bbf2c8612174548822086487eef982bb19d95b569d3df83328cff6f5bf7660",
|
||||
"armv7-unknown-linux-musleabihf-0.9.2":
|
||||
"0f96d45eb4edfff26faaac58d9d5761b3f2628519557534e6969ec2777f35984",
|
||||
"i686-pc-windows-msvc-0.9.2":
|
||||
"f0cc299f9cfd9850d30f073794cda9523ac7fa2b90de3d1ed47e3fdcbda69ab6",
|
||||
"i686-unknown-linux-gnu-0.9.2":
|
||||
"5623618c4a99694b24eb3388577495873847ccae716c0827fdb03035ddd4d441",
|
||||
"i686-unknown-linux-musl-0.9.2":
|
||||
"c9d60b1e09611e3b36d91d5b520687ac15d765fe2a06a47dae068c6ebf23ada1",
|
||||
"powerpc64-unknown-linux-gnu-0.9.2":
|
||||
"d2c92ae4df26b4f62181b3e8840f85f5a9474cfac707f0f8fdbef03f573836ae",
|
||||
"powerpc64le-unknown-linux-gnu-0.9.2":
|
||||
"216e11a9001d7985990b0c4b6efd734b27e5e96222f9815d23c6fc8a5a406718",
|
||||
"riscv64gc-unknown-linux-gnu-0.9.2":
|
||||
"3fdbc9dc623a992c39ea4c126d4ebe1f78dc2013e9056f2ec93f42b0deb154eb",
|
||||
"s390x-unknown-linux-gnu-0.9.2":
|
||||
"4e4aa34554891bcfb92d50fc2067e99cbbc5bec473ce4b8e3dedad0d42017c85",
|
||||
"x86_64-apple-darwin-0.9.2":
|
||||
"c887d2c4f629eee99b80a347880870f3bc77f7746db81923efe520f609f80857",
|
||||
"x86_64-pc-windows-msvc-0.9.2":
|
||||
"ba61d01b7470b282e09e7c82a053472723c2a737fb3d137bd0f111e420cc1d9f",
|
||||
"x86_64-unknown-linux-gnu-0.9.2":
|
||||
"b775bb84c72210c6c0b9670cfaad0ac2e3953f12a2947d52b57603b4fbae3798",
|
||||
"x86_64-unknown-linux-musl-0.9.2":
|
||||
"42e4ac8e9dab04d560a9d44be2091cae994d14653238e779177c026e0dbf5779",
|
||||
"aarch64-apple-darwin-0.9.1":
|
||||
"cc84b5c86fbde176c0e1908abd65cec6e989ff755b6e68a912652beb1311de31",
|
||||
"aarch64-pc-windows-msvc-0.9.1":
|
||||
"862e0fef8e68f229c99ce05de70a712221bc552403f480379d03f5b05a6886fe",
|
||||
"aarch64-unknown-linux-gnu-0.9.1":
|
||||
"450cf31a80cf1335b0169b82310ea589e51b12711ca84b1f5b322b87d26b16c5",
|
||||
"aarch64-unknown-linux-musl-0.9.1":
|
||||
"a171e7335fc2e05767fe0d151db5a6af7d1ba93debfc8c91721763eff457d0a3",
|
||||
"arm-unknown-linux-musleabihf-0.9.1":
|
||||
"cc290a14f3ffa286b8c5a437f50d5c9bb76e1d27f3d51dd701b0487e62987ea0",
|
||||
"armv7-unknown-linux-gnueabihf-0.9.1":
|
||||
"1f0d511f7776deaf40bae03102020f939c96c3d12eec741edf81f581546d2232",
|
||||
"armv7-unknown-linux-musleabihf-0.9.1":
|
||||
"790728d01dd0d252e3151b57b5a716f84d851d0802962144ea822118ae61b2f6",
|
||||
"i686-pc-windows-msvc-0.9.1":
|
||||
"8880c92097c5410c3bbad5e72cf7d38b57523ed374bcd7462d309b9a11b6df33",
|
||||
"i686-unknown-linux-gnu-0.9.1":
|
||||
"4eccf96c57c30edf6c11477351f536b1a6191d13854c8ffa6d8eee58637d82e6",
|
||||
"i686-unknown-linux-musl-0.9.1":
|
||||
"9763ef30957011ce61c56117ef3078c40960c7521c9ee7cbb3ce8aed5b6207a4",
|
||||
"powerpc64-unknown-linux-gnu-0.9.1":
|
||||
"4a0965091073115314f9fc935cfa3eed43c3f46a48dfa370583a019b052a950c",
|
||||
"powerpc64le-unknown-linux-gnu-0.9.1":
|
||||
"cd9e06feaccd26dce79fd6930afbe1210edf69b4181304b4c7143871e8fadbe2",
|
||||
"riscv64gc-unknown-linux-gnu-0.9.1":
|
||||
"394edca0f59b6cf31ee6e3d252442e1e2708483265199d390ac1fc4161f97510",
|
||||
"s390x-unknown-linux-gnu-0.9.1":
|
||||
"8f4eedabfe57cf1d3ef29633be444ad9fd1c1ce9db89450a548e50ac88436cf0",
|
||||
"x86_64-apple-darwin-0.9.1":
|
||||
"df530fc06d2fd51ed2efeb75b1ea5eeb77a631eb945efe5f9d90ef5969cd3672",
|
||||
"x86_64-pc-windows-msvc-0.9.1":
|
||||
"8dba20107ebcd38f3a8e4acfeb7b209d594e112a3be8d1cea69fe6d501a69fdf",
|
||||
"x86_64-unknown-linux-gnu-0.9.1":
|
||||
"da55e00c6399a34a47c1f10973d8618b425a530e149836305bcca7ff68d955ff",
|
||||
"x86_64-unknown-linux-musl-0.9.1":
|
||||
"104bbd393104f09f84db474310b0fc0327c5f6566bd903c9a9cac00d137208b7",
|
||||
"aarch64-apple-darwin-0.9.0":
|
||||
"136e70984e3fd359f4119ef445bfd67d6e0d50f15400226ef8db7b738ebef6d0",
|
||||
"aarch64-pc-windows-msvc-0.9.0":
|
||||
"a816625eae0117c8ca0cd618716ddc11c68522d1ecfa7d2738f1c670099fef10",
|
||||
"aarch64-unknown-linux-gnu-0.9.0":
|
||||
"ca410766024d2d726c937bda2e9441823e2848894ac5a2f8b608902384fc391f",
|
||||
"aarch64-unknown-linux-musl-0.9.0":
|
||||
"041d8f56ffe82cbbc0f63f187f4e1935ac8b32531cf071bf5fa7abcb0441b147",
|
||||
"arm-unknown-linux-musleabihf-0.9.0":
|
||||
"ec1ec28a7cc584a8a06632b717f89747fa8b8ba58277ad68c8f289aaeac35a0d",
|
||||
"armv7-unknown-linux-gnueabihf-0.9.0":
|
||||
"3063c9adb4786ed49d699de9cf24c721ff2cb96bd2bb39465cab3e42d4e4efcc",
|
||||
"armv7-unknown-linux-musleabihf-0.9.0":
|
||||
"b425603d3ef20c579b94681a587eaa3f8a2198a86473c7cd5f687a93f8a0fdb0",
|
||||
"i686-pc-windows-msvc-0.9.0":
|
||||
"fd1dc1c9f7f9bc66186188894e24864e3def2232e1de0d49416037161932bdd7",
|
||||
"i686-unknown-linux-gnu-0.9.0":
|
||||
"02f4b4070af6e0c591d676543b97f7f5d2c0ebf5b1d01d9e116391289f44afc0",
|
||||
"i686-unknown-linux-musl-0.9.0":
|
||||
"41fc684a948ec2ff9255b484e11b99a0b504a4fc19d466b549e51b690a6325d5",
|
||||
"powerpc64-unknown-linux-gnu-0.9.0":
|
||||
"122b9216414a8a89b0a716dd7bf5995d03cded62747deef68dacca6a9839f96f",
|
||||
"powerpc64le-unknown-linux-gnu-0.9.0":
|
||||
"affbf883bfe4ae0204943b7d936fc2269e806a2534d65da0e75da713ac71ce4e",
|
||||
"riscv64gc-unknown-linux-gnu-0.9.0":
|
||||
"86c9596204fecdacf038f498553a7e8be81aabebe430a1eb08f8ae8215610b10",
|
||||
"s390x-unknown-linux-gnu-0.9.0":
|
||||
"8f41968e5eceda304d9cd70d83a9dc7e205e221c651572862b74845d045203ee",
|
||||
"x86_64-apple-darwin-0.9.0":
|
||||
"8fce2fe15b227ca38c706acda7cf0ebc43d5ec4be537f1badd58d5e938c7ed89",
|
||||
"x86_64-pc-windows-msvc-0.9.0":
|
||||
"4bad2c47dafb52ad774072fb7a260e5c9f3dbf73441658db1128eb2aec5818eb",
|
||||
"x86_64-unknown-linux-gnu-0.9.0":
|
||||
"4dadaa5ff5009ccd6a0a43f6ccfa32bf36ed2eff18df7011275a9b1d81950e7b",
|
||||
"x86_64-unknown-linux-musl-0.9.0":
|
||||
"8b045dceb6f13f2ce36285c72ed2d6a51241aea9da5636637c020bcecea205c8",
|
||||
"aarch64-apple-darwin-0.8.24":
|
||||
"5f0d9d14b17ba3f0af4602a7a5a2e4faececf0a9463736cf8e6269c49569b2fa",
|
||||
"aarch64-pc-windows-msvc-0.8.24":
|
||||
"349e5f26ea4db6459578db210bb8d676e5b2acc13962877637a95f3e951a6899",
|
||||
"aarch64-unknown-linux-gnu-0.8.24":
|
||||
"9526f8b0eddd13f5162c18df5ecf35c21e4f96567d21849750356b60121882df",
|
||||
"aarch64-unknown-linux-musl-0.8.24":
|
||||
"2b8f7383b19d408c680a74a6dbd41c70976516922234eb0075fd2de67413cf29",
|
||||
"arm-unknown-linux-musleabihf-0.8.24":
|
||||
"e25ead24c0809fd81c67b72a30c81f2e76eff0d702d341c468326e3e374559f5",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.24":
|
||||
"3c0d984f55bcde6c16c8b4b749d2249b6a61125418dd6b333f249d846e759c71",
|
||||
"armv7-unknown-linux-musleabihf-0.8.24":
|
||||
"3e980197c242f36cf93cba0ebdad8f772ebf442ee856ba694daab624affab146",
|
||||
"i686-pc-windows-msvc-0.8.24":
|
||||
"7a8b3cdd8c02a662a19c426fbae99809d83dbedf172e52d30ba4c266ccd9a8b9",
|
||||
"i686-unknown-linux-gnu-0.8.24":
|
||||
"7957fbdc4538d706440173d14e91b6a2098b95701654125ebc2d05824aa233e6",
|
||||
"i686-unknown-linux-musl-0.8.24":
|
||||
"1a2b59dddc206106fb19a66dd665bfe85411281ace07825ba60988a00e230afd",
|
||||
"powerpc64-unknown-linux-gnu-0.8.24":
|
||||
"22dfcf44c1e8b273640e13aa41c72856654da650d58e0b39d1143dbdb4ee7997",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.24":
|
||||
"0e757a7109aecbe5b6759470164d466e2a2a234808d84095e6db52a13a62f399",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.24":
|
||||
"45342e4477dfde1f1d50a8c223706377ddb861cf5c4e1a323a936401472ed2da",
|
||||
"s390x-unknown-linux-gnu-0.8.24":
|
||||
"8167af20bf336179f5ffb96421d38cc7cb5d54dfa9b90820154cffbb456032de",
|
||||
"x86_64-apple-darwin-0.8.24":
|
||||
"b75ccf924654ad168efac2ec6934704b3d6b9cbff1650b35e17fa3d26d2bea1f",
|
||||
"x86_64-pc-windows-msvc-0.8.24":
|
||||
"5055be7909a844f703c54e8846d14ab676c34be6ea0d969ee74c5747feaedda0",
|
||||
"x86_64-unknown-linux-gnu-0.8.24":
|
||||
"db8179fffd97b7557b9a519bae82eaa4f499b02ef546f738a35e74e26c47e6b7",
|
||||
"x86_64-unknown-linux-musl-0.8.24":
|
||||
"b38ce629a8653a6b444b7c1bff2d8b99bdafd274e66a4900c5838051e3d99d26",
|
||||
"aarch64-apple-darwin-0.8.23":
|
||||
"e9128449ea08a3c953f0e08dabc78c7588361a898e6bd8163e7e8f8c96adeb66",
|
||||
"aarch64-pc-windows-msvc-0.8.23":
|
||||
"b4720ff1e3dcab3f41ce8135ae6c87d27682428088ce9e9b6802f2645e189a9e",
|
||||
"aarch64-unknown-linux-gnu-0.8.23":
|
||||
"503d1df80abe76c1f30264de817c9c847ff5fa457d4085517aecde1f5749ed66",
|
||||
"aarch64-unknown-linux-musl-0.8.23":
|
||||
"d745f61cdd3a845da6484785995bc6d19ceb3117dc3fa609bd304ecbedb87fea",
|
||||
"arm-unknown-linux-musleabihf-0.8.23":
|
||||
"55fd7161d526080dc07fec87aed63734cf18a20f4ef2fa9b870dd99cfb4e1b07",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.23":
|
||||
"160e9522965702a31bfcb86ee28318f7d83f3ffdf330739670703fa0a85ce012",
|
||||
"armv7-unknown-linux-musleabihf-0.8.23":
|
||||
"8cc14b0b7b5118a13c80d9245f0aa540c2596c757d7cbfab622b4f798ce90dd5",
|
||||
"i686-pc-windows-msvc-0.8.23":
|
||||
"9ca7cc83d6730762bb811ec96aff9c95c5c9a131d4305229348df61bbfc9241a",
|
||||
"i686-unknown-linux-gnu-0.8.23":
|
||||
"bd578dc12e1170bf14cecd17b343e308edaaee5b44f0cb066076366353567856",
|
||||
"i686-unknown-linux-musl-0.8.23":
|
||||
"3237b711f1c313b328be0d42395319a2ffdab5f67cd2338fbf77155b6bf425f5",
|
||||
"powerpc64-unknown-linux-gnu-0.8.23":
|
||||
"92f30e2adc8c4ec75b8dc85a82df7b74a617346c7748c41cb4672a61e42791d6",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.23":
|
||||
"b3f9b147022053b792fd82f7722b527323378c5130a227b7ec667c08b600d1be",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.23":
|
||||
"a4925b51f0810e44075d336c3fa5b7534c086111dce0d0d9d92a2e2270aea0a8",
|
||||
"s390x-unknown-linux-gnu-0.8.23":
|
||||
"6bafdbed0e750930a2af123e3cf8b782228aef88d24bf25dc6b0f280bc8ad461",
|
||||
"x86_64-apple-darwin-0.8.23":
|
||||
"bbb1db369de63d85334e2c43bb925fce63261cefa8c1a8569a6bd4c520f03c0d",
|
||||
"x86_64-pc-windows-msvc-0.8.23":
|
||||
"454c727fe05ec3763cae9436bb409a6bc5156e9c8ee55a09218191faf8c32445",
|
||||
"x86_64-unknown-linux-gnu-0.8.23":
|
||||
"b8d378bf1cbdefa6fd18570c3d5e7ea85066f75549cf3840212f505ed37522ed",
|
||||
"x86_64-unknown-linux-musl-0.8.23":
|
||||
"598f7939cae516de105075d55eb20d906787de307a0011904e301346a13de2ff",
|
||||
"aarch64-apple-darwin-0.8.22":
|
||||
"3f61099e261e449527141dbf125629fab33ad696468c8c90cebbac40185a306c",
|
||||
"aarch64-pc-windows-msvc-0.8.22":
|
||||
"dbb3a5bd06d20c9ab8bb9a79c7c4fb5832ca1c7ba5f231a020bc92e5a3c6dcf4",
|
||||
"aarch64-unknown-linux-gnu-0.8.22":
|
||||
"726b72a137fda33565143325f7d31c42cd30ff9ccdf067e00d124d37b4081cb2",
|
||||
"aarch64-unknown-linux-musl-0.8.22":
|
||||
"3cb3c891f56891f0027f0287980014930b18875c9396c1d8a19d607b0a6049d9",
|
||||
"arm-unknown-linux-musleabihf-0.8.22":
|
||||
"78c4898abb5285cbcb53bc2544d93158a705bf2024393d203b7df89406ffd5d7",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.22":
|
||||
"96f7e526b7cac851f4448ca773ee82216d3d8564161486f5c0ab0d84418cc3bc",
|
||||
"armv7-unknown-linux-musleabihf-0.8.22":
|
||||
"763bd2b60642c68e2d2d5ce43f741fe9cdb77b6fa771cd8b45971e4a380411d7",
|
||||
"i686-pc-windows-msvc-0.8.22":
|
||||
"e84c697e29afc76223e020edb3786acebed34779a9cc2ab88e570ff93d69a617",
|
||||
"i686-unknown-linux-gnu-0.8.22":
|
||||
"f6cfe03095b9cafdbf530cf228803e9ec329511d45e5901e3baa355f96ba37f3",
|
||||
"i686-unknown-linux-musl-0.8.22":
|
||||
"6ea34f5e656ee0f2085436513e9b6a2caeae7ff14d14871f177a7797f79db20e",
|
||||
"powerpc64-unknown-linux-gnu-0.8.22":
|
||||
"87b1f9b6452540d1b3e3286e9209fcae39a692c323544c10f6b4f096bfc04673",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.22":
|
||||
"2f639a402031e62dabd6ca534635d73b26e8b72afeb063f8abc9abc6ba97a8e3",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.22":
|
||||
"75c83abe161c6e673f7d21e46cd27df539081a9ccf74e4d053e90ba8d2d715e0",
|
||||
"s390x-unknown-linux-gnu-0.8.22":
|
||||
"a0f671106b8b4c128aad3b52becc34691d7669c3d40bbd5a18df2c60b4d67971",
|
||||
"x86_64-apple-darwin-0.8.22":
|
||||
"76638fdcfa91357858771551a1c88de1f7c3b270b33ab1866f8a0618d9e442d8",
|
||||
"x86_64-pc-windows-msvc-0.8.22":
|
||||
"5049375aa2a5162f132b2c1cb992e25d42d47d934cab8c174dbe6f60973dcc12",
|
||||
"x86_64-unknown-linux-gnu-0.8.22":
|
||||
"741ff1f5742c5a4a25d2f829e8395355e43f7a5ae2ebc6368e9ae2df0efb69cf",
|
||||
"x86_64-unknown-linux-musl-0.8.22":
|
||||
"06b891ef144bd8390fecb150838f0ff8a34ccaeecf9d744d97945d02ec7389c0",
|
||||
"aarch64-apple-darwin-0.8.21":
|
||||
"51a10a0ba94139911266779e61296b07fffc98eedf3d8f6e206f86375ac7fb31",
|
||||
"aarch64-pc-windows-msvc-0.8.21":
|
||||
"ad60ed2fd2c95957c55041d2e61146f0f41aedc7afe87f3f79a8648802713fb5",
|
||||
"aarch64-unknown-linux-gnu-0.8.21":
|
||||
"5ebc05755ee1688434993d3bf346b6fbdbcbd2f17f1a8339f175e76af18de50c",
|
||||
"aarch64-unknown-linux-musl-0.8.21":
|
||||
"2afeee16b09d40cbe4de445fe82e1ecc00ed51dd8e118ed7800ca537ee4cf0c2",
|
||||
"arm-unknown-linux-musleabihf-0.8.21":
|
||||
"f45daacdd988284b011137ba017e5b151252922eec52b457d50770f0cde18387",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.21":
|
||||
"f6b5fa5a6cfad7fd9fa80c11b24cef18acb8d99c137a6144a4bb1c50dbfb5b1b",
|
||||
"armv7-unknown-linux-musleabihf-0.8.21":
|
||||
"d53ad3c1c5b549654c2da6f9369df7a68b961f18fcaf847cb8242dc48fe17e20",
|
||||
"i686-pc-windows-msvc-0.8.21":
|
||||
"8ee8cd0cc5d49a9e3c6f176bdc9d09ece03144dbc0914c20b27e67ff72c0570e",
|
||||
"i686-unknown-linux-gnu-0.8.21":
|
||||
"327ef2b81967cb2e8407255d3580dd67ddf15fdb18fd3d6e945dc13f76462b0c",
|
||||
"i686-unknown-linux-musl-0.8.21":
|
||||
"18b7a77c37155ea15166a3a212e69b53f0e6b8d1d399b87c1b3ac4cc646e9b4f",
|
||||
"powerpc64-unknown-linux-gnu-0.8.21":
|
||||
"1fae8052ce8a9663438ba332f930062b14621adb395eff2950928d7cf8323d16",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.21":
|
||||
"cca5f83f59251fced9056ecf8ae90e89a83252dda1eb53eab96a76e484776e0d",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.21":
|
||||
"485f2654720d9fca3c85b147e837f0dc32bb869113bde58e979fc76f0c37547e",
|
||||
"s390x-unknown-linux-gnu-0.8.21":
|
||||
"5757570db02d2ed3ef5742a1a484b921e716d8412daf45e85c4c79c0a75bf0c1",
|
||||
"x86_64-apple-darwin-0.8.21":
|
||||
"df0fae941f83f796ea8100958f5d31a185dacc34777f346019123b6cb5571101",
|
||||
"x86_64-pc-windows-msvc-0.8.21":
|
||||
"ed4f66aacea41026675bca18699958cda13112c77ef5eff3a2f3d376bd1f9177",
|
||||
"x86_64-unknown-linux-gnu-0.8.21":
|
||||
"166bfa522cc836a3b68bdcef78e40b263ea62f12bb80a8d9c6fda4ce5f2a3994",
|
||||
"x86_64-unknown-linux-musl-0.8.21":
|
||||
"ff6f6ffca9a026cc99bc43df46e70e33df09bcb544b43e8ef97a5176dd68b516",
|
||||
"aarch64-apple-darwin-0.8.20":
|
||||
"a87008d013efd78d94102e5268a24990c409bfb39b80df4de32d1c97f093e7ef",
|
||||
"aarch64-pc-windows-msvc-0.8.20":
|
||||
"ac33f921e0d48d14a106a6cc84b146da7a1f4a3c329c7fb0e1a8e6ff4cf541e6",
|
||||
"aarch64-unknown-linux-gnu-0.8.20":
|
||||
"b434851cd94e9e2083bc9a5851f1d13748771726bd2ac30027f820fc134b2104",
|
||||
"aarch64-unknown-linux-musl-0.8.20":
|
||||
"60ad9b7fb846c2051e0113077b1e9510b4b1a73b9a1816a03e82406deedff08d",
|
||||
"arm-unknown-linux-musleabihf-0.8.20":
|
||||
"72fa919115f5a7c4557c1adb55ac77154f3fb0272b95ff0270d4eaf98bc814c2",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.20":
|
||||
"87a993df182a2abb5581421d6c76b0cbccb311cfca625d8c827f2cfcf1c78fed",
|
||||
"armv7-unknown-linux-musleabihf-0.8.20":
|
||||
"3a3c1b2370824f3129c89bf3def5b2b703813152cf0be0ec3c04dead21077cd0",
|
||||
"i686-pc-windows-msvc-0.8.20":
|
||||
"62fd821f330f469cce6e02eded6f63ba51a9461acc9e0e16794e05da08fe16be",
|
||||
"i686-unknown-linux-gnu-0.8.20":
|
||||
"a7bfa2c07183f2fd44ef4d6c910971796a980ebb3c52e9620e6b741cc6fe45c0",
|
||||
"i686-unknown-linux-musl-0.8.20":
|
||||
"67eec91d7ca5a8dc8d95149be52bcf459efb4caeacbacf8586f371f8192a0ec7",
|
||||
"powerpc64-unknown-linux-gnu-0.8.20":
|
||||
"b96d6a4907ab4c26d7061e43f6993aa47c76a01af6f3cb871d9c48b7b250fbca",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.20":
|
||||
"1c13fbcd13214e93300749cb14cb5c1425d6a4095f2e406a80b34ab10d269b5b",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.20":
|
||||
"a14f8297bae6dc3993a9367e0fcf6061281f5f3f0da7c46a6a2a5fd47467f56c",
|
||||
"s390x-unknown-linux-gnu-0.8.20":
|
||||
"8e59db8d1cb791897237982e369fea0217a12ffe3527cf6f1d30fea32d20a509",
|
||||
"x86_64-apple-darwin-0.8.20":
|
||||
"ec47686e5e1499b9ea53aa61181fa3f08d4113bc7628105dc299c092d4debf44",
|
||||
"x86_64-pc-windows-msvc-0.8.20":
|
||||
"e2aa89b78f0a0fa7cbf9d42508c7a962bda803425d8ec3e9cf7a69fb00cf6791",
|
||||
"x86_64-unknown-linux-gnu-0.8.20":
|
||||
"dc67aa1a5b6b16a8cc4a5fdf5697f354fbf9e45f77a3da6d9e71db6ec213c082",
|
||||
"x86_64-unknown-linux-musl-0.8.20":
|
||||
"a29e1854ee3ce1ccc5ba1d27783c4f34e99605e16c886a71446a90bad40a38c9",
|
||||
"aarch64-apple-darwin-0.8.19":
|
||||
"bb63d43c40a301d889a985223ee8ce540be199e98b3f27ed8477823869a0a605",
|
||||
"aarch64-pc-windows-msvc-0.8.19":
|
||||
"3bfe2db4bccf95e05d2685bcbfad7e49e7cd2177a20aebe81a5e5348cbdfc0a3",
|
||||
"aarch64-unknown-linux-gnu-0.8.19":
|
||||
"ffd29feed13cdd30b27def8e80e64223325fbe4f7cfc4d4c906ec2531f746bde",
|
||||
"aarch64-unknown-linux-musl-0.8.19":
|
||||
"87925376fa1e59de23582e1cbd81d6aabd16611e871ad085e09be2c2fa12689d",
|
||||
"arm-unknown-linux-musleabihf-0.8.19":
|
||||
"00d4835ba20e2e4a3bfed6fe4f6fbf4982c5a0e6a3105c7bde93fb9377e61dea",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.19":
|
||||
"7a58efdb9c6e3f320759f9f074306e34f03ccfb535b306cbace92e9ad414efd5",
|
||||
"armv7-unknown-linux-musleabihf-0.8.19":
|
||||
"c8f8a244009f3ad01b23772c936c5c5a95871a87b0add90b85a55d3913d1fae0",
|
||||
"i686-pc-windows-msvc-0.8.19":
|
||||
"32c7176e49f5fa1c7480b32e325a631431212904b1020427e62afef46fddddb9",
|
||||
"i686-unknown-linux-gnu-0.8.19":
|
||||
"94a5f944d1cba4db2e7fc6831bf9c78c291c5c1e5e079b4095e9fcdcbc15bc71",
|
||||
"i686-unknown-linux-musl-0.8.19":
|
||||
"491b282b50e078fac4ced99e69359ac6cecc3f43f585f812d52515e6b081261a",
|
||||
"powerpc64-unknown-linux-gnu-0.8.19":
|
||||
"3c7c7ecb8d5b61acee3914984f1025af1707a987a51285aba44d968420139f2c",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.19":
|
||||
"711e39050b528b0860d868c98057eebbd181befbe6a6f24e0f6fd571eab5520f",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.19":
|
||||
"5dd8e1ec8bf8722e08d9853953ed0ef12318d0f5e82d06a8dd98815666f99186",
|
||||
"s390x-unknown-linux-gnu-0.8.19":
|
||||
"5b3af341a39364f147d7286e40f55dd92ac8a142110e29ff1b4825afb96e1b27",
|
||||
"x86_64-apple-darwin-0.8.19":
|
||||
"b5f91770e55761b32c9618757ef23ded6671bb9ca0ddf5737eea60dddd493fe9",
|
||||
"x86_64-pc-windows-msvc-0.8.19":
|
||||
"945b07182de7de279ba5ae5c746785dfd55cf9b17481d3535b0b03efd6e64567",
|
||||
"x86_64-unknown-linux-gnu-0.8.19":
|
||||
"cfc674e9b83d1becfca4d70386e5f7ace4c1fa8c47c518abeebb8ef2b30da4b8",
|
||||
"x86_64-unknown-linux-musl-0.8.19":
|
||||
"6a37f712ae90c7b8cf364fe751144d7acc2479d6b336378111e74cc7fb14fa7b",
|
||||
"aarch64-apple-darwin-0.8.18":
|
||||
"ce660d5cdf0ed83d1a045bbe9792b93d06725b8c9e9b88960a503d42192be445",
|
||||
"aarch64-pc-windows-msvc-0.8.18":
|
||||
"f49a25f1a89c76d750e2179f40f9302310504f40c89283ca4522b13363c7bdc9",
|
||||
"aarch64-unknown-linux-gnu-0.8.18":
|
||||
"164363f88618f4e8e175faf9fcf5172321c221fce93d64cec8e9ab3339511dad",
|
||||
"aarch64-unknown-linux-musl-0.8.18":
|
||||
"1d7e3bfc3b5ec9d747bc3f42a6a3362249f30560966512b172e8967b11046144",
|
||||
"arm-unknown-linux-musleabihf-0.8.18":
|
||||
"3c356156c074eb21f731116501992aa6ad6079231f37c75ea7a15c22d1c41cf6",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.18":
|
||||
"15e12cfba5fb7b20b4eb45887b78fe157d29bd28b38bbc03a19224ad6766a641",
|
||||
"armv7-unknown-linux-musleabihf-0.8.18":
|
||||
"008cd8225fd8b6b4bb3293d1d7520023f8e432141f256320c034dc5a1a15c7ab",
|
||||
"i686-pc-windows-msvc-0.8.18":
|
||||
"55f0d91f766ca141e166fe74b8a81da667b5d703ca1b5f2671677f0b2bfdd901",
|
||||
"i686-unknown-linux-gnu-0.8.18":
|
||||
"3b42e3b58650cde6fa0d03dfdb8528573cf679ac9809191b3976913cdec13b6f",
|
||||
"i686-unknown-linux-musl-0.8.18":
|
||||
"e2dae897955f666eb2f83af12d9a566bc42c26c17413d1480124cef6b30dc0fd",
|
||||
"powerpc64-unknown-linux-gnu-0.8.18":
|
||||
"88cd4ad593e6dd915c69dee02b56cbf1b6d16cb7c8129a5ad1fa8ac02bd755ab",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.18":
|
||||
"50b418096f4d82df5d22cb23e650754ca92bca7be657113dcd53631f0e0cec77",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.18":
|
||||
"b696be9a2ef0808f230227477b8e23acedba0b90933978c760ea2a748e8c30fa",
|
||||
"s390x-unknown-linux-gnu-0.8.18":
|
||||
"3b106572a8574f58e3df591cdaef915bdb38fdff11e5de0ec53bfe1b857267e8",
|
||||
"x86_64-apple-darwin-0.8.18":
|
||||
"a08c3a6c50f49e68216ac133bd0aaae952db2cd8d19a3cd5be782f8f4becf135",
|
||||
"x86_64-pc-windows-msvc-0.8.18":
|
||||
"3e42d63c8323839d50b11959ec558ad3954a2c16aab1ad52c0521bd055442a3f",
|
||||
"x86_64-unknown-linux-gnu-0.8.18":
|
||||
"59ad1a1809fa47019b86cf339fff161cb7b00ad3d8d42354eea57d0d91aeb44c",
|
||||
"x86_64-unknown-linux-musl-0.8.18":
|
||||
"3a93bc3597ab73c9c31d8ad709b4d0b788961cbb508c5a4dcf21636fd7e3e8ce",
|
||||
"aarch64-apple-darwin-0.8.17":
|
||||
"e4d4859d7726298daa4c12e114f269ff282b2cfc2b415dc0b2ca44ae2dbd358e",
|
||||
"aarch64-pc-windows-msvc-0.8.17":
|
||||
"2396749de576e45a40efa35fe94b3f953c3224c21f75c05772593e085d78e77d",
|
||||
"aarch64-unknown-linux-gnu-0.8.17":
|
||||
"9a20d65b110770bbaa2ee89ed76eb963d8c6a480b9ebef584ea9df2ae85b4f0f",
|
||||
"aarch64-unknown-linux-musl-0.8.17":
|
||||
"bd141b7e263935d14f5725f2a5c1c942fd89642e37683cb904f1984ce7e365f4",
|
||||
"arm-unknown-linux-musleabihf-0.8.17":
|
||||
"9d4ffb6751d65a52f8daf3fd88e331ab989d490a6e336d6a96cac668fce17a65",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.17":
|
||||
"014afffa5621986aefbe8a6d71597eb45b8cd3d4e94f825f34ec49ba4cd0c382",
|
||||
"armv7-unknown-linux-musleabihf-0.8.17":
|
||||
"fb976e7482c4550f38c51c5c23b9dae0322c3173f56436bf9a81252e4b74fcfb",
|
||||
"i686-pc-windows-msvc-0.8.17":
|
||||
"f528893452ca512b555b63267292977d237bd6fbdd967c9be6941a65ebf256f4",
|
||||
"i686-unknown-linux-gnu-0.8.17":
|
||||
"d52438a1588ea7c2332dc4aa8c93eedae344fc435c95491037237c7b4b36eae4",
|
||||
"i686-unknown-linux-musl-0.8.17":
|
||||
"9e10f4c57034e6e98dea48b0f4250a7eff983f1b2947d99ed6605a4eb0ec8d22",
|
||||
"loongarch64-unknown-linux-gnu-0.8.17":
|
||||
"1d02e45dbbcbbaa867afe59fd62b294cba47abf1a76e151e19db03b5dbf1c9c8",
|
||||
"powerpc64-unknown-linux-gnu-0.8.17":
|
||||
"6f448735dfd72e2d5c3e3bb541b388c58cdfcf3a562128d5ac1a5f2be47f95d6",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.17":
|
||||
"e4b28cab21eb990e2bea768bc9f43b61e4fd554552cea8868c855027decef69d",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.17":
|
||||
"f653caa34479d405d290b825a2fe782bb26c55a7bfaa870911b4e18792312d45",
|
||||
"s390x-unknown-linux-gnu-0.8.17":
|
||||
"8fae8182704b4b11316c87d897c3e64f2d3f55ac8c58c482d9bbef9ad611f90c",
|
||||
"x86_64-apple-darwin-0.8.17":
|
||||
"31ed353cfd8e6c962e7c60617bd8a9d6b97b704c1ecb5b5eceaff8c6121b54ac",
|
||||
"x86_64-pc-windows-msvc-0.8.17":
|
||||
"0d051779fbcb173b183efeae1c3e96148764fd82709bbbf0966df3efe48b67c5",
|
||||
"x86_64-unknown-linux-gnu-0.8.17":
|
||||
"920cbcaad514cc185634f6f0dcd71df5e8f4ee4456d440a22e0f8c0f142a8203",
|
||||
"x86_64-unknown-linux-musl-0.8.17":
|
||||
"4057052999a210fe78d93599d2165da9e24c8bbb23370cdd26b66a98ab479203",
|
||||
"aarch64-apple-darwin-0.8.16":
|
||||
"87e4b51b735e8445f6c445c7b4c0398273e40d34cd192bad8158736653600cd6",
|
||||
"aarch64-pc-windows-msvc-0.8.16":
|
||||
"392acca957d8d7cccafbb68ce6c4ba29b2ff00c8b0d4744a2136918d3a7bf765",
|
||||
"aarch64-unknown-linux-gnu-0.8.16":
|
||||
"22a3cbaf87776b73c2657ba5d63f8565c1235b65eaf57dffda66061f7a09913b",
|
||||
"aarch64-unknown-linux-musl-0.8.16":
|
||||
"6bd6a11c384f07353c3c7eec9bde094f89b92a12dc09caea9df40c424afebea5",
|
||||
"arm-unknown-linux-musleabihf-0.8.16":
|
||||
"53c31a6559dc4fb22ce8c56640b00a8404b7e4d55f68b6bb3aa188864e2c3084",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.16":
|
||||
"ada6f393d5e5d9cba5445832ba61e8222859e915e5d77a37f5dd35979f3f18e4",
|
||||
"armv7-unknown-linux-musleabihf-0.8.16":
|
||||
"55690f70f9c61963c0069558e205acda9ff0604a44028226b9a0ec3b847c9125",
|
||||
"i686-pc-windows-msvc-0.8.16":
|
||||
"1e727b8af6c0781bc6eb9a2c34e7ee704070b7a2f122544443418e8be13019ee",
|
||||
"i686-unknown-linux-gnu-0.8.16":
|
||||
"4eaf39134663ef184f684be6f6aa83e971fb36ef7d1c67a5f2196268b61c0579",
|
||||
"i686-unknown-linux-musl-0.8.16":
|
||||
"a179ceba9f2fcca7b46a86b12715e28fb3429ff8193ae839700d534e35e95a45",
|
||||
"loongarch64-unknown-linux-gnu-0.8.16":
|
||||
"600a8be6d2621d654b6665d9a8df9370f4af9c0b6ceb851d1ae0d4b895e8e546",
|
||||
"powerpc64-unknown-linux-gnu-0.8.16":
|
||||
"c86008ef8a3e3730b0e58a168542331960c90a3b043e3853c1941457748595f3",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.16":
|
||||
"91645092447a14c23b47d0f434a787a9555b29e061607d9e60d2d556b831f5aa",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.16":
|
||||
"dbaeff3f0baad73c264c35abd937a231fb6b9d1201b6763d82e39e7516358115",
|
||||
"s390x-unknown-linux-gnu-0.8.16":
|
||||
"e29c330a8956c13acb0f2af7aa650dd5d9ebba6aefdceaea77f689953d140780",
|
||||
"x86_64-apple-darwin-0.8.16":
|
||||
"07491a998fd741090501df9bbfe538f85568901a3a66c9e0368636509158727a",
|
||||
"x86_64-pc-windows-msvc-0.8.16":
|
||||
"97fb93678eca3b4f731ea3879ae2e78787976e03f38c9c6fb744ab28bc3aec1b",
|
||||
"x86_64-unknown-linux-gnu-0.8.16":
|
||||
"fc94e50e8ef93a97d723b83faa42888e7710c4443a5b8a1af3aac2cda5390f3a",
|
||||
"x86_64-unknown-linux-musl-0.8.16":
|
||||
"ee220f112b91b23f641d169ba7a3652c6ab7104e7c666d26104ebd6a2f76be43",
|
||||
"aarch64-apple-darwin-0.8.15":
|
||||
"103367962c5cb00bf7370d84cbaa3fec5a9807be9cc833ea9d8eea400c119fa2",
|
||||
"aarch64-pc-windows-msvc-0.8.15":
|
||||
"16d92f21508c5dbd3374466c2cdad2909959a6d3bd06672b9db023f2a5d7a014",
|
||||
"aarch64-unknown-linux-gnu-0.8.15":
|
||||
"6ede0fefa7db7be3d5d9eda8784a8e43b1cf5410720eb3da60ab1d2f66678e82",
|
||||
"aarch64-unknown-linux-musl-0.8.15":
|
||||
"23ea21a05c62c4c307ce691f29bff2f15c94c4f07f2b83d9b356f0664bc8b3a2",
|
||||
"arm-unknown-linux-musleabihf-0.8.15":
|
||||
"deeac755224244b535c9f654b29aad8a165c94840a520d41e5c697235edd0576",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.15":
|
||||
"07ad33bc28ed276944d069eb714322b24167bfe106b4bded01e272fe245934ba",
|
||||
"armv7-unknown-linux-musleabihf-0.8.15":
|
||||
"0b4f73e084a04828f2431c887c2e3eea590ff06a1dc279e473dd1d94cdc8f25d",
|
||||
"i686-pc-windows-msvc-0.8.15":
|
||||
"34425e7dc7323b98fc844d9223596e9a1d2347e6f85a512221428a455dcbea78",
|
||||
"i686-unknown-linux-gnu-0.8.15":
|
||||
"16230e9b785fccb628e920d0fa1ca59b50b0515b838b2bb80f997bcb7a35f2bb",
|
||||
"i686-unknown-linux-musl-0.8.15":
|
||||
"43d554953beac56a8d8ba23aeb2b0e0e5c43020b074071c15df5d492e46a81f3",
|
||||
"powerpc64-unknown-linux-gnu-0.8.15":
|
||||
"71465b1d08e0a4cb3fcfe02e127104400a85ed00c30ec5f53f8705e71567fb6a",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.15":
|
||||
"54157ee5e01b02b8c89131391d62228787750b556bbdb7d3428a3cdfd1698102",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.15":
|
||||
"faa4a470a26ad0db0dbefc510fac91fa0da4d9cd06ca4f229933f7aac21e46b2",
|
||||
"s390x-unknown-linux-gnu-0.8.15":
|
||||
"0bb022274375745352a748b8332bb170941fe01915a1670c2c6d06d182783437",
|
||||
"x86_64-apple-darwin-0.8.15":
|
||||
"2bbef70982e97dfc36454de173f35ec1a5e83ae11e3885df6a50db3fd76171cb",
|
||||
"x86_64-pc-windows-msvc-0.8.15":
|
||||
"459d95892a5cc5c21779532f4f41b9238594b79e312a5142da2148ecfa10e705",
|
||||
"x86_64-unknown-linux-gnu-0.8.15":
|
||||
"be9878e9d08ebcb621a683aba52e7fb8bbf92b2532e0d759026ffcc067673042",
|
||||
"x86_64-unknown-linux-musl-0.8.15":
|
||||
"d0fec58f3124e05e0a1af0f6541abfce4333253cdaf23c7b6bb2e6128bf138ea",
|
||||
"aarch64-apple-darwin-0.8.14":
|
||||
"281ea18a5778099f7edeee0a7b20671d14918782de153604c939486f2b8a2791",
|
||||
"aarch64-pc-windows-msvc-0.8.14":
|
||||
"d7fef1d1d0b0f8e0aa94391376fe5fb95f0e213ef7ee1c498c287fe0ea76f886",
|
||||
"aarch64-unknown-linux-gnu-0.8.14":
|
||||
"69616218470b2ad053617efb9e7027b1518ea38918d933c2791e113d99cec507",
|
||||
"aarch64-unknown-linux-musl-0.8.14":
|
||||
"d492d433d8ea87a4051c3f071ed04f13f8f001aa782e2e8192eaa5143e9a6f39",
|
||||
"arm-unknown-linux-musleabihf-0.8.14":
|
||||
"ef6a51cc1808de75969e2719420464d494bb5932d18ebf3ac07df7a5ab27b16a",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.14":
|
||||
"75c77b40c39dd526f88f5119d686e44d95c10cece436e4306f0db32b94d91716",
|
||||
"armv7-unknown-linux-musleabihf-0.8.14":
|
||||
"33a15d40d407323a516edabdc4eb33bbefc04e17d40769a04bfc15605d2eee1e",
|
||||
"i686-pc-windows-msvc-0.8.14":
|
||||
"b43c5703cdfb15c019b04cad2ef19034a91e8a0872ae2d674d366dfc0a755124",
|
||||
"i686-unknown-linux-gnu-0.8.14":
|
||||
"d49a796d569b010d43eeb8d9259f1a12fa910176b076c04c13609648973f428e",
|
||||
"i686-unknown-linux-musl-0.8.14":
|
||||
"cee58d8fe55f59a0869039f83875ee44a4a12b3b3f1f1f5a2bdc68968e449f54",
|
||||
"powerpc64-unknown-linux-gnu-0.8.14":
|
||||
"f118e642a7e360384a0277980986cea4857cc2d90364d58865d941c6b8abfcd1",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.14":
|
||||
"c411e63edd125283641420bb4be830872be269451756de2095aebc3ca8b0277a",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.14":
|
||||
"1bb13f9d1a3e55dcea09f3b99b35ec0fbd3428276311b068268b07cd07c5b067",
|
||||
"s390x-unknown-linux-gnu-0.8.14":
|
||||
"8643d6ab3513ab4adc3ffb56c39813651725d047ee6af5de3ae1fd0e4975c364",
|
||||
"x86_64-apple-darwin-0.8.14":
|
||||
"567d98b0c541a68df8aaa2c3214242c4070068b2edaea1be376a4c0fa348bdf1",
|
||||
"x86_64-pc-windows-msvc-0.8.14":
|
||||
"3f68ab95d2856e6b238e0e3f4255a723ccdc2cf1d4b8e53f5a4f5a47b645dc72",
|
||||
"x86_64-unknown-linux-gnu-0.8.14":
|
||||
"954add045f29f93191523175e4aea066996840e86c1b6339dee25f48b15b5ddb",
|
||||
"x86_64-unknown-linux-musl-0.8.14":
|
||||
"e018287fb321c3c633df2b622c2cf53042caa5c4c43a4ca6431bcb38e0685fa4",
|
||||
"aarch64-apple-darwin-0.8.13":
|
||||
"c3eddc0e314abb8588f1cdf312f0b060d79e1906eff8f43b64a05ff5e2727872",
|
||||
"aarch64-pc-windows-msvc-0.8.13":
|
||||
"5b3a80d385d26fb9f63579a0712d020ec413ada38a6900e88fdfd41b58795b7e",
|
||||
"aarch64-unknown-linux-gnu-0.8.13":
|
||||
"3bb77b764618f65a969da063d1c4a507d8de5360ca2858f771cab109fa879a4d",
|
||||
"aarch64-unknown-linux-musl-0.8.13":
|
||||
"40ba6e62de35820e8460eacee2b5b8f4add70a834d3859f7a60cdfc6b19ab599",
|
||||
"arm-unknown-linux-musleabihf-0.8.13":
|
||||
"f108a49a17b0700d7121b0215575f96c46a203774ed80ef40544005d7af74a67",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.13":
|
||||
"730d8ef57f221ecc572d47b227ecbd8261be08157efb351311f7bc1f6c1c944a",
|
||||
"armv7-unknown-linux-musleabihf-0.8.13":
|
||||
"b78dacab7c2fb352301d8997c0c705c3959a4e44d7b3afe670aee2397a2c9ab3",
|
||||
"i686-pc-windows-msvc-0.8.13":
|
||||
"08482edef8b077e12e73f76e6b4bb0300c054b8009cfac5cc354297f47d24623",
|
||||
"i686-unknown-linux-gnu-0.8.13":
|
||||
"0ce384911d4af9007576ceba2557c5d474a953ced34602ee4e09bd888cee13c0",
|
||||
"i686-unknown-linux-musl-0.8.13":
|
||||
"b6462dc8190c7a1eafa74287d8ff213764baa49e098aeeb522fa479d29e1c0bf",
|
||||
"powerpc64-unknown-linux-gnu-0.8.13":
|
||||
"9a8e8a8927df9fa39af79214ab1acfc227dba9d9e690a424cef1dc17296161a8",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.13":
|
||||
"4880a8e2ba5086e7ed4bd3aecfdae5e353da569ddaac02cd3db598b4c8e77193",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.13":
|
||||
"0cd68055cedbc5b1194e7e7ab2b35ac7aa1d835c586fb3778c7acb0e8a8ac822",
|
||||
"s390x-unknown-linux-gnu-0.8.13":
|
||||
"8cc2e70bee35c9e437c2308f130b79acc0d7c43e710296990ed76e702e220912",
|
||||
"x86_64-apple-darwin-0.8.13":
|
||||
"b799253441726351bc60c2e91254a821001e5e2e22a0e2b077d8983f583e8139",
|
||||
"x86_64-pc-windows-msvc-0.8.13":
|
||||
"60870fa18d438737088e533ed06617549e42531c522cc9a8fe4455d8e745dc29",
|
||||
"x86_64-unknown-linux-gnu-0.8.13":
|
||||
"8ca3db7b2a3199171cfc0870be1f819cb853ddcec29a5fa28dae30278922b7ba",
|
||||
"x86_64-unknown-linux-musl-0.8.13":
|
||||
"38ade73396b48fce89d9d1cb8a7e8f02b6e18a2d87467525ee8fb7e09899f70d",
|
||||
"aarch64-apple-darwin-0.8.12":
|
||||
"a3f78d20465c6d18f7072f118ce1c61b164b98698fdc37357e72958c7d1b68fd",
|
||||
"aarch64-pc-windows-msvc-0.8.12":
|
||||
"eb0c7e47411d11cbc3990eef51a5e10215a1fc9d5f5058fd8e952da94be16512",
|
||||
"aarch64-unknown-linux-gnu-0.8.12":
|
||||
"9a8a53df515bd64d423c85ace7ddca08fb9a91d8a115934c4495b5cf74c60ea6",
|
||||
"aarch64-unknown-linux-musl-0.8.12":
|
||||
"de85bafc3e238a4fce87eb6a4e584c9c04721475abb9e5f6fe186bdce650763f",
|
||||
"arm-unknown-linux-musleabihf-0.8.12":
|
||||
"5fe2f13d8c62d410278fbd69b0c1f03be5bd2c40168a98dc8fc82bca64c2eaad",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.12":
|
||||
"6ddde49d5fcc04a90855f31b5cb500146dac23f31d16f6d7fa7da1ae481eab1e",
|
||||
"armv7-unknown-linux-musleabihf-0.8.12":
|
||||
"39b626f438c22a3122546445d581fe02b6fc449649b4890f44791af4f3d3c18b",
|
||||
"i686-pc-windows-msvc-0.8.12":
|
||||
"97e0e04648e48cccdd25210f5eaf6fb2d46f1a198983b7de10613faf1629663d",
|
||||
"i686-unknown-linux-gnu-0.8.12":
|
||||
"74484899512bb91ed4bd64d117284c20912c39c600cc775d6ef1bf278d6c2a94",
|
||||
"i686-unknown-linux-musl-0.8.12":
|
||||
"b1e303c231068a3a419b12d3ba4dc852931740ab3ad691c7a87309327eac732f",
|
||||
"powerpc64-unknown-linux-gnu-0.8.12":
|
||||
"455bd841952724bff1f45dad91555ce2a33c837cc8d734ca39afaa0ac3c8385d",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.12":
|
||||
"30f1191e997d8d2845b27f57ce30e8d3643994161b7d099caf81fde22d723fa6",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.12":
|
||||
"1e9e7ca966999161ef5174d28a18777d2a143c081a63d455f5b7fd5a1513d2e7",
|
||||
"s390x-unknown-linux-gnu-0.8.12":
|
||||
"55ec25ef06c1e0c095f2baa1a12ce38879db8db99a4b046286a9573dd3c605d5",
|
||||
"x86_64-apple-darwin-0.8.12":
|
||||
"467b462e854bc750fcad8e3ad35e2aca0d301c9287f2365afad8c17b7672b6a8",
|
||||
"x86_64-pc-windows-msvc-0.8.12":
|
||||
"3fb92ce0860db7cb094ddeeb1ac521532fdd3e61d0a130f7bbc6be54caca7c2e",
|
||||
"x86_64-unknown-linux-gnu-0.8.12":
|
||||
"f976ebdc612e71209f46664ab6c0325fa0090059b4474e047edd39eb9395373b",
|
||||
"x86_64-unknown-linux-musl-0.8.12":
|
||||
"fa682c444b8a57a0984129d0989801fb0406f9238a57df76fdde063c6b2339c2",
|
||||
"aarch64-apple-darwin-0.8.11":
|
||||
"c9e74f779a65798057bca2ff328d5c9952f458391e220c3d3216d7a03a338d9f",
|
||||
"aarch64-pc-windows-msvc-0.8.11":
|
||||
"09c6cc8c511d166dc12c9e56ce06c92de928a2e5bad14fc079654901dc8ea114",
|
||||
"aarch64-unknown-linux-gnu-0.8.11":
|
||||
"472dbebd1369049e58d3bbeaae663b212e691676cfd15d799e4faca616d37264",
|
||||
"aarch64-unknown-linux-musl-0.8.11":
|
||||
"1c6045bec4d5ca17777dd271401a0407c5acad79f74fd38f35c31ca64c689808",
|
||||
"arm-unknown-linux-musleabihf-0.8.11":
|
||||
"84da6bfdf9ee693c7278770e1d16d0d5e3ba5ea8f913d7fed13e9854aad95e31",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.11":
|
||||
"a27bb0ae23d0584f1a6a7f851362cb52687bbd22ecce37cc80f3eeca0925dac4",
|
||||
"armv7-unknown-linux-musleabihf-0.8.11":
|
||||
"29605e9724eb7c68bc67892b4d8bcc28d03c1cb1125cb3dd783e81dd61cc15b5",
|
||||
"i686-pc-windows-msvc-0.8.11":
|
||||
"17e45a6afa19443a9749668540a033e9fedd3d6bec1ad8952d10da1f40ed9e92",
|
||||
"i686-unknown-linux-gnu-0.8.11":
|
||||
"85fb818676480ac0cc0f7219e4fd96667d851790c4dd054dc84f304128d88817",
|
||||
"i686-unknown-linux-musl-0.8.11":
|
||||
"194bc103af40c2a15b0a2e86e5eaad53a5219243df8e296d98e9c6269f67e0b3",
|
||||
"powerpc64-unknown-linux-gnu-0.8.11":
|
||||
"fde3e344ee3ef3eabc4803a27a05f06b082819d09153ec126b09f93882e54082",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.11":
|
||||
"a1de2c76674c5566e27f8a5b8868b4f416ec659ad657aa87ccc2d17f9cfeaac5",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.11":
|
||||
"c068fe0b27b7b91d79c3505fcca16ea8dc2df499e6420877bd5cf75b26f5304f",
|
||||
"s390x-unknown-linux-gnu-0.8.11":
|
||||
"e4d8ee92b9e20a7713cf7a9f7d7b288d9d726e7e96d874aaa20e3acc1d408287",
|
||||
"x86_64-apple-darwin-0.8.11":
|
||||
"7ed76b0cc314fa0cb6dd7ae99379efd3cf8fc14d71af8d71b0b5238582c7958d",
|
||||
"x86_64-pc-windows-msvc-0.8.11":
|
||||
"3e802b69307b10f228c8f1d096bd5721ac37a133bf33672f9fcc46a58dd5c920",
|
||||
"x86_64-unknown-linux-gnu-0.8.11":
|
||||
"0c6078318332c100d7d9988ea99144b534e40adef2958aa314a9f7c7b8516ed7",
|
||||
"x86_64-unknown-linux-musl-0.8.11":
|
||||
"0c66f4d06a4f933bddf75d4ad64e0e2d717f015ba1876c51e32ff293c84f57d5",
|
||||
"aarch64-apple-darwin-0.8.10":
|
||||
"5200278ae00b5c0822a7db7a99376b2167e8e9391b29c3de22f9e4fdebc9c0e8",
|
||||
"aarch64-pc-windows-msvc-0.8.10":
|
||||
"c51b02188c312baef71187273afa625576101e5680739eab83b1b09ca5d2f3a8",
|
||||
"aarch64-unknown-linux-gnu-0.8.10":
|
||||
"de60f5e3d69b54e6196fb8937fef4feb15e239f0fd14278e77e44dbb353214ae",
|
||||
"aarch64-unknown-linux-musl-0.8.10":
|
||||
"704f202ca92386eaa095706ec7e26c4f052f7e17721767d4ee18c676565c51b1",
|
||||
"arm-unknown-linux-musleabihf-0.8.10":
|
||||
"51d1244dd7f23d8aa021fa4d2a662a3727b27241e0ceb6f11820cb495611965f",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.10":
|
||||
"ce22ffada0356570f63ad0aae096226f1c45c3d561023b3fb2b1f0936f2b804c",
|
||||
"armv7-unknown-linux-musleabihf-0.8.10":
|
||||
"9ee0a14ec4fa263095bae4da329602f7735d914db4ad59079b47d714bfb95409",
|
||||
"i686-pc-windows-msvc-0.8.10":
|
||||
"e62a2549135b4b9474c18e7bc9f0937837012dd9039f6b4b2c109a1cf99ad925",
|
||||
"i686-unknown-linux-gnu-0.8.10":
|
||||
"cdd36af87ca53ec6b8cc4507e85c9ca54c40fd77613633a1095a1a2f317a0563",
|
||||
"i686-unknown-linux-musl-0.8.10":
|
||||
"658f14b093e3bf4ffcad645fe27d7aa2f8f18a6f625a22a246288c6368a4d88f",
|
||||
"powerpc64-unknown-linux-gnu-0.8.10":
|
||||
"f16d77cfca0dfca2bcef7cc556e0316ba5fdc61b1c3387d60b7c40e12f6617dd",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.10":
|
||||
"00bc1b47078520c588dbd383700d35c786ac2fa3e53c9fca51c5410581f8c87e",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.10":
|
||||
"db605bb442563f0494c174be639b9d80fcc4e27e360a31ad2675005ea1a1e3ab",
|
||||
"s390x-unknown-linux-gnu-0.8.10":
|
||||
"83ca774828d652ce9dd1d6e2619e66c471e2cb236754783019b9ae0f4da72718",
|
||||
"x86_64-apple-darwin-0.8.10":
|
||||
"3b935381af9124a5d5da48235e149f5f0662f2717e75782d1b843d39d9265d6d",
|
||||
"x86_64-pc-windows-msvc-0.8.10":
|
||||
"37fcd011fd22b2a569f7e583a924af2d624d99445f669752923a2fd3841f8e3d",
|
||||
"x86_64-unknown-linux-gnu-0.8.10":
|
||||
"2c4392591fe9469d006452ef22f32712f35087d87fb1764ec03e23544eb8770d",
|
||||
"x86_64-unknown-linux-musl-0.8.10":
|
||||
"4031c6f7ac3890f29c72e0ea655add58b8fa1c678d20afcf57efa51e57751732",
|
||||
"aarch64-apple-darwin-0.8.9":
|
||||
"c233bee389c15fdef09a6028db61cc54a12e6171f27d6d9c018eedca5bbbd011",
|
||||
"aarch64-pc-windows-msvc-0.8.9":
|
||||
"7dc9b954e236f842c2120bdb50307f23104ca20a52896c7ae0ea0100904b2aed",
|
||||
"aarch64-unknown-linux-gnu-0.8.9":
|
||||
"03108a851cb87ce44069767e0ae7907d9a31180bdd64913852fcde25848d84f2",
|
||||
"aarch64-unknown-linux-musl-0.8.9":
|
||||
"fb1f2800bfd0bc9a121269e276653899c726d81cd08d6299f0fb34b4b0d61fcf",
|
||||
"arm-unknown-linux-musleabihf-0.8.9":
|
||||
"9a73ca16557efd21d4dad17759261c6f93eb4079a95bb39c578998ad787ee871",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.9":
|
||||
"a6be2240c8bf070baaed8ee0a9071fe5f33b2fad55f67d39fcdc8ea720ff668a",
|
||||
"armv7-unknown-linux-musleabihf-0.8.9":
|
||||
"758bf39e33d3162fe6ec7bd5f359cc78daf8ce46b2300dec6c31f37b705521f9",
|
||||
"i686-pc-windows-msvc-0.8.9":
|
||||
"25988dae5e7698de1a6ff4bf08ed336d138710ee52f52de60859b99acf2bc96b",
|
||||
"i686-unknown-linux-gnu-0.8.9":
|
||||
"02a140e4d0af8d469ec088eff51ed9b232c76cfa02d4df0b84b7567c2d6ab95e",
|
||||
"i686-unknown-linux-musl-0.8.9":
|
||||
"99fa13e9079901365277b9b409a2892afe2efb0260f940388cadb2d56d706766",
|
||||
"powerpc64-unknown-linux-gnu-0.8.9":
|
||||
"604102c2bf07fbb3cc26bcb6b95e60cac55d74b4e21f1cee4b2d5f58930aa5cf",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.9":
|
||||
"8ab18629d8a71a4188761e4e2b0eca0970690f13c85697ad232fe8b22e8d5a99",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.9":
|
||||
"757944803901c5ca4049147e28e429e34c04d5ac5fe78728396ec4b810063b00",
|
||||
"s390x-unknown-linux-gnu-0.8.9":
|
||||
"b78f56186edfed8f117ed1fa09fc59ad9932864ae4e655ae61f3e205846c7ced",
|
||||
"x86_64-apple-darwin-0.8.9":
|
||||
"27fe8645c2599b672c3a6c865131a3d916eed9a3ba7cff5a0b863e01a473df66",
|
||||
"x86_64-pc-windows-msvc-0.8.9":
|
||||
"b08d68a0d86e4d0d1b5fa439ffa73ac90df2305c595f617ba9d9b5e8740a8efb",
|
||||
"x86_64-unknown-linux-gnu-0.8.9":
|
||||
"1056ab7c04bf9030dc0623c260fae0b414675775f333f318918000f667da6ee1",
|
||||
"x86_64-unknown-linux-musl-0.8.9":
|
||||
"6bb907345f9100978d3529c8a5b2cbb4e831080909c51a5bff714b491251303e",
|
||||
"aarch64-apple-darwin-0.8.8":
|
||||
"9de9365997d7579d27cdbc132883343b3c47add16804f11be679375037dec33a",
|
||||
"aarch64-pc-windows-msvc-0.8.8":
|
||||
"3029df83f2b40d2fa0cc896aed8a157afd02e8ce767064d80923e166e46b75ce",
|
||||
"aarch64-unknown-linux-gnu-0.8.8":
|
||||
"4e144807bef9a3b6f44fd5e4084d5010738787745c07e09dee4f008e8bee17a8",
|
||||
"aarch64-unknown-linux-musl-0.8.8":
|
||||
"fb7785d31a64f416ef67292ba3717781ef4eb1d6f93b6e30715d9127e862de2b",
|
||||
"arm-unknown-linux-musleabihf-0.8.8":
|
||||
"fb8ea8fa543322b4901b5acc585e1373dafd996d9aadce7d0c00c00ad36f2cdd",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.8":
|
||||
"684538c1aa5da718abb86b0f5a3c5d2eb05a11520e5c87a2b75050751adcc8c6",
|
||||
"armv7-unknown-linux-musleabihf-0.8.8":
|
||||
"c5eebbf9ae549ca45f563a9a9770c1534854a5c4056acac0ab3779b9e1f24d75",
|
||||
"i686-pc-windows-msvc-0.8.8":
|
||||
"9ec9bf63460e0625cd941a5bbe0775b99c33def5a2f1fe6cbc9e99e167fea33e",
|
||||
"i686-unknown-linux-gnu-0.8.8":
|
||||
"d934b2f6c892a25d928cdc2dfd42b3e925011992603879d2035bc7b15a236c35",
|
||||
"i686-unknown-linux-musl-0.8.8":
|
||||
"a5b258ee1f686bb58f912ce8c5def3531e0e4cd2bcfe3ee332bfaf3b35e674e0",
|
||||
"powerpc64-unknown-linux-gnu-0.8.8":
|
||||
"23dc87674b030bf4d7f4f1cd1b903d18ccaec43af0373d62e309ee79cbe2c2f8",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.8":
|
||||
"6a72bb057073ca989690882ac0ae70e6825151e0d2d52d37540be2dd41d70b56",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.8":
|
||||
"f107450c910336bfc636208d4d0430a8a6581d98824a4deee5715ac72b73c97a",
|
||||
"s390x-unknown-linux-gnu-0.8.8":
|
||||
"5aafe51b39dc715c887d6c1960d82659fa18a7505d0050e6eba36ae5956e4c96",
|
||||
"x86_64-apple-darwin-0.8.8":
|
||||
"3346a3d4a45d7457dafadcc1715e8e529e5b65c27aaba2417db4b0b32a8cbac6",
|
||||
"x86_64-pc-windows-msvc-0.8.8":
|
||||
"ac76b826e5ba70c7a041e9ee344cbcba2919cdd3010fff7f1a83b7864911633e",
|
||||
"x86_64-unknown-linux-gnu-0.8.8":
|
||||
"ecc2e39de86afea661c145f33f6a89a45b1d2427d51a22b458e2c64238794180",
|
||||
"x86_64-unknown-linux-musl-0.8.8":
|
||||
"80ee2bde42e1cc39c59ae8a3a20f5b73127b90ece009ef7bdd13ab189ff0c353",
|
||||
"aarch64-apple-darwin-0.8.7":
|
||||
"d1f056d2d04b07a69d2be6ed7eb07ece12dda26570a9af316309787865eba374",
|
||||
"aarch64-pc-windows-msvc-0.8.7":
|
||||
"5e0fdc7ebe4f237fa1b24a95116243e6c5fb52e0601aed3b7ca24b6a76b6c2ec",
|
||||
"aarch64-unknown-linux-gnu-0.8.7":
|
||||
"405965165e6c5a782d9b69e1a641a491533cec80390b0bfbe95eedcf5cdc5078",
|
||||
"aarch64-unknown-linux-musl-0.8.7":
|
||||
"70fa63fca7c7b1ccb5a96b8b5691f8dee2f2caeb61fcf6a110227e3f55fcf94c",
|
||||
"arm-unknown-linux-musleabihf-0.8.7":
|
||||
"172e93344f2aaee552e606150a1d9bd8de2df2716c81ecc332904e4b2713b964",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.7":
|
||||
"3277a9db5244767ed6e8848e487377dea69b67e0a196886696263ddbc5681daf",
|
||||
"armv7-unknown-linux-musleabihf-0.8.7":
|
||||
"3170d7251d8d2ab40c86a1b20221d6486baf5f52e7069525893cf20481cc8281",
|
||||
"i686-pc-windows-msvc-0.8.7":
|
||||
"f97b09e12f10e8e77b1519124f1f16720bbd64bc0436cad0868f4a2927a7a0e0",
|
||||
"i686-unknown-linux-gnu-0.8.7":
|
||||
"0e88d6a9f088f6632026d7009559d519598876db8b46540dcc6ff015bbf16b85",
|
||||
"i686-unknown-linux-musl-0.8.7":
|
||||
"1ab32b294aa94846ee9d1c2597ea8f617aade1e7faf2c8e460d5414d87dd8a58",
|
||||
"powerpc64-unknown-linux-gnu-0.8.7":
|
||||
"52fe0acf3cb57ee33407c1a2d25e66ec08ac6c4a259e016a54ea34cfe749f148",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.7":
|
||||
"ad8d7a098c7f1603adb55bf794a6ba952c715d5d05112482a6c9a9b63d04fef8",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.7":
|
||||
"f6bea3521a2d5b1593cb8f18d54237d0ae3b388cbd2cce83c1dcd4b512dde1a6",
|
||||
"s390x-unknown-linux-gnu-0.8.7":
|
||||
"ee877021eb1862d9d0cc37697267a01cfdae307c6a8bf7ece27ae92b330fd2d9",
|
||||
"x86_64-apple-darwin-0.8.7":
|
||||
"dca85ae222d59ddbd83f61355561d3183cce9d23eb5931c41646499f43cb2b93",
|
||||
"x86_64-pc-windows-msvc-0.8.7":
|
||||
"0baf6d021ca283df5e5c768ff51281043fefc889ac14aff8ce58189453166eef",
|
||||
"x86_64-unknown-linux-gnu-0.8.7":
|
||||
"060f68b7e86fee70ed19b852934ce6f05bb15d42894ce4a26c34a18b4c3cd511",
|
||||
"x86_64-unknown-linux-musl-0.8.7":
|
||||
"b1283a1b42f81dc79c2e58eb77a41e21fd4c59344d3d19e72810ab031ba93771",
|
||||
"aarch64-apple-darwin-0.8.6":
|
||||
"15269226c753f01137b5a35c79e59ab46d8aab25a242641fdc4003a6d0a831ff",
|
||||
"aarch64-pc-windows-msvc-0.8.6":
|
||||
"a2891f1f1c56e717115579da655951007e2e5e498535b473d9f7cbffe7369e1a",
|
||||
"aarch64-unknown-linux-gnu-0.8.6":
|
||||
"6fd314ca589788265ff99ec754bd2fa2a5d090ef592ddbbe8ded6b141615a491",
|
||||
"aarch64-unknown-linux-musl-0.8.6":
|
||||
"d78076c7e0dfcd3580736c11e009ef856bd13015f00406e3ded1fc895e2104ba",
|
||||
"arm-unknown-linux-musleabihf-0.8.6":
|
||||
"87d33a579cc2ee986e3163bb5de1791c6052ef8716d5fb8d8bf73aa2e5f1bf66",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.6":
|
||||
"4139d74dfe3192bc71dacd3cf0cdf6a006d121db2c4d841e08f369761baaf00e",
|
||||
"armv7-unknown-linux-musleabihf-0.8.6":
|
||||
"5d4d117cebddc7dbdbf6e1410c65868f113a75700acac77eed28dfdc0411c113",
|
||||
"i686-pc-windows-msvc-0.8.6":
|
||||
"4eaa185b61f9cfe73ab7534de7282e51cc0f6bf47361429bdcbb6a5f3264f6e4",
|
||||
"i686-unknown-linux-gnu-0.8.6":
|
||||
"7fb9324cfb0c57a9b9145e73598794c7bc4df01f50730bd926d4ab10d4fc59ff",
|
||||
"i686-unknown-linux-musl-0.8.6":
|
||||
"3c2e2d69e8da093df76ffffa9758669c33ae47624f73d06ec2a83a363f17fbd4",
|
||||
"powerpc64-unknown-linux-gnu-0.8.6":
|
||||
"264dbfddd58cdbd35b33ea24dd802a3409eae1d4516d057bdff88df2e257eaa2",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.6":
|
||||
"d34c6d7df2ed9e9739bc0313875e602a943b17fccbf1127f824a5ff9a3253bb5",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.6":
|
||||
"6bcd5a72977a4362f042cc2568960b5a42c1f13240ada6b1cce6aa2f6d6a3e42",
|
||||
"s390x-unknown-linux-gnu-0.8.6":
|
||||
"8b4372280249038ea5824937d6e1ca7e2192061bd38f3362200133ff55cbb9c3",
|
||||
"x86_64-apple-darwin-0.8.6":
|
||||
"4b1da363d8913a85a4a40df6620ae800b16c62beb54f60b1d336432644cb12bb",
|
||||
"x86_64-pc-windows-msvc-0.8.6":
|
||||
"f7ed402ea1e4d7fb2b2490e1a097e9849bfdaaa689521d290bdce5478db0428f",
|
||||
"x86_64-unknown-linux-gnu-0.8.6":
|
||||
"5429c9b96cab65198c2e5bfe83e933329aa16303a0369d5beedc71785a4a2f36",
|
||||
"x86_64-unknown-linux-musl-0.8.6":
|
||||
"0d89cffae3ad1c4ae2d4da06f71ad4539974185a31f7c196a6151b400bf84039",
|
||||
"aarch64-apple-darwin-0.8.5":
|
||||
"467e875ac84ac2155f048b56e33741d7dee6f02369048d5b6c05b74b745411e2",
|
||||
"aarch64-pc-windows-msvc-0.8.5":
|
||||
"8d3dda6ff64065e65b49ecd42018a885c0f20e6967af950ef121f976d73e72db",
|
||||
"aarch64-unknown-linux-gnu-0.8.5":
|
||||
"db05450c7c1e9dd51eeaf4b59c3bc3721bd9146e7ad95e87f5736d45c4037ae0",
|
||||
"aarch64-unknown-linux-musl-0.8.5":
|
||||
"400771c1136c9d5cf624bb1695b08d46a4e4e0fc2c9b8897e7be950ac5e00ae0",
|
||||
"arm-unknown-linux-musleabihf-0.8.5":
|
||||
"7dcd2a34735d2871714ee4993cf0227492c860ab089691a30f6a65d48ec469b6",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.5":
|
||||
"0032fa90b0a74559ac965538178499de6b396ec7ff9b8d8134f442d2d3079f8a",
|
||||
"armv7-unknown-linux-musleabihf-0.8.5":
|
||||
"daab0e8f9b563dcbd6bc6ac517a5f9ebe1b1dca9671011d40012c73f0cde8cd0",
|
||||
"i686-pc-windows-msvc-0.8.5":
|
||||
"2c133809d2839eac93341a14df6fb16bf834ae3c7582f069cf24ccc60cf367f7",
|
||||
"i686-unknown-linux-gnu-0.8.5":
|
||||
"6c6b88bf178f5bd508523457a589e09c885deb57983f8d73dfdd43794d6decfb",
|
||||
"i686-unknown-linux-musl-0.8.5":
|
||||
"5968f60135941a2bcca742bf44854bbbe8adfba4d0a170f5991d95572c0e4d26",
|
||||
"powerpc64-unknown-linux-gnu-0.8.5":
|
||||
"a4e7b7dca6386b8623c12581ecb606b31a9df53ca8acbbb14dec5ceaa23c1603",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.5":
|
||||
"1d521c56d8ee83b90f15350f1cebb506e2441e574b27acdbdfce8449ddbfa1c3",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.5":
|
||||
"ca7536b206090982e6f90d566bc441598a6aaad4cfc885618f12051c51a0e454",
|
||||
"s390x-unknown-linux-gnu-0.8.5":
|
||||
"92fd077879ea943775bebf49d3515b5da8a237bcb9a975b2476183946b6ed017",
|
||||
"x86_64-apple-darwin-0.8.5":
|
||||
"9ee5b34975ab4659345fc96cc08098d7ec871cdfa969a5774894bcaebdaf3b58",
|
||||
"x86_64-pc-windows-msvc-0.8.5":
|
||||
"898049e2db4a92e59bf1da7e14cad9b5afadb7d0cf9dd55a5274825290f7ba6d",
|
||||
"x86_64-unknown-linux-gnu-0.8.5":
|
||||
"9db7e7db3cf98ddb57954bfb72c9ba4b8a4514b910e666e3c57e8b4e83a0d630",
|
||||
"x86_64-unknown-linux-musl-0.8.5":
|
||||
"64aec5c2fa8255d19ff20480afb6445e29be94628c58a429c131f5c60bd990b5",
|
||||
"aarch64-apple-darwin-0.8.4":
|
||||
"ef6785df8c23232ce6209c04acefd0c0d2ffb3a3ba0eef16422bdfe99a059105",
|
||||
"aarch64-pc-windows-msvc-0.8.4":
|
||||
"34cdff9ed7e1ffece93a895e65377a0ea4f186eb6785ead045280be59edabf19",
|
||||
"aarch64-unknown-linux-gnu-0.8.4":
|
||||
"d42742a28ce161e72cce45c8c5621ee23317e30d461f595c382acf0f9b331f20",
|
||||
"aarch64-unknown-linux-musl-0.8.4":
|
||||
"d194e457ba2c9f4e737ee9919c66465e0297d956b6c7121b61d37b98e15a694c",
|
||||
"arm-unknown-linux-musleabihf-0.8.4":
|
||||
"cfd9d5c2d5bc462308c54e4224cb4102819cfc230cd7a75dcf5cd345969ab732",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.4":
|
||||
"234358eb9384c6392678d392ab0835daf500a71b6d78b5b33f10793c2c695d05",
|
||||
"armv7-unknown-linux-musleabihf-0.8.4":
|
||||
"65408f9aab2895faa1c523a064eef01f2d5cea4686ceb704217d8ece03a69a8c",
|
||||
"i686-pc-windows-msvc-0.8.4":
|
||||
"fc4fca95757e78fa4a782ae7f5cba4f52137df49b737cec0a6ad8092ca829151",
|
||||
"i686-unknown-linux-gnu-0.8.4":
|
||||
"d43485d5531529c4a57bf9b504e9ac1609a4467d220a268c38464d83d6df08b6",
|
||||
"i686-unknown-linux-musl-0.8.4":
|
||||
"cd4e9127d6562f0817060aa9c1b396afc7db31cdf48b73ecc347bd6f4f77f075",
|
||||
"powerpc64-unknown-linux-gnu-0.8.4":
|
||||
"3083419366b512e89e53f7e73c48ca15e28daa1ec674f5ef6492d06b0834e62d",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.4":
|
||||
"1e1164b8b2bfcd09daf5b32bada5fdc08b81d384bebd9707691cc48561749a27",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.4":
|
||||
"0b4e5e41b4c2836e6d8c1b4eb5151a0ea775908bc892ba62a8126fcdd7b06914",
|
||||
"s390x-unknown-linux-gnu-0.8.4":
|
||||
"28aefb0bac0349aa3f218cfa43ce50793f81c6948d01e2e4b97ea5421a2734ab",
|
||||
"x86_64-apple-darwin-0.8.4":
|
||||
"14e5309f182d1a92cf6c82f5891a0a0dc1cd5d46627171eaa1e84fa2b7e0afc3",
|
||||
"x86_64-pc-windows-msvc-0.8.4":
|
||||
"817c50c80229f88de9699626ee3774c0cceed86099663e8fb00c5ffae7ea911c",
|
||||
"x86_64-unknown-linux-gnu-0.8.4":
|
||||
"eb61d39fdc6ea21a6d00a24b50376102168240849c5022d3eba331f972ba3934",
|
||||
"x86_64-unknown-linux-musl-0.8.4":
|
||||
"4e16694fcc20a94136af70fb1449e8817150896af0339b6b28dfb6d006cd8116",
|
||||
"aarch64-apple-darwin-0.8.3":
|
||||
"9ebfe9f3b51187932ef97270b689da48261acacadd6ea7018d2cc62719c86ffe",
|
||||
"aarch64-pc-windows-msvc-0.8.3":
|
||||
"6e0692b817c5d6cfddad13ad177e866e36d95e8d32b4a296a49d937fdcda18d3",
|
||||
"aarch64-unknown-linux-gnu-0.8.3":
|
||||
"e82b5a3eb19e5087a6ea92800b0402f60378bd395e3483acd0b46124128ab71f",
|
||||
"aarch64-unknown-linux-musl-0.8.3":
|
||||
"05707835aadb8d0dfacf64a50dc31eb77fb11d1773b13ddd78d2404d43be3b7f",
|
||||
"arm-unknown-linux-musleabihf-0.8.3":
|
||||
"63f09a167470e40f5a7afce7ba726fa31d700042107215a8f46572a617b2ba64",
|
||||
"armv7-unknown-linux-gnueabihf-0.8.3":
|
||||
"ca3ab5110a248febf3af56ca8e417add5a164228d8861d2f6439d6c77654ad24",
|
||||
"armv7-unknown-linux-musleabihf-0.8.3":
|
||||
"79b9f2f8abf64b93aaf48f87b159bc34e73b92428c6424a9e633f481449bc8be",
|
||||
"i686-pc-windows-msvc-0.8.3":
|
||||
"5d272849a94b7ad36711f336d745e08ed3732042fc51f5c7f28bfc4e95463615",
|
||||
"i686-unknown-linux-gnu-0.8.3":
|
||||
"5ca9dcdd8aba4c59266536c00453f3815ccf4852a1bef78f181f4ae43726e742",
|
||||
"i686-unknown-linux-musl-0.8.3":
|
||||
"7a7eb903b673c0a0fa8282e12d2130fb63c1f0e574b1b8eb24ac63503db5db9e",
|
||||
"powerpc64-unknown-linux-gnu-0.8.3":
|
||||
"ad94079c0aa352730e5656246ecb8fd6cb5c7c1bbcc100954020f32128d6b0de",
|
||||
"powerpc64le-unknown-linux-gnu-0.8.3":
|
||||
"27ccd00f3c617b59d6977e48612dc5fe49d15c1181bf995863350e78002e54ac",
|
||||
"riscv64gc-unknown-linux-gnu-0.8.3":
|
||||
"897257393ca612058bb22691fab3a45480d3f7fc1df5bb968696576d7d98d6c1",
|
||||
"s390x-unknown-linux-gnu-0.8.3":
|
||||
"d148aebfc019aa14c686713fb0a391bb700290ecdf2903c2fdab0009182d880b",
|
||||
"x86_64-apple-darwin-0.8.3":
|
||||
"77eac9622f76ad89a8c59b31a96277aa61eb290d2949c69ab2061076471aeda2",
|
||||
"x86_64-pc-windows-msvc-0.8.3":
|
||||
"4ca84e28b08f48255f95156c5987d61a5e4c51a43372708bc6d84e994eeb7bdb",
|
||||
"x86_64-unknown-linux-gnu-0.8.3":
|
||||
"427c27ed5f87bf91aa045cf459ea34d348ed6377c62c3c054f1b4046b2f83fe2",
|
||||
"x86_64-unknown-linux-musl-0.8.3":
|
||||
"bfbe34caae328355b720ad0f667be99990b1b93721c8cb726e4a502796eb6d68",
|
||||
"aarch64-apple-darwin-0.8.2":
|
||||
"954d24634d5f37fa26c7af75eb79893d11623fc81b4de4b82d60d1ade4bfca22",
|
||||
"aarch64-pc-windows-msvc-0.8.2":
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
import { promises as fs } from "node:fs";
|
||||
import * as path from "node:path";
|
||||
import * as core from "@actions/core";
|
||||
import * as tc from "@actions/tool-cache";
|
||||
import * as path from "node:path";
|
||||
import type { Endpoints } from "@octokit/types";
|
||||
import * as pep440 from "@renovatebot/pep440";
|
||||
import { promises as fs } from "node:fs";
|
||||
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
|
||||
import { Octokit } from "../utils/octokit";
|
||||
import type { Architecture, Platform } from "../utils/platforms";
|
||||
import { validateChecksum } from "./checksum/checksum";
|
||||
import { Octokit } from "../utils/octokit";
|
||||
import {
|
||||
getDownloadUrl,
|
||||
getLatestKnownVersion as getLatestVersionInManifest,
|
||||
} from "./version-manifest";
|
||||
|
||||
type Release =
|
||||
Endpoints["GET /repos/{owner}/{repo}/releases"]["response"]["data"][number];
|
||||
|
||||
export function tryGetFromToolCache(
|
||||
arch: Architecture,
|
||||
version: string,
|
||||
@@ -24,11 +28,10 @@ export function tryGetFromToolCache(
|
||||
resolvedVersion = version;
|
||||
}
|
||||
const installedPath = tc.find(TOOL_CACHE_NAME, resolvedVersion, arch);
|
||||
return { version: resolvedVersion, installedPath };
|
||||
return { installedPath, version: resolvedVersion };
|
||||
}
|
||||
|
||||
export async function downloadVersionFromGithub(
|
||||
serverUrl: string,
|
||||
platform: Platform,
|
||||
arch: Architecture,
|
||||
version: string,
|
||||
@@ -37,7 +40,7 @@ export async function downloadVersionFromGithub(
|
||||
): Promise<{ version: string; cachedToolDir: string }> {
|
||||
const artifact = `uv-${arch}-${platform}`;
|
||||
const extension = getExtension(platform);
|
||||
const downloadUrl = `${serverUrl}/${OWNER}/${REPO}/releases/download/${version}/${artifact}${extension}`;
|
||||
const downloadUrl = `https://github.com/${OWNER}/${REPO}/releases/download/${version}/${artifact}${extension}`;
|
||||
return await downloadVersion(
|
||||
downloadUrl,
|
||||
artifact,
|
||||
@@ -68,7 +71,6 @@ export async function downloadVersionFromManifest(
|
||||
`manifest-file does not contain version ${version}, arch ${arch}, platform ${platform}. Falling back to GitHub releases.`,
|
||||
);
|
||||
return await downloadVersionFromGithub(
|
||||
"https://github.com",
|
||||
platform,
|
||||
arch,
|
||||
version,
|
||||
@@ -121,7 +123,7 @@ async function downloadVersion(
|
||||
version,
|
||||
arch,
|
||||
);
|
||||
return { version: version, cachedToolDir };
|
||||
return { cachedToolDir, version: version };
|
||||
}
|
||||
|
||||
function getExtension(platform: Platform): string {
|
||||
@@ -135,19 +137,29 @@ export async function resolveVersion(
|
||||
): Promise<string> {
|
||||
core.debug(`Resolving version: ${versionInput}`);
|
||||
let version: string;
|
||||
const isSimpleMinimumVersionSpecifier =
|
||||
versionInput.includes(">") && !versionInput.includes(",");
|
||||
if (isSimpleMinimumVersionSpecifier) {
|
||||
core.info("Found minimum version specifier, using latest version");
|
||||
}
|
||||
if (manifestFile) {
|
||||
version =
|
||||
versionInput === "latest"
|
||||
versionInput === "latest" || isSimpleMinimumVersionSpecifier
|
||||
? await getLatestVersionInManifest(manifestFile)
|
||||
: versionInput;
|
||||
} else {
|
||||
version =
|
||||
versionInput === "latest"
|
||||
versionInput === "latest" || isSimpleMinimumVersionSpecifier
|
||||
? await getLatestVersion(githubToken)
|
||||
: versionInput;
|
||||
}
|
||||
if (tc.isExplicitVersion(version)) {
|
||||
core.debug(`Version ${version} is an explicit version.`);
|
||||
if (isSimpleMinimumVersionSpecifier) {
|
||||
if (!pep440.satisfies(version, versionInput)) {
|
||||
throw new Error(`No version found for ${versionInput}`);
|
||||
}
|
||||
}
|
||||
return version;
|
||||
}
|
||||
const availableVersions = await getAvailableVersions(githubToken);
|
||||
@@ -160,6 +172,7 @@ export async function resolveVersion(
|
||||
}
|
||||
|
||||
async function getAvailableVersions(githubToken: string): Promise<string[]> {
|
||||
core.info("Getting available versions from GitHub API...");
|
||||
try {
|
||||
const octokit = new Octokit({
|
||||
auth: githubToken,
|
||||
@@ -177,18 +190,25 @@ async function getAvailableVersions(githubToken: string): Promise<string[]> {
|
||||
}
|
||||
}
|
||||
|
||||
async function getReleaseTagNames(
|
||||
octokit: InstanceType<typeof Octokit>,
|
||||
): Promise<string[]> {
|
||||
const response = await octokit.paginate(octokit.rest.repos.listReleases, {
|
||||
owner: OWNER,
|
||||
repo: REPO,
|
||||
});
|
||||
return response.map((release) => release.tag_name);
|
||||
async function getReleaseTagNames(octokit: Octokit): Promise<string[]> {
|
||||
const response: Release[] = await octokit.paginate(
|
||||
octokit.rest.repos.listReleases,
|
||||
{
|
||||
owner: OWNER,
|
||||
repo: REPO,
|
||||
},
|
||||
);
|
||||
const releaseTagNames = response.map((release) => release.tag_name);
|
||||
if (releaseTagNames.length === 0) {
|
||||
throw Error(
|
||||
"Github API request failed while getting releases. Check the GitHub status page for outages. Try again later.",
|
||||
);
|
||||
}
|
||||
return releaseTagNames;
|
||||
}
|
||||
|
||||
async function getLatestVersion(githubToken: string) {
|
||||
core.debug("Getting latest version...");
|
||||
core.info("Getting latest version from GitHub API...");
|
||||
const octokit = new Octokit({
|
||||
auth: githubToken,
|
||||
});
|
||||
@@ -197,14 +217,18 @@ async function getLatestVersion(githubToken: string) {
|
||||
try {
|
||||
latestRelease = await getLatestRelease(octokit);
|
||||
} catch (err) {
|
||||
core.info(
|
||||
"No (valid) GitHub token provided. Falling back to anonymous. Requests might be rate limited.",
|
||||
);
|
||||
if (err instanceof Error) {
|
||||
core.debug(err.message);
|
||||
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 Octokit();
|
||||
latestRelease = await getLatestRelease(octokit);
|
||||
} else {
|
||||
core.error(
|
||||
"Github API request failed while getting latest release. Check the GitHub status page for outages. Try again later.",
|
||||
);
|
||||
throw err;
|
||||
}
|
||||
const octokit = new Octokit();
|
||||
latestRelease = await getLatestRelease(octokit);
|
||||
}
|
||||
|
||||
if (!latestRelease) {
|
||||
@@ -214,7 +238,7 @@ async function getLatestVersion(githubToken: string) {
|
||||
return latestRelease.tag_name;
|
||||
}
|
||||
|
||||
async function getLatestRelease(octokit: InstanceType<typeof Octokit>) {
|
||||
async function getLatestRelease(octokit: Octokit) {
|
||||
const { data: latestRelease } = await octokit.rest.repos.getLatestRelease({
|
||||
owner: OWNER,
|
||||
repo: REPO,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { promises as fs } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
import * as core from "@actions/core";
|
||||
import * as semver from "semver";
|
||||
import { fetch } from "../utils/fetch";
|
||||
import { join } from "node:path";
|
||||
|
||||
const localManifestFile = join(__dirname, "..", "..", "version-manifest.json");
|
||||
|
||||
@@ -79,11 +79,11 @@ export async function updateVersionManifest(
|
||||
}
|
||||
const artifactParts = artifactName.split(".")[0].split("-");
|
||||
manifest.push({
|
||||
version: version,
|
||||
artifactName: artifactName,
|
||||
arch: artifactParts[1],
|
||||
platform: artifactName.split(`uv-${artifactParts[1]}-`)[1].split(".")[0],
|
||||
artifactName: artifactName,
|
||||
downloadUrl: downloadUrl,
|
||||
platform: artifactName.split(`uv-${artifactParts[1]}-`)[1].split(".")[0],
|
||||
version: version,
|
||||
});
|
||||
}
|
||||
core.debug(`Updating manifest-file: ${JSON.stringify(manifest)}`);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import * as crypto from "node:crypto";
|
||||
import * as core from "@actions/core";
|
||||
import * as fs from "node:fs";
|
||||
import * as stream from "node:stream";
|
||||
import * as util from "node:util";
|
||||
import * as core from "@actions/core";
|
||||
import { create } from "@actions/glob";
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,22 +1,31 @@
|
||||
import * as fs from "node:fs";
|
||||
import * as cache from "@actions/cache";
|
||||
import * as core from "@actions/core";
|
||||
import * as exec from "@actions/exec";
|
||||
import * as fs from "node:fs";
|
||||
import * as pep440 from "@renovatebot/pep440";
|
||||
import {
|
||||
STATE_CACHE_MATCHED_KEY,
|
||||
STATE_CACHE_KEY,
|
||||
STATE_CACHE_MATCHED_KEY,
|
||||
} from "./cache/restore-cache";
|
||||
import { STATE_UV_PATH, STATE_UV_VERSION } from "./utils/constants";
|
||||
import {
|
||||
cacheLocalPath,
|
||||
cachePython,
|
||||
enableCache,
|
||||
ignoreNothingToCache,
|
||||
pythonDir,
|
||||
pruneCache as shouldPruneCache,
|
||||
saveCache as shouldSaveCache,
|
||||
} from "./utils/inputs";
|
||||
|
||||
export async function run(): Promise<void> {
|
||||
try {
|
||||
if (enableCache) {
|
||||
await saveCache();
|
||||
if (shouldSaveCache) {
|
||||
await saveCache();
|
||||
} else {
|
||||
core.info("save-cache is false. Skipping save cache step.");
|
||||
}
|
||||
// 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
|
||||
@@ -47,14 +56,35 @@ async function saveCache(): Promise<void> {
|
||||
await pruneCache();
|
||||
}
|
||||
|
||||
core.info(`Saving cache path: ${cacheLocalPath}`);
|
||||
if (!fs.existsSync(cacheLocalPath) && !ignoreNothingToCache) {
|
||||
let actualCachePath = cacheLocalPath;
|
||||
if (process.env.UV_CACHE_DIR && process.env.UV_CACHE_DIR !== cacheLocalPath) {
|
||||
core.warning(
|
||||
`The environment variable UV_CACHE_DIR has been changed to "${process.env.UV_CACHE_DIR}", by an action or step running after astral-sh/setup-uv. This can lead to unexpected behavior. If you expected this to happen set the cache-local-path input to "${process.env.UV_CACHE_DIR}" instead of "${cacheLocalPath}".`,
|
||||
);
|
||||
actualCachePath = process.env.UV_CACHE_DIR;
|
||||
}
|
||||
|
||||
core.info(`Saving cache path: ${actualCachePath}`);
|
||||
if (!fs.existsSync(actualCachePath) && !ignoreNothingToCache) {
|
||||
throw new Error(
|
||||
`Cache path ${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.`,
|
||||
`Cache path ${actualCachePath} 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.`,
|
||||
);
|
||||
}
|
||||
|
||||
const cachePaths = [actualCachePath];
|
||||
if (cachePython) {
|
||||
core.info(`Including Python cache path: ${pythonDir}`);
|
||||
if (!fs.existsSync(pythonDir) && !ignoreNothingToCache) {
|
||||
throw new Error(
|
||||
`Python cache path ${pythonDir} 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.`,
|
||||
);
|
||||
}
|
||||
cachePaths.push(pythonDir);
|
||||
}
|
||||
|
||||
core.info(`Final cache paths: ${cachePaths.join(", ")}`);
|
||||
try {
|
||||
await cache.saveCache([cacheLocalPath], cacheKey);
|
||||
await cache.saveCache(cachePaths, cacheKey);
|
||||
core.info(`cache saved with the key: ${cacheKey}`);
|
||||
} catch (e) {
|
||||
if (
|
||||
@@ -72,13 +102,19 @@ async function saveCache(): Promise<void> {
|
||||
}
|
||||
|
||||
async function pruneCache(): Promise<void> {
|
||||
const forceSupported = pep440.gte(core.getState(STATE_UV_VERSION), "0.8.24");
|
||||
|
||||
const options: exec.ExecOptions = {
|
||||
silent: !core.isDebug(),
|
||||
silent: false,
|
||||
};
|
||||
const execArgs = ["cache", "prune", "--ci"];
|
||||
if (forceSupported) {
|
||||
execArgs.push("--force");
|
||||
}
|
||||
|
||||
core.info("Pruning cache...");
|
||||
await exec.exec("uv", execArgs, options);
|
||||
const uvPath = core.getState(STATE_UV_PATH);
|
||||
await exec.exec(uvPath, execArgs, options);
|
||||
}
|
||||
|
||||
run();
|
||||
|
||||
157
src/setup-uv.ts
157
src/setup-uv.ts
@@ -1,37 +1,38 @@
|
||||
import * as core from "@actions/core";
|
||||
import fs from "node:fs";
|
||||
import * as path from "node:path";
|
||||
import {
|
||||
tryGetFromToolCache,
|
||||
resolveVersion,
|
||||
downloadVersionFromGithub,
|
||||
downloadVersionFromManifest,
|
||||
} from "./download/download-version";
|
||||
import * as core from "@actions/core";
|
||||
import * as exec from "@actions/exec";
|
||||
import { restoreCache } from "./cache/restore-cache";
|
||||
|
||||
import {
|
||||
downloadVersionFromManifest,
|
||||
resolveVersion,
|
||||
tryGetFromToolCache,
|
||||
} from "./download/download-version";
|
||||
import { getConfigValueFromTomlFile } from "./utils/config-file";
|
||||
import { STATE_UV_PATH, STATE_UV_VERSION } from "./utils/constants";
|
||||
import {
|
||||
activateEnvironment as activateEnvironmentInput,
|
||||
addProblemMatchers,
|
||||
cacheLocalPath,
|
||||
checkSum,
|
||||
enableCache,
|
||||
githubToken,
|
||||
ignoreEmptyWorkdir,
|
||||
manifestFile,
|
||||
pythonDir,
|
||||
pythonVersion,
|
||||
toolBinDir,
|
||||
toolDir,
|
||||
versionFile as versionFileInput,
|
||||
version as versionInput,
|
||||
workingDirectory,
|
||||
} from "./utils/inputs";
|
||||
import {
|
||||
type Architecture,
|
||||
getArch,
|
||||
getPlatform,
|
||||
type Platform,
|
||||
} from "./utils/platforms";
|
||||
import {
|
||||
activateEnvironment as activateEnvironmentInput,
|
||||
cacheLocalPath,
|
||||
checkSum,
|
||||
ignoreEmptyWorkdir,
|
||||
enableCache,
|
||||
githubToken,
|
||||
pythonVersion,
|
||||
toolBinDir,
|
||||
toolDir,
|
||||
version as versionInput,
|
||||
versionFile as versionFileInput,
|
||||
workingDirectory,
|
||||
serverUrl,
|
||||
manifestFile,
|
||||
} from "./utils/inputs";
|
||||
import * as exec from "@actions/exec";
|
||||
import fs from "node:fs";
|
||||
import { getUvVersionFromFile } from "./version/resolve";
|
||||
|
||||
async function run(): Promise<void> {
|
||||
@@ -51,12 +52,14 @@ async function run(): Promise<void> {
|
||||
addToolBinToPath();
|
||||
addUvToPathAndOutput(setupResult.uvDir);
|
||||
setToolDir();
|
||||
addPythonDirToPath();
|
||||
setupPython();
|
||||
await activateEnvironment();
|
||||
addMatchers();
|
||||
setCacheDir(cacheLocalPath);
|
||||
setCacheDir();
|
||||
|
||||
core.setOutput("uv-version", setupResult.version);
|
||||
core.saveState(STATE_UV_VERSION, setupResult.version);
|
||||
core.info(`Successfully installed uv version ${setupResult.version}`);
|
||||
|
||||
if (enableCache) {
|
||||
@@ -98,29 +101,14 @@ async function setupUv(
|
||||
};
|
||||
}
|
||||
|
||||
let downloadVersionResult: { version: string; cachedToolDir: string };
|
||||
if (serverUrl !== "https://github.com") {
|
||||
core.warning(
|
||||
"The input server-url is deprecated. Please use manifest-file instead.",
|
||||
);
|
||||
downloadVersionResult = await downloadVersionFromGithub(
|
||||
serverUrl,
|
||||
platform,
|
||||
arch,
|
||||
resolvedVersion,
|
||||
checkSum,
|
||||
githubToken,
|
||||
);
|
||||
} else {
|
||||
downloadVersionResult = await downloadVersionFromManifest(
|
||||
manifestFile,
|
||||
platform,
|
||||
arch,
|
||||
resolvedVersion,
|
||||
checkSum,
|
||||
githubToken,
|
||||
);
|
||||
}
|
||||
const downloadVersionResult = await downloadVersionFromManifest(
|
||||
manifestFile,
|
||||
platform,
|
||||
arch,
|
||||
resolvedVersion,
|
||||
checkSum,
|
||||
githubToken,
|
||||
);
|
||||
|
||||
return {
|
||||
uvDir: downloadVersionResult.cachedToolDir,
|
||||
@@ -163,18 +151,31 @@ async function determineVersion(
|
||||
|
||||
function addUvToPathAndOutput(cachedPath: string): void {
|
||||
core.setOutput("uv-path", `${cachedPath}${path.sep}uv`);
|
||||
core.saveState(STATE_UV_PATH, `${cachedPath}${path.sep}uv`);
|
||||
core.setOutput("uvx-path", `${cachedPath}${path.sep}uvx`);
|
||||
core.addPath(cachedPath);
|
||||
core.info(`Added ${cachedPath} to the path`);
|
||||
if (process.env.UV_NO_MODIFY_PATH !== undefined) {
|
||||
core.info("UV_NO_MODIFY_PATH is set, not modifying PATH");
|
||||
} else {
|
||||
core.addPath(cachedPath);
|
||||
core.info(`Added ${cachedPath} to the path`);
|
||||
}
|
||||
}
|
||||
|
||||
function addToolBinToPath(): void {
|
||||
if (toolBinDir !== undefined) {
|
||||
core.exportVariable("UV_TOOL_BIN_DIR", toolBinDir);
|
||||
core.info(`Set UV_TOOL_BIN_DIR to ${toolBinDir}`);
|
||||
core.addPath(toolBinDir);
|
||||
core.info(`Added ${toolBinDir} to the path`);
|
||||
if (process.env.UV_NO_MODIFY_PATH !== undefined) {
|
||||
core.info(`UV_NO_MODIFY_PATH is set, not adding ${toolBinDir} to path`);
|
||||
} else {
|
||||
core.addPath(toolBinDir);
|
||||
core.info(`Added ${toolBinDir} to the path`);
|
||||
}
|
||||
} else {
|
||||
if (process.env.UV_NO_MODIFY_PATH !== undefined) {
|
||||
core.info("UV_NO_MODIFY_PATH is set, not adding user local bin to path");
|
||||
return;
|
||||
}
|
||||
if (process.env.XDG_BIN_HOME !== undefined) {
|
||||
core.addPath(process.env.XDG_BIN_HOME);
|
||||
core.info(`Added ${process.env.XDG_BIN_HOME} to the path`);
|
||||
@@ -195,6 +196,17 @@ function setToolDir(): void {
|
||||
}
|
||||
}
|
||||
|
||||
function addPythonDirToPath(): void {
|
||||
core.exportVariable("UV_PYTHON_INSTALL_DIR", pythonDir);
|
||||
core.info(`Set UV_PYTHON_INSTALL_DIR to ${pythonDir}`);
|
||||
if (process.env.UV_NO_MODIFY_PATH !== undefined) {
|
||||
core.info("UV_NO_MODIFY_PATH is set, not adding python dir to path");
|
||||
} else {
|
||||
core.addPath(pythonDir);
|
||||
core.info(`Added ${pythonDir} to the path`);
|
||||
}
|
||||
}
|
||||
|
||||
function setupPython(): void {
|
||||
if (pythonVersion !== "") {
|
||||
core.exportVariable("UV_PYTHON", pythonVersion);
|
||||
@@ -204,31 +216,46 @@ function setupPython(): void {
|
||||
|
||||
async function activateEnvironment(): Promise<void> {
|
||||
if (activateEnvironmentInput) {
|
||||
if (process.env.UV_NO_MODIFY_PATH !== undefined) {
|
||||
throw new Error(
|
||||
"UV_NO_MODIFY_PATH and activate-environment cannot be used together.",
|
||||
);
|
||||
}
|
||||
const execArgs = ["venv", ".venv", "--directory", workingDirectory];
|
||||
|
||||
core.info("Activating python venv...");
|
||||
await exec.exec("uv", execArgs);
|
||||
|
||||
let venvBinPath = `${workingDirectory}${path.sep}.venv${path.sep}bin`;
|
||||
const venvPath = path.resolve(`${workingDirectory}${path.sep}.venv`);
|
||||
let venvBinPath = `${venvPath}${path.sep}bin`;
|
||||
if (process.platform === "win32") {
|
||||
venvBinPath = `${workingDirectory}${path.sep}.venv${path.sep}Scripts`;
|
||||
venvBinPath = `${venvPath}${path.sep}Scripts`;
|
||||
}
|
||||
core.addPath(path.resolve(venvBinPath));
|
||||
core.exportVariable(
|
||||
"VIRTUAL_ENV",
|
||||
path.resolve(`${workingDirectory}${path.sep}.venv`),
|
||||
);
|
||||
core.exportVariable("VIRTUAL_ENV", venvPath);
|
||||
core.setOutput("venv", venvPath);
|
||||
}
|
||||
}
|
||||
|
||||
function setCacheDir(cacheLocalPath: string): void {
|
||||
core.exportVariable("UV_CACHE_DIR", cacheLocalPath);
|
||||
core.info(`Set UV_CACHE_DIR to ${cacheLocalPath}`);
|
||||
function setCacheDir(): void {
|
||||
if (enableCache) {
|
||||
const cacheDirFromConfig = getConfigValueFromTomlFile("", "cache-dir");
|
||||
if (cacheDirFromConfig !== undefined) {
|
||||
core.info(
|
||||
"Using cache-dir from uv config file, not modifying UV_CACHE_DIR",
|
||||
);
|
||||
return;
|
||||
}
|
||||
core.exportVariable("UV_CACHE_DIR", cacheLocalPath);
|
||||
core.info(`Set UV_CACHE_DIR to ${cacheLocalPath}`);
|
||||
}
|
||||
}
|
||||
|
||||
function addMatchers(): void {
|
||||
const matchersPath = path.join(__dirname, `..${path.sep}..`, ".github");
|
||||
core.info(`##[add-matcher]${path.join(matchersPath, "python.json")}`);
|
||||
if (addProblemMatchers) {
|
||||
const matchersPath = path.join(__dirname, `..${path.sep}..`, ".github");
|
||||
core.info(`##[add-matcher]${path.join(matchersPath, "python.json")}`);
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
import * as semver from "semver";
|
||||
import * as core from "@actions/core";
|
||||
import { Octokit } from "./utils/octokit";
|
||||
|
||||
import { OWNER, REPO } from "./utils/constants";
|
||||
|
||||
import type { Endpoints } from "@octokit/types";
|
||||
import * as semver from "semver";
|
||||
import { updateChecksums } from "./download/checksum/update-known-checksums";
|
||||
import {
|
||||
updateVersionManifest,
|
||||
getLatestKnownVersion,
|
||||
updateVersionManifest,
|
||||
} from "./download/version-manifest";
|
||||
import { OWNER, REPO } from "./utils/constants";
|
||||
import { Octokit } from "./utils/octokit";
|
||||
|
||||
type Release =
|
||||
Endpoints["GET /repos/{owner}/{repo}/releases"]["response"]["data"][number];
|
||||
|
||||
async function run(): Promise<void> {
|
||||
const checksumFilePath = process.argv.slice(2)[0];
|
||||
@@ -33,10 +35,13 @@ async function run(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
const releases = await octokit.paginate(octokit.rest.repos.listReleases, {
|
||||
owner: OWNER,
|
||||
repo: REPO,
|
||||
});
|
||||
const releases: Release[] = await octokit.paginate(
|
||||
octokit.rest.repos.listReleases,
|
||||
{
|
||||
owner: OWNER,
|
||||
repo: REPO,
|
||||
},
|
||||
);
|
||||
const checksumDownloadUrls: string[] = releases.flatMap((release) =>
|
||||
release.assets
|
||||
.filter((asset) => asset.name.endsWith(".sha256"))
|
||||
|
||||
24
src/utils/config-file.ts
Normal file
24
src/utils/config-file.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import fs from "node:fs";
|
||||
import * as toml from "smol-toml";
|
||||
|
||||
export function getConfigValueFromTomlFile(
|
||||
filePath: string,
|
||||
key: string,
|
||||
): string | undefined {
|
||||
if (!fs.existsSync(filePath) || !filePath.endsWith(".toml")) {
|
||||
return undefined;
|
||||
}
|
||||
const fileContent = fs.readFileSync(filePath, "utf-8");
|
||||
|
||||
if (filePath.endsWith("pyproject.toml")) {
|
||||
const tomlContent = toml.parse(fileContent) as {
|
||||
tool?: { uv?: Record<string, string | undefined> };
|
||||
};
|
||||
return tomlContent?.tool?.uv?.[key];
|
||||
}
|
||||
const tomlContent = toml.parse(fileContent) as Record<
|
||||
string,
|
||||
string | undefined
|
||||
>;
|
||||
return tomlContent[key];
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
export const REPO = "uv";
|
||||
export const OWNER = "astral-sh";
|
||||
export const TOOL_CACHE_NAME = "uv";
|
||||
export const STATE_UV_PATH = "uv-path";
|
||||
export const STATE_UV_VERSION = "uv-version";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { fetch as undiciFetch, ProxyAgent, type RequestInit } from "undici";
|
||||
import { ProxyAgent, type RequestInit, fetch as undiciFetch } from "undici";
|
||||
|
||||
export function getProxyAgent() {
|
||||
const httpProxy = process.env.HTTP_PROXY || process.env.http_proxy;
|
||||
|
||||
@@ -1,26 +1,41 @@
|
||||
import * as core from "@actions/core";
|
||||
import path from "node:path";
|
||||
import * as core from "@actions/core";
|
||||
import { getConfigValueFromTomlFile } from "./config-file";
|
||||
|
||||
export const workingDirectory = core.getInput("working-directory");
|
||||
export const version = core.getInput("version");
|
||||
export const versionFile = core.getInput("version-file");
|
||||
export const versionFile = getVersionFile();
|
||||
export const pythonVersion = core.getInput("python-version");
|
||||
export const activateEnvironment = core.getBooleanInput("activate-environment");
|
||||
export const workingDirectory = core.getInput("working-directory");
|
||||
export const checkSum = core.getInput("checksum");
|
||||
export const enableCache = getEnableCache();
|
||||
export const restoreCache = core.getInput("restore-cache") === "true";
|
||||
export const saveCache = core.getInput("save-cache") === "true";
|
||||
export const cacheSuffix = core.getInput("cache-suffix") || "";
|
||||
export const cacheLocalPath = getCacheLocalPath();
|
||||
export const cacheDependencyGlob = getCacheDependencyGlob();
|
||||
export const pruneCache = core.getInput("prune-cache") === "true";
|
||||
export const cachePython = core.getInput("cache-python") === "true";
|
||||
export const ignoreNothingToCache =
|
||||
core.getInput("ignore-nothing-to-cache") === "true";
|
||||
export const ignoreEmptyWorkdir =
|
||||
core.getInput("ignore-empty-workdir") === "true";
|
||||
export const toolBinDir = getToolBinDir();
|
||||
export const toolDir = getToolDir();
|
||||
export const serverUrl = core.getInput("server-url");
|
||||
export const pythonDir = getUvPythonDir();
|
||||
export const githubToken = core.getInput("github-token");
|
||||
export const manifestFile = getManifestFile();
|
||||
export const addProblemMatchers =
|
||||
core.getInput("add-problem-matchers") === "true";
|
||||
|
||||
function getVersionFile(): string {
|
||||
const versionFileInput = core.getInput("version-file");
|
||||
if (versionFileInput !== "") {
|
||||
const tildeExpanded = expandTilde(versionFileInput);
|
||||
return resolveRelativePath(tildeExpanded);
|
||||
}
|
||||
return versionFileInput;
|
||||
}
|
||||
|
||||
function getEnableCache(): boolean {
|
||||
const enableCacheInput = core.getInput("enable-cache");
|
||||
@@ -70,6 +85,14 @@ function getCacheLocalPath(): string {
|
||||
const tildeExpanded = expandTilde(cacheLocalPathInput);
|
||||
return resolveRelativePath(tildeExpanded);
|
||||
}
|
||||
const cacheDirFromConfig = getCacheDirFromConfig();
|
||||
if (cacheDirFromConfig !== undefined) {
|
||||
return cacheDirFromConfig;
|
||||
}
|
||||
if (process.env.UV_CACHE_DIR !== undefined) {
|
||||
core.info(`UV_CACHE_DIR is already set to ${process.env.UV_CACHE_DIR}`);
|
||||
return process.env.UV_CACHE_DIR;
|
||||
}
|
||||
if (process.env.RUNNER_ENVIRONMENT === "github-hosted") {
|
||||
if (process.env.RUNNER_TEMP !== undefined) {
|
||||
return `${process.env.RUNNER_TEMP}${path.sep}setup-uv-cache`;
|
||||
@@ -84,6 +107,46 @@ function getCacheLocalPath(): string {
|
||||
return `${process.env.HOME}${path.sep}.cache${path.sep}uv`;
|
||||
}
|
||||
|
||||
function getCacheDirFromConfig(): string | undefined {
|
||||
for (const filePath of [versionFile, "uv.toml", "pyproject.toml"]) {
|
||||
const resolvedPath = resolveRelativePath(filePath);
|
||||
try {
|
||||
const cacheDir = getConfigValueFromTomlFile(resolvedPath, "cache-dir");
|
||||
if (cacheDir !== undefined) {
|
||||
core.info(`Found cache-dir in ${resolvedPath}: ${cacheDir}`);
|
||||
return cacheDir;
|
||||
}
|
||||
} catch (err) {
|
||||
const message = (err as Error).message;
|
||||
core.warning(`Error while parsing ${filePath}: ${message}`);
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
export function getUvPythonDir(): string {
|
||||
if (process.env.UV_PYTHON_INSTALL_DIR !== undefined) {
|
||||
core.info(
|
||||
`UV_PYTHON_INSTALL_DIR is already set to ${process.env.UV_PYTHON_INSTALL_DIR}`,
|
||||
);
|
||||
return process.env.UV_PYTHON_INSTALL_DIR;
|
||||
}
|
||||
if (process.env.RUNNER_ENVIRONMENT !== "github-hosted") {
|
||||
if (process.platform === "win32") {
|
||||
return `${process.env.APPDATA}${path.sep}uv${path.sep}python`;
|
||||
} else {
|
||||
return `${process.env.HOME}${path.sep}.local${path.sep}share${path.sep}uv${path.sep}python`;
|
||||
}
|
||||
}
|
||||
if (process.env.RUNNER_TEMP !== undefined) {
|
||||
return `${process.env.RUNNER_TEMP}${path.sep}uv-python-dir`;
|
||||
}
|
||||
throw Error(
|
||||
"Could not determine UV_PYTHON_INSTALL_DIR. Please make sure RUNNER_TEMP is set or provide the UV_PYTHON_INSTALL_DIR environment variable",
|
||||
);
|
||||
}
|
||||
|
||||
function getCacheDependencyGlob(): string {
|
||||
const cacheDependencyGlobInput = core.getInput("cache-dependency-glob");
|
||||
if (cacheDependencyGlobInput !== "") {
|
||||
@@ -105,12 +168,15 @@ function expandTilde(input: string): string {
|
||||
}
|
||||
|
||||
function resolveRelativePath(inputPath: string): string {
|
||||
if (path.isAbsolute(inputPath)) {
|
||||
return inputPath;
|
||||
}
|
||||
const absolutePath = `${workingDirectory}${path.sep}${inputPath}`;
|
||||
core.debug(`Resolving relative path ${inputPath} to ${absolutePath}`);
|
||||
return absolutePath;
|
||||
const hasNegation = inputPath.startsWith("!");
|
||||
const pathWithoutNegation = hasNegation ? inputPath.substring(1) : inputPath;
|
||||
|
||||
const resolvedPath = path.resolve(workingDirectory, pathWithoutNegation);
|
||||
|
||||
core.debug(
|
||||
`Resolving relative path ${inputPath} to ${hasNegation ? "!" : ""}${resolvedPath}`,
|
||||
);
|
||||
return hasNegation ? `!${resolvedPath}` : resolvedPath;
|
||||
}
|
||||
|
||||
function getManifestFile(): string | undefined {
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
import type { OctokitOptions } from "@octokit/core";
|
||||
import { Octokit as Core } from "@octokit/core";
|
||||
import type {
|
||||
Constructor,
|
||||
OctokitOptions,
|
||||
} from "@octokit/core/dist-types/types";
|
||||
import {
|
||||
paginateRest,
|
||||
type PaginateInterface,
|
||||
paginateRest,
|
||||
} from "@octokit/plugin-paginate-rest";
|
||||
import { legacyRestEndpointMethods } from "@octokit/plugin-rest-endpoint-methods";
|
||||
import { fetch as customFetch } from "./fetch";
|
||||
@@ -17,22 +14,21 @@ const DEFAULTS = {
|
||||
userAgent: "setup-uv",
|
||||
};
|
||||
|
||||
export const Octokit: typeof Core &
|
||||
Constructor<
|
||||
{
|
||||
paginate: PaginateInterface;
|
||||
} & ReturnType<typeof legacyRestEndpointMethods>
|
||||
> = Core.plugin(paginateRest, legacyRestEndpointMethods).defaults(
|
||||
function buildDefaults(options: OctokitOptions): OctokitOptions {
|
||||
return {
|
||||
...DEFAULTS,
|
||||
...options,
|
||||
request: {
|
||||
fetch: customFetch,
|
||||
...options.request,
|
||||
},
|
||||
};
|
||||
},
|
||||
);
|
||||
const OctokitWithPlugins = Core.plugin(paginateRest, legacyRestEndpointMethods);
|
||||
|
||||
export type Octokit = InstanceType<typeof Octokit>;
|
||||
export const Octokit = OctokitWithPlugins.defaults(function buildDefaults(
|
||||
options: OctokitOptions,
|
||||
): OctokitOptions {
|
||||
return {
|
||||
...DEFAULTS,
|
||||
...options,
|
||||
request: {
|
||||
fetch: customFetch,
|
||||
...options.request,
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
export type Octokit = InstanceType<typeof OctokitWithPlugins> & {
|
||||
paginate: PaginateInterface;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as exec from "@actions/exec";
|
||||
import * as core from "@actions/core";
|
||||
import * as exec from "@actions/exec";
|
||||
export type Platform =
|
||||
| "unknown-linux-gnu"
|
||||
| "unknown-linux-musl"
|
||||
@@ -16,11 +16,11 @@ export type Architecture =
|
||||
export function getArch(): Architecture | undefined {
|
||||
const arch = process.arch;
|
||||
const archMapping: { [key: string]: Architecture } = {
|
||||
ia32: "i686",
|
||||
x64: "x86_64",
|
||||
arm64: "aarch64",
|
||||
s390x: "s390x",
|
||||
ia32: "i686",
|
||||
ppc64: "powerpc64le",
|
||||
s390x: "s390x",
|
||||
x64: "x86_64",
|
||||
};
|
||||
|
||||
if (arch in archMapping) {
|
||||
@@ -31,8 +31,8 @@ export function getArch(): Architecture | undefined {
|
||||
export async function getPlatform(): Promise<Platform | undefined> {
|
||||
const processPlatform = process.platform;
|
||||
const platformMapping: { [key: string]: Platform } = {
|
||||
linux: "unknown-linux-gnu",
|
||||
darwin: "apple-darwin",
|
||||
linux: "unknown-linux-gnu",
|
||||
win32: "pc-windows-msvc",
|
||||
};
|
||||
|
||||
@@ -50,16 +50,16 @@ async function isMuslOs(): Promise<boolean> {
|
||||
let stdOutput = "";
|
||||
let errOutput = "";
|
||||
const options: exec.ExecOptions = {
|
||||
silent: !core.isDebug(),
|
||||
ignoreReturnCode: true,
|
||||
listeners: {
|
||||
stdout: (data: Buffer) => {
|
||||
stdOutput += data.toString();
|
||||
},
|
||||
stderr: (data: Buffer) => {
|
||||
errOutput += data.toString();
|
||||
},
|
||||
stdout: (data: Buffer) => {
|
||||
stdOutput += data.toString();
|
||||
},
|
||||
},
|
||||
ignoreReturnCode: true,
|
||||
silent: !core.isDebug(),
|
||||
};
|
||||
|
||||
try {
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
import fs from "node:fs";
|
||||
import * as toml from "smol-toml";
|
||||
|
||||
export function getRequiredVersionFromConfigFile(
|
||||
filePath: string,
|
||||
): string | undefined {
|
||||
if (!filePath.endsWith(".toml")) {
|
||||
return 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"];
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as toml from "smol-toml";
|
||||
import fs from "node:fs";
|
||||
import * as toml from "smol-toml";
|
||||
|
||||
export function getUvVersionFromRequirementsFile(
|
||||
filePath: string,
|
||||
@@ -16,7 +16,7 @@ function getUvVersionFromAllDependencies(
|
||||
): string | undefined {
|
||||
return allDependencies
|
||||
.find((dep: string) => dep.match(/^uv[=<>~!]/))
|
||||
?.match(/^uv([=<>~!]+.*)$/)?.[1]
|
||||
?.match(/^uv([=<>~!]+\S*)/)?.[1]
|
||||
.trim();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import * as core from "@actions/core";
|
||||
import fs from "node:fs";
|
||||
import { getRequiredVersionFromConfigFile } from "./config-file";
|
||||
import * as core from "@actions/core";
|
||||
import { getConfigValueFromTomlFile } from "../utils/config-file";
|
||||
import { getUvVersionFromRequirementsFile } from "./requirements-file";
|
||||
import { getUvVersionFromToolVersions } from "./tool-versions-file";
|
||||
|
||||
export function getUvVersionFromFile(filePath: string): string | undefined {
|
||||
core.info(`Trying to find version for uv in: ${filePath}`);
|
||||
@@ -11,7 +12,10 @@ export function getUvVersionFromFile(filePath: string): string | undefined {
|
||||
}
|
||||
let uvVersion: string | undefined;
|
||||
try {
|
||||
uvVersion = getRequiredVersionFromConfigFile(filePath);
|
||||
uvVersion = getUvVersionFromToolVersions(filePath);
|
||||
if (uvVersion === undefined) {
|
||||
uvVersion = getConfigValueFromTomlFile(filePath, "required-version");
|
||||
}
|
||||
if (uvVersion === undefined) {
|
||||
uvVersion = getUvVersionFromRequirementsFile(filePath);
|
||||
}
|
||||
|
||||
31
src/version/tool-versions-file.ts
Normal file
31
src/version/tool-versions-file.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import fs from "node:fs";
|
||||
import * as core from "@actions/core";
|
||||
|
||||
export function getUvVersionFromToolVersions(
|
||||
filePath: string,
|
||||
): string | undefined {
|
||||
if (!filePath.endsWith(".tool-versions")) {
|
||||
return undefined;
|
||||
}
|
||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
const lines = fileContents.split("\n");
|
||||
|
||||
for (const line of lines) {
|
||||
// Skip commented lines
|
||||
if (line.trim().startsWith("#")) {
|
||||
continue;
|
||||
}
|
||||
const match = line.match(/^\s*uv\s*v?\s*(?<version>[^\s]+)\s*$/);
|
||||
if (match) {
|
||||
const matchedVersion = match.groups?.version.trim();
|
||||
if (matchedVersion?.startsWith("ref")) {
|
||||
core.warning(
|
||||
"The ref syntax of .tool-versions is not supported. Please use a released version instead.",
|
||||
);
|
||||
return undefined;
|
||||
}
|
||||
return matchedVersion;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022" /* 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'. */,
|
||||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
|
||||
"module": "nodenext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
|
||||
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
|
||||
"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. */,
|
||||
"strict": true /* Enable all strict type-checking options. */,
|
||||
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
|
||||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
||||
"target": "ES2024" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
|
||||
},
|
||||
"exclude": ["node_modules", "**/*.test.ts"]
|
||||
}
|
||||
|
||||
23116
version-manifest.json
23116
version-manifest.json
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user