mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-10-18 16:46:58 +00:00
Compare commits
38 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b7bf78939d | ||
|
cb6c0a53d9 | ||
|
dffc6292f2 | ||
|
6e346e1653 | ||
|
3ccd0fd498 | ||
|
ce6dbd84e1 | ||
|
2382069a66 | ||
|
b1daf91f4e | ||
|
3259c6206f | ||
|
bf8e8ed895 | ||
|
9c6b5e9fb5 | ||
|
a5129e99f4 | ||
|
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 |
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.+'
|
||||
|
263
.github/copilot-instructions.md
vendored
Normal file
263
.github/copilot-instructions.md
vendored
Normal file
@@ -0,0 +1,263 @@
|
||||
# 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**: ~5 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__/`
|
||||
- Add a test in `.github/workflows/test.yml` if it affects integration
|
||||
- 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.
|
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
@@ -47,7 +47,7 @@ jobs:
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
|
||||
uses: github/codeql-action/init@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v4.30.8
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
source-root: src
|
||||
@@ -59,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@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
|
||||
uses: github/codeql-action/autobuild@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v4.30.8
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
@@ -73,4 +73,4 @@ jobs:
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
|
||||
uses: github/codeql-action/analyze@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # v4.30.8
|
||||
|
414
.github/workflows/test.yml
vendored
414
.github/workflows/test.yml
vendored
@@ -25,12 +25,12 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Actionlint
|
||||
uses: eifinger/actionlint-action@23c85443d840cd73bbecb9cddfc933cc21649a38 # v1.9.1
|
||||
uses: eifinger/actionlint-action@03ff1f78c0670b71017616a37170f327df932030 # v1.9.2
|
||||
- name: Run zizmor
|
||||
uses: zizmorcore/zizmor-action@5ca5fc7a4779c5263a3ffa0e1f693009994446d1 # v0.1.2
|
||||
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
||||
uses: zizmorcore/zizmor-action@e673c3917a1aef3c65c972347ed84ccd013ecda4 # v0.2.0
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||
with:
|
||||
node-version: "20"
|
||||
node-version: "24"
|
||||
- run: |
|
||||
npm install
|
||||
- run: |
|
||||
@@ -72,82 +72,151 @@ jobs:
|
||||
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"
|
||||
- version-input: ">=0.4.25,<0.5"
|
||||
expected-version: "0.4.25"
|
||||
resolution-strategy: "lowest"
|
||||
- version-input: ">=0.4.25"
|
||||
expected-version: "0.4.25"
|
||||
resolution-strategy: "lowest"
|
||||
- version-input: ">=0.1,<0.2"
|
||||
expected-version: "0.1.45"
|
||||
resolution-strategy: "highest"
|
||||
- version-input: ">=0.1.0,<0.2"
|
||||
expected-version: "0.1.0"
|
||||
resolution-strategy: "lowest"
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install version ${{ matrix.uv-version }}
|
||||
uses: ./
|
||||
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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install version 0.3
|
||||
- name: Install version ${{ matrix.input.version-input }} with strategy ${{ matrix.input.resolution-strategy || 'highest' }}
|
||||
id: setup-uv
|
||||
uses: ./
|
||||
with:
|
||||
version: "0.3"
|
||||
version: ${{ matrix.input.version-input }}
|
||||
resolution-strategy: ${{ matrix.input.resolution-strategy || 'highest' }}
|
||||
- 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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install version 0.4.30
|
||||
id: setup-uv
|
||||
- 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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install version 0.5.14
|
||||
id: setup-uv
|
||||
- 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
|
||||
@@ -165,78 +234,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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- 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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- 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-version-file-hash-version:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install from requirements file
|
||||
id: setup-uv
|
||||
uses: ./
|
||||
with:
|
||||
version-file: "__tests__/fixtures/uv-in-requirements-hash-txt-project/requirements.txt"
|
||||
- name: Correct version gets installed
|
||||
run: |
|
||||
if [ "$(uv --version)" != "uv 0.8.3" ]; then
|
||||
echo "Wrong uv version: $(uv --version)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test-tool-versions-file-version:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install from .tools-versions file
|
||||
id: setup-uv
|
||||
uses: ./
|
||||
with:
|
||||
version-file: "__tests__/fixtures/.tool-versions"
|
||||
- name: Correct version gets installed
|
||||
run: |
|
||||
if [ "$(uv --version)" != "uv 0.5.15" ]; then
|
||||
echo "Wrong uv version: $(uv --version)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test-checksum:
|
||||
runs-on: ${{ matrix.inputs.os }}
|
||||
strategy:
|
||||
@@ -285,13 +282,7 @@ 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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
@@ -350,12 +341,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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install latest version
|
||||
id: setup-uv
|
||||
uses: ./
|
||||
with:
|
||||
python-version: 3.13.1t
|
||||
@@ -370,6 +362,19 @@ 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
|
||||
@@ -387,8 +392,8 @@ 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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
@@ -405,8 +410,8 @@ 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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
@@ -615,6 +620,7 @@ jobs:
|
||||
- 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
|
||||
@@ -623,6 +629,25 @@ 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:
|
||||
@@ -790,20 +815,149 @@ jobs:
|
||||
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-version-file-hash-version
|
||||
- test-tool-versions-file-version
|
||||
- test-checksum
|
||||
- test-with-explicit-token
|
||||
- test-uvx
|
||||
@@ -813,6 +967,7 @@ 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
|
||||
@@ -832,10 +987,15 @@ jobs:
|
||||
- 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 }}
|
||||
|
33
.github/workflows/update-known-versions.yml
vendored
33
.github/workflows/update-known-versions.yml
vendored
@@ -13,11 +13,12 @@ jobs:
|
||||
runs-on: ubuntu-24.04-arm
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
||||
persist-credentials: true
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||
with:
|
||||
node-version: "20"
|
||||
- name: Update known versions
|
||||
@@ -28,19 +29,21 @@ jobs:
|
||||
version-manifest.json
|
||||
${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Check for changes
|
||||
id: changes_exist
|
||||
id: changes-exist
|
||||
run: |
|
||||
git status --porcelain
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo "changes_exist=true" >> "$GITHUB_OUTPUT"
|
||||
echo "changes-exist=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "changes_exist=false" >> "$GITHUB_OUTPUT"
|
||||
echo "changes-exist=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
- name: Compile changes
|
||||
if: ${{ steps.changes_exist.outputs.changes_exist == 'true' }}
|
||||
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' }}
|
||||
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"
|
||||
@@ -49,3 +52,19 @@ jobs:
|
||||
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 checksums"
|
||||
title:
|
||||
"chore: update known checksums for ${{
|
||||
steps.update-known-versions.outputs.latest-version }}"
|
||||
body:
|
||||
"chore: update known checksums for ${{
|
||||
steps.update-known-versions.outputs.latest-version }}"
|
||||
base: main
|
||||
labels: "automated-pr,update-known-versions"
|
||||
branch: update-known-versions-pr
|
||||
delete-branch: true
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@@ -100,3 +100,6 @@ lib/**/*
|
||||
|
||||
# Idea IDEs (PyCharm, WebStorm, IntelliJ, etc)
|
||||
.idea/
|
||||
|
||||
# Compiled scripts
|
||||
.github/scripts/*.js
|
||||
|
543
README.md
543
README.md
@@ -12,27 +12,11 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
|
||||
|
||||
- [Usage](#usage)
|
||||
- [Install a required-version or latest (default)](#install-a-required-version-or-latest-default)
|
||||
- [Install the latest version](#install-the-latest-version)
|
||||
- [Install a specific version](#install-a-specific-version)
|
||||
- [Install a version by supplying a semver range or pep440 specifier](#install-a-version-by-supplying-a-semver-range-or-pep440-specifier)
|
||||
- [Install a version defined in a requirements or config file](#install-a-version-defined-in-a-requirements-or-config-file)
|
||||
- [Inputs](#inputs)
|
||||
- [Outputs](#outputs)
|
||||
- [Python version](#python-version)
|
||||
- [Activate environment](#activate-environment)
|
||||
- [Working directory](#working-directory)
|
||||
- [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)
|
||||
- [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)
|
||||
- [Advanced Configuration](#advanced-configuration)
|
||||
- [How it works](#how-it-works)
|
||||
- [FAQ](#faq)
|
||||
|
||||
@@ -42,7 +26,7 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
```
|
||||
|
||||
If you do not specify a version, this action will look for a [required-version](https://docs.astral.sh/uv/reference/settings/#required-version)
|
||||
@@ -51,65 +35,96 @@ in a `uv.toml` or `pyproject.toml` file in the repository root. If none is found
|
||||
For an example workflow, see
|
||||
[here](https://github.com/charliermarsh/autobot/blob/e42c66659bf97b90ca9ff305a19cc99952d0d43f/.github/workflows/ci.yaml).
|
||||
|
||||
### Install the latest version
|
||||
### Inputs
|
||||
|
||||
All inputs and their defaults.
|
||||
Have a look under [Advanced Configuration](#advanced-configuration) for detailed documentation on most of them.
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
- name: Install uv with all available options
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version: "latest"
|
||||
# The version of uv to install (default: searches for version in config files, then latest)
|
||||
version: ""
|
||||
|
||||
# Path to a file containing the version of uv to install (default: searches uv.toml then pyproject.toml)
|
||||
version-file: ""
|
||||
|
||||
# Resolution strategy when resolving version ranges: 'highest' or 'lowest'
|
||||
resolution-strategy: "highest"
|
||||
|
||||
# The version of Python to set UV_PYTHON to
|
||||
python-version: ""
|
||||
|
||||
# Use uv venv to activate a venv ready to be used by later steps
|
||||
activate-environment: "false"
|
||||
|
||||
# The directory to execute all commands in and look for files such as pyproject.toml
|
||||
working-directory: ""
|
||||
|
||||
# The checksum of the uv version to install
|
||||
checksum: ""
|
||||
|
||||
# Used to increase the rate limit when retrieving versions and downloading uv
|
||||
github-token: ${{ github.token }}
|
||||
|
||||
# Enable uploading of the uv cache: true, false, or auto (enabled on GitHub-hosted runners, disabled on self-hosted runners)
|
||||
enable-cache: "auto"
|
||||
|
||||
# Glob pattern to match files relative to the repository root to control the cache
|
||||
cache-dependency-glob: |
|
||||
**/*requirements*.txt
|
||||
**/*requirements*.in
|
||||
**/*constraints*.txt
|
||||
**/*constraints*.in
|
||||
**/pyproject.toml
|
||||
**/uv.lock
|
||||
**/*.py.lock
|
||||
|
||||
# Whether to restore the cache if found
|
||||
restore-cache: "true"
|
||||
|
||||
# Whether to save the cache after the run
|
||||
save-cache: "true"
|
||||
|
||||
# Suffix for the cache key
|
||||
cache-suffix: ""
|
||||
|
||||
# Local path to store the cache (default: "" - uses system temp directory)
|
||||
cache-local-path: ""
|
||||
|
||||
# Prune cache before saving
|
||||
prune-cache: "true"
|
||||
|
||||
# Upload managed Python installations to the GitHub Actions cache
|
||||
cache-python: "false"
|
||||
|
||||
# Ignore when nothing is found to cache
|
||||
ignore-nothing-to-cache: "false"
|
||||
|
||||
# Ignore when the working directory is empty
|
||||
ignore-empty-workdir: "false"
|
||||
|
||||
# Custom path to set UV_TOOL_DIR to
|
||||
tool-dir: ""
|
||||
|
||||
# Custom path to set UV_TOOL_BIN_DIR to
|
||||
tool-bin-dir: ""
|
||||
|
||||
# URL to the manifest file containing available versions and download URLs
|
||||
manifest-file: ""
|
||||
|
||||
# Add problem matchers
|
||||
add-problem-matchers: "true"
|
||||
```
|
||||
|
||||
### Install a specific version
|
||||
### Outputs
|
||||
|
||||
```yaml
|
||||
- name: Install a specific version of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
version: "0.4.4"
|
||||
```
|
||||
|
||||
### Install a version by supplying a semver range or pep440 specifier
|
||||
|
||||
You can specify a [semver range](https://github.com/npm/node-semver?tab=readme-ov-file#ranges)
|
||||
or [pep440 specifier](https://peps.python.org/pep-0440/#version-specifiers)
|
||||
to install the latest version that satisfies the range.
|
||||
|
||||
```yaml
|
||||
- name: Install a semver range of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
version: ">=0.4.0"
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Pinning a minor version of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
version: "0.4.x"
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Install a pep440-specifier-satisfying version of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
version: ">=0.4.25,<0.5"
|
||||
```
|
||||
|
||||
### Install a version defined in a requirements or config file
|
||||
|
||||
You can use the `version-file` input to specify a file that contains the version of uv to install.
|
||||
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
|
||||
with:
|
||||
version-file: "pyproject.toml"
|
||||
```
|
||||
- `uv-version`: The installed uv version. Useful when using latest.
|
||||
- `uv-path`: The path to the installed uv binary.
|
||||
- `uvx-path`: The path to the installed uvx binary.
|
||||
- `cache-hit`: A boolean value to indicate a cache entry was found.
|
||||
- `venv`: Path to the activated venv if activate-environment is true.
|
||||
|
||||
### Python version
|
||||
|
||||
@@ -119,13 +134,13 @@ This will override any python version specifications in `pyproject.toml` and `.p
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv and set the python version to 3.13t
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
python-version: 3.13t
|
||||
- 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:
|
||||
@@ -133,40 +148,17 @@ 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
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Test with python ${{ matrix.python-version }}
|
||||
run: uv run --frozen pytest
|
||||
```
|
||||
|
||||
### Activate environment
|
||||
|
||||
You can set `activate-environment` to `true` to automatically activate a venv.
|
||||
This allows directly using it in later steps:
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv and activate the environment
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
activate-environment: true
|
||||
- run: uv pip install pip
|
||||
```
|
||||
|
||||
> [!WARNING]
|
||||
>
|
||||
> Activating the environment adds your dependencies to the `PATH`, which could break some workflows.
|
||||
> For example, if you have a dependency which requires uv, e.g., `hatch`, activating the
|
||||
> environment will shadow the `uv` binary installed by this action and may result in a different uv
|
||||
> version being used.
|
||||
>
|
||||
> We do not recommend using this setting for most use-cases. Instead, use `uv run` to execute
|
||||
> commands in the environment.
|
||||
|
||||
### Working directory
|
||||
|
||||
You can set the working directory with the `working-directory` input.
|
||||
@@ -177,329 +169,19 @@ It also controls where [the venv gets created](#activate-environment).
|
||||
|
||||
```yaml
|
||||
- name: Install uv based on the config files in the working-directory
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
working-directory: my/subproject/dir
|
||||
```
|
||||
|
||||
### Validate checksum
|
||||
## Advanced Configuration
|
||||
|
||||
You can specify a checksum to validate the downloaded executable. Checksums up to the default version
|
||||
are automatically verified by this action. The sha256 hashes can be found on the
|
||||
[releases page](https://github.com/astral-sh/uv/releases) of the uv repo.
|
||||
For more advanced configuration options, see our detailed documentation:
|
||||
|
||||
```yaml
|
||||
- name: Install a specific version and validate the checksum
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
version: "0.3.1"
|
||||
checksum: "e11b01402ab645392c7ad6044db63d37e4fd1e745e015306993b07695ea5f9f8"
|
||||
```
|
||||
|
||||
### 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.
|
||||
|
||||
> [!TIP]
|
||||
>
|
||||
> On self-hosted runners this is usually not needed since the cache generated by uv on the runner's
|
||||
> filesystem is not removed after a run. For more details see [Local cache path](#local-cache-path).
|
||||
|
||||
You can optionally define a custom cache key suffix.
|
||||
|
||||
```yaml
|
||||
- name: Enable caching and define a custom cache key suffix
|
||||
id: setup-uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-suffix: "optional-suffix"
|
||||
```
|
||||
|
||||
When the cache was successfully restored, the output `cache-hit` will be set to `true` and you can
|
||||
use it in subsequent steps. For example, to use the cache in the above case:
|
||||
|
||||
```yaml
|
||||
- name: Do something if the cache was restored
|
||||
if: steps.setup-uv.outputs.cache-hit == 'true'
|
||||
run: echo "Cache was restored"
|
||||
```
|
||||
|
||||
#### Cache dependency glob
|
||||
|
||||
If you want to control when the GitHub Actions cache is invalidated, specify a glob pattern with the
|
||||
`cache-dependency-glob` input. The GitHub Actions cache will be invalidated if any file matching the glob pattern
|
||||
changes. If you use relative paths, they are relative to the repository root.
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> You can look up supported patterns [here](https://github.com/actions/toolkit/tree/main/packages/glob#patterns)
|
||||
>
|
||||
> The default is
|
||||
> ```yaml
|
||||
> cache-dependency-glob: |
|
||||
> **/*requirements*.txt
|
||||
> **/*requirements*.in
|
||||
> **/*constraints*.txt
|
||||
> **/*constraints*.in
|
||||
> **/pyproject.toml
|
||||
> **/uv.lock
|
||||
> ```
|
||||
|
||||
```yaml
|
||||
- name: Define a cache dependency glob
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: "**/pyproject.toml"
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Define a list of cache dependency globs
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: |
|
||||
**/requirements*.txt
|
||||
**/pyproject.toml
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Define an absolute cache dependency glob
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: "/tmp/my-folder/requirements*.txt"
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Never invalidate the cache
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
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`.
|
||||
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.
|
||||
|
||||
```yaml
|
||||
- name: Define a custom uv cache path
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
cache-local-path: "/path/to/cache"
|
||||
```
|
||||
|
||||
### Disable cache pruning
|
||||
|
||||
By default, the uv cache is pruned after every run, removing pre-built wheels, but retaining any
|
||||
wheels that were built from source. On GitHub-hosted runners, it's typically faster to omit those
|
||||
pre-built wheels from the cache (and instead re-download them from the registry on each run).
|
||||
However, on self-hosted or local runners, preserving the cache may be more efficient. See
|
||||
the [documentation](https://docs.astral.sh/uv/concepts/cache/#caching-in-continuous-integration) for
|
||||
more information.
|
||||
|
||||
If you want to persist the entire cache across runs, disable cache pruning with the `prune-cache`
|
||||
input.
|
||||
|
||||
```yaml
|
||||
- name: Don't prune the cache before saving it
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
prune-cache: false
|
||||
```
|
||||
|
||||
### 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).
|
||||
If you want to ignore this, set the `ignore-nothing-to-cache` input to `true`.
|
||||
|
||||
```yaml
|
||||
- name: Ignore nothing to cache
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
ignore-nothing-to-cache: true
|
||||
```
|
||||
|
||||
### Ignore empty workdir
|
||||
|
||||
By default, the action will warn if the workdir is empty, because this is usually the case when
|
||||
`actions/checkout` is configured to run after `setup-uv`, which is not supported.
|
||||
|
||||
If you want to ignore this, set the `ignore-empty-workdir` input to `true`.
|
||||
|
||||
```yaml
|
||||
- name: Ignore empty workdir
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
ignore-empty-workdir: true
|
||||
```
|
||||
|
||||
### GitHub authentication token
|
||||
|
||||
This action uses the GitHub API to fetch the uv release artifacts. To avoid hitting the GitHub API
|
||||
rate limit too quickly, an authentication token can be provided via the `github-token` input. By
|
||||
default, the `GITHUB_TOKEN` secret is used, which is automatically provided by GitHub Actions.
|
||||
|
||||
If the default
|
||||
[permissions for the GitHub token](https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)
|
||||
are not sufficient, you can provide a custom GitHub token with the necessary permissions.
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv with a custom GitHub token
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
```
|
||||
|
||||
### UV_TOOL_DIR
|
||||
|
||||
On Windows `UV_TOOL_DIR` is set to `uv-tool-dir` in the `TMP` dir (e.g. `D:\a\_temp\uv-tool-dir`).
|
||||
On GitHub hosted runners this is on the much faster `D:` drive.
|
||||
|
||||
On all other platforms the tool environments are placed in the
|
||||
[default location](https://docs.astral.sh/uv/concepts/tools/#tools-directory).
|
||||
|
||||
If you want to change this behaviour (especially on self-hosted runners) you can use the `tool-dir`
|
||||
input:
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv with a custom tool dir
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
tool-dir: "/path/to/tool/dir"
|
||||
```
|
||||
|
||||
### UV_TOOL_BIN_DIR
|
||||
|
||||
On Windows `UV_TOOL_BIN_DIR` is set to `uv-tool-bin-dir` in the `TMP` dir (e.g.
|
||||
`D:\a\_temp\uv-tool-bin-dir`). On GitHub hosted runners this is on the much faster `D:` drive. This
|
||||
path is also automatically added to the PATH.
|
||||
|
||||
On all other platforms the tool binaries get installed to the
|
||||
[default location](https://docs.astral.sh/uv/concepts/tools/#the-bin-directory).
|
||||
|
||||
If you want to change this behaviour (especially on self-hosted runners) you can use the
|
||||
`tool-bin-dir` input:
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv with a custom tool bin dir
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
tool-bin-dir: "/path/to/tool-bin/dir"
|
||||
```
|
||||
|
||||
### Tilde Expansion
|
||||
|
||||
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`
|
||||
- `cache-dependency-glob`
|
||||
|
||||
```yaml
|
||||
- name: Expand the tilde character
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
cache-local-path: "~/path/to/cache"
|
||||
tool-dir: "~/path/to/tool/dir"
|
||||
tool-bin-dir: "~/path/to/tool-bin/dir"
|
||||
cache-dependency-glob: "~/my-cache-buster"
|
||||
```
|
||||
|
||||
### Manifest file
|
||||
|
||||
The `manifest-file` input allows you to specify a JSON manifest that lists available uv versions,
|
||||
architectures, and their download URLs. By default, this action uses the manifest file contained
|
||||
in this repository, which is automatically updated with each release of uv.
|
||||
|
||||
The manifest file contains an array of objects, each describing a version,
|
||||
architecture, platform, and the corresponding download URL. For example:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"version": "0.7.13",
|
||||
"artifactName": "uv-aarch64-apple-darwin.tar.gz",
|
||||
"arch": "aarch64",
|
||||
"platform": "apple-darwin",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.7.13/uv-aarch64-apple-darwin.tar.gz"
|
||||
},
|
||||
...
|
||||
]
|
||||
```
|
||||
|
||||
You can supply a custom manifest file URL to define additional versions,
|
||||
architectures, or different download URLs.
|
||||
This is useful if you maintain your own uv builds or want to override the default sources.
|
||||
|
||||
```yaml
|
||||
- name: Use a custom manifest file
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
manifest-file: "https://example.com/my-custom-manifest.json"
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> When you use a custom manifest file and do not set the `version` input, its default value is `latest`.
|
||||
> 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
|
||||
```
|
||||
- **[Advanced Version Configuration](docs/advanced-version-configuration.md)** - Resolution strategies and version files
|
||||
- **[Caching](docs/caching.md)** - Complete guide to caching configuration
|
||||
- **[Environment and Tools](docs/environment-and-tools.md)** - Environment activation, tool directories, authentication, and environment variables
|
||||
- **[Customization](docs/customization.md)** - Checksum validation, custom manifests, and problem matchers
|
||||
|
||||
## How it works
|
||||
|
||||
@@ -526,7 +208,7 @@ For example:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@main
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
- name: Test
|
||||
@@ -538,7 +220,7 @@ To install a specific version of Python, use
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
- name: Install Python 3.12
|
||||
@@ -557,7 +239,7 @@ output:
|
||||
uses: actions/checkout@main
|
||||
- name: Install the default version of uv
|
||||
id: setup-uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
uses: astral-sh/setup-uv@v7
|
||||
- name: Print the installed version
|
||||
run: echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}"
|
||||
```
|
||||
@@ -566,14 +248,13 @@ output:
|
||||
|
||||
**Yes!**
|
||||
|
||||
The cache key gets computed by using the [cache-dependency-glob](#cache-dependency-glob).
|
||||
The cache key gets computed by using the cache-dependency-glob (see [Caching documentation](docs/caching.md)).
|
||||
|
||||
If you
|
||||
have jobs which use the same dependency definitions from `requirements.txt` or
|
||||
If you have jobs which use the same dependency definitions from `requirements.txt` or
|
||||
`pyproject.toml` but different
|
||||
[resolution strategies](https://docs.astral.sh/uv/concepts/resolution/#resolution-strategy),
|
||||
each job will have different dependencies or dependency versions.
|
||||
But if you do not add the resolution strategy as a [cache-suffix](#enable-caching),
|
||||
But if you do not add the resolution strategy as a cache-suffix (see [Caching documentation](docs/caching.md)),
|
||||
they will have the same cache key.
|
||||
|
||||
This means the first job which starts uploading its cache will win and all other job will fail
|
||||
@@ -586,15 +267,15 @@ You might see errors like
|
||||
### Why do I see warnings like `No GitHub Actions cache found for key`
|
||||
|
||||
When a workflow runs for the first time on a branch and has a new cache key, because the
|
||||
[cache-dependency-glob](#cache-dependency-glob) found changed files (changed dependencies),
|
||||
cache-dependency-glob (see [Caching documentation](docs/caching.md)) found changed files (changed dependencies),
|
||||
the cache will not be found and the warning `No GitHub Actions cache found for key` will be printed.
|
||||
|
||||
While this might be irritating at first, it is expected behaviour and the cache will be created
|
||||
and reused in later workflows.
|
||||
|
||||
The reason for the warning is, that we have to way to know if this is the first run of a new
|
||||
cache key or the user accidentally misconfigured the [cache-dependency-glob](#cache-dependency-glob)
|
||||
or [cache-suffix](#enable-caching) and the cache never gets used.
|
||||
cache key or the user accidentally misconfigured the cache-dependency-glob
|
||||
or cache-suffix (see [Caching documentation](docs/caching.md)) and the cache never gets used.
|
||||
|
||||
### Do I have to run `actions/checkout` before or after `setup-uv`?
|
||||
|
||||
@@ -619,11 +300,11 @@ if an uploaded cache exists for this key.
|
||||
If yes (e.g. contents of `uv.lock` did not change since last run) the dependencies in the cache
|
||||
are up to date and the cache will be downloaded and used.
|
||||
|
||||
Details on determining which files will lead to different caches can be read under
|
||||
[cache-dependency-glob](#cache-dependency-glob)
|
||||
Details on determining which files will lead to different caches can be read in the
|
||||
[Caching documentation](docs/caching.md).
|
||||
|
||||
Some dependencies will never be uploaded to the cache and will be downloaded again on each run
|
||||
as described in [disable-cache-pruning](#disable-cache-pruning)
|
||||
as described in the [Caching documentation](docs/caching.md).
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
|
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" }]
|
15
action.yml
15
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,7 @@ inputs:
|
||||
**/*constraints*.in
|
||||
**/pyproject.toml
|
||||
**/uv.lock
|
||||
**/*.py.lock
|
||||
restore-cache:
|
||||
description: "Whether to restore the cache if found."
|
||||
default: "true"
|
||||
@@ -59,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"
|
||||
@@ -77,6 +77,9 @@ inputs:
|
||||
add-problem-matchers:
|
||||
description: "Add problem matchers."
|
||||
default: "true"
|
||||
resolution-strategy:
|
||||
description: "Resolution strategy to use when resolving version ranges. 'highest' uses the latest compatible version, 'lowest' uses the oldest compatible version."
|
||||
default: "highest"
|
||||
outputs:
|
||||
uv-version:
|
||||
description: "The installed uv version. Useful when using latest."
|
||||
@@ -86,8 +89,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()
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
|
||||
"$schema": "https://biomejs.dev/schemas/2.2.5/schema.json",
|
||||
"assist": {
|
||||
"actions": {
|
||||
"source": {
|
||||
|
1917
dist/save-cache/index.js
generated
vendored
1917
dist/save-cache/index.js
generated
vendored
File diff suppressed because it is too large
Load Diff
693
dist/setup/index.js
generated
vendored
693
dist/setup/index.js
generated
vendored
File diff suppressed because it is too large
Load Diff
323
dist/update-known-versions/index.js
generated
vendored
323
dist/update-known-versions/index.js
generated
vendored
@@ -61851,6 +61851,204 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.KNOWN_CHECKSUMS = void 0;
|
||||
// AUTOGENERATED_DO_NOT_EDIT
|
||||
exports.KNOWN_CHECKSUMS = {
|
||||
"aarch64-apple-darwin-0.9.3": "d6b2eaa1025b24b4779602763ad92f20112cbf19732fc6e0c72bb57a6a592c6c",
|
||||
"aarch64-pc-windows-msvc-0.9.3": "cf14a72d3a53e9cd63a0d87b6f2d1e92429dea9cd133d77c8ebffd57248191f1",
|
||||
"aarch64-unknown-linux-gnu-0.9.3": "2094a3ead5a026a2f6894c4d3f71026129c8878939a57f17f0c8246a737bed1d",
|
||||
"aarch64-unknown-linux-musl-0.9.3": "0544bdb24daffe91e3c14373875767e0be31e85e85e532171ab53d8c744149ac",
|
||||
"arm-unknown-linux-musleabihf-0.9.3": "d120656ddfd22cbcf751c3cf7173992ab4fccf83282868ba1e3ffb79cea4fee6",
|
||||
"armv7-unknown-linux-gnueabihf-0.9.3": "a524b78c31a43131ad0872e56fcaeb36616f11e5323acb74b547157272723eb6",
|
||||
"armv7-unknown-linux-musleabihf-0.9.3": "acb2a76a585e27b3ded59eeba114771cc76303ea1d3e53c7b9df6b60ed44b952",
|
||||
"i686-pc-windows-msvc-0.9.3": "dd054d5a92c1b88daa757e913c85f2f1b9c8bd3b6e530916cfc4d4a612f5638f",
|
||||
"i686-unknown-linux-gnu-0.9.3": "fd16f999a437157d7a0fce41963373d994480431412b465bda9d818c4070c952",
|
||||
"i686-unknown-linux-musl-0.9.3": "c77e3cd1ac93cf04695f952bc53f79f93b5ff2f126f0d1fa6a347b7099aca0b2",
|
||||
"powerpc64-unknown-linux-gnu-0.9.3": "98eee12b4bab516bdea0be3a6c5ea0077c6f90d8d745382fc1f41256fcbacddb",
|
||||
"powerpc64le-unknown-linux-gnu-0.9.3": "ae6e1c44e6291041dfcef21bedb5ea528992ff52ae193c5a17d4ac0bf94188e5",
|
||||
"riscv64gc-unknown-linux-gnu-0.9.3": "369eb1efe7126228a77eab55eafb53f176025b67c9c73c53cd176a173d2d3485",
|
||||
"s390x-unknown-linux-gnu-0.9.3": "3864b46a71bc7873d712a4b38d89df47c9e654b09a535d21a4280feb325e7c7a",
|
||||
"x86_64-apple-darwin-0.9.3": "ad57ed22bf793267ea97cfc0022afa096149e894dd161ee4ae5401b7c4a6db83",
|
||||
"x86_64-pc-windows-msvc-0.9.3": "9f7595313b44e57dcaeef63fe4f3de9a0cf4f92a53302b429341f457f70ca3b9",
|
||||
"x86_64-unknown-linux-gnu-0.9.3": "4d6f84490da4b21bb6075ffc1c6b22e0cf37bc98d7cca8aff9fbb759093cdc23",
|
||||
"x86_64-unknown-linux-musl-0.9.3": "bee6515c7476baea4a491a088ad7750cf599d25f4adcd37e0f987d4192c68f24",
|
||||
"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",
|
||||
@@ -65694,10 +65892,12 @@ run();
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
|
||||
exports.STATE_UV_VERSION = exports.STATE_UV_PATH = exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
|
||||
exports.REPO = "uv";
|
||||
exports.OWNER = "astral-sh";
|
||||
exports.TOOL_CACHE_NAME = "uv";
|
||||
exports.STATE_UV_PATH = "uv-path";
|
||||
exports.STATE_UV_VERSION = "uv-version";
|
||||
|
||||
|
||||
/***/ }),
|
||||
@@ -65746,7 +65946,8 @@ const DEFAULTS = {
|
||||
baseUrl: "https://api.github.com",
|
||||
userAgent: "setup-uv",
|
||||
};
|
||||
exports.Octokit = core_1.Octokit.plugin(plugin_paginate_rest_1.paginateRest, plugin_rest_endpoint_methods_1.legacyRestEndpointMethods).defaults(function buildDefaults(options) {
|
||||
const OctokitWithPlugins = core_1.Octokit.plugin(plugin_paginate_rest_1.paginateRest, plugin_rest_endpoint_methods_1.legacyRestEndpointMethods);
|
||||
exports.Octokit = OctokitWithPlugins.defaults(function buildDefaults(options) {
|
||||
return {
|
||||
...DEFAULTS,
|
||||
...options,
|
||||
@@ -68539,7 +68740,7 @@ class RequestError extends Error {
|
||||
|
||||
|
||||
// pkg/dist-src/version.js
|
||||
var dist_bundle_VERSION = "0.0.0-development";
|
||||
var dist_bundle_VERSION = "10.0.5";
|
||||
|
||||
// pkg/dist-src/defaults.js
|
||||
var defaults_default = {
|
||||
@@ -68910,7 +69111,7 @@ var createTokenAuth = function createTokenAuth2(token) {
|
||||
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/version.js
|
||||
const version_VERSION = "7.0.3";
|
||||
const version_VERSION = "7.0.5";
|
||||
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/index.js
|
||||
@@ -69214,9 +69415,11 @@ var paginatingEndpoints = [
|
||||
"GET /networks/{owner}/{repo}/events",
|
||||
"GET /notifications",
|
||||
"GET /organizations",
|
||||
"GET /organizations/{org}/dependabot/repository-access",
|
||||
"GET /orgs/{org}/actions/cache/usage-by-repository",
|
||||
"GET /orgs/{org}/actions/hosted-runners",
|
||||
"GET /orgs/{org}/actions/permissions/repositories",
|
||||
"GET /orgs/{org}/actions/permissions/self-hosted-runners/repositories",
|
||||
"GET /orgs/{org}/actions/runner-groups",
|
||||
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners",
|
||||
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories",
|
||||
@@ -69266,6 +69469,9 @@ var paginatingEndpoints = [
|
||||
"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories",
|
||||
"GET /orgs/{org}/private-registries",
|
||||
"GET /orgs/{org}/projects",
|
||||
"GET /orgs/{org}/projectsV2",
|
||||
"GET /orgs/{org}/projectsV2/{project_number}/fields",
|
||||
"GET /orgs/{org}/projectsV2/{project_number}/items",
|
||||
"GET /orgs/{org}/properties/values",
|
||||
"GET /orgs/{org}/public_members",
|
||||
"GET /orgs/{org}/repos",
|
||||
@@ -69286,7 +69492,6 @@ var paginatingEndpoints = [
|
||||
"GET /orgs/{org}/teams/{team_slug}/projects",
|
||||
"GET /orgs/{org}/teams/{team_slug}/repos",
|
||||
"GET /orgs/{org}/teams/{team_slug}/teams",
|
||||
"GET /projects/columns/{column_id}/cards",
|
||||
"GET /projects/{project_id}/collaborators",
|
||||
"GET /projects/{project_id}/columns",
|
||||
"GET /repos/{owner}/{repo}/actions/artifacts",
|
||||
@@ -69346,6 +69551,8 @@ var paginatingEndpoints = [
|
||||
"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions",
|
||||
"GET /repos/{owner}/{repo}/issues/events",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/comments",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocking",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/events",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/labels",
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions",
|
||||
@@ -69426,6 +69633,8 @@ var paginatingEndpoints = [
|
||||
"GET /user/subscriptions",
|
||||
"GET /user/teams",
|
||||
"GET /users",
|
||||
"GET /users/{user_id}/projectsV2/{project_number}/fields",
|
||||
"GET /users/{user_id}/projectsV2/{project_number}/items",
|
||||
"GET /users/{username}/attestations/{subject_digest}",
|
||||
"GET /users/{username}/events",
|
||||
"GET /users/{username}/events/orgs/{org}",
|
||||
@@ -69438,6 +69647,7 @@ var paginatingEndpoints = [
|
||||
"GET /users/{username}/orgs",
|
||||
"GET /users/{username}/packages",
|
||||
"GET /users/{username}/projects",
|
||||
"GET /users/{username}/projectsV2",
|
||||
"GET /users/{username}/received_events",
|
||||
"GET /users/{username}/received_events/public",
|
||||
"GET /users/{username}/repos",
|
||||
@@ -69484,7 +69694,7 @@ __nccwpck_require__.d(__webpack_exports__, {
|
||||
});
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js
|
||||
const VERSION = "16.0.0";
|
||||
const VERSION = "16.1.0";
|
||||
|
||||
//# sourceMappingURL=version.js.map
|
||||
|
||||
@@ -70298,11 +70508,20 @@ const Endpoints = {
|
||||
removeSelectedRepoFromOrgSecret: [
|
||||
"DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"
|
||||
],
|
||||
repositoryAccessForOrg: [
|
||||
"GET /organizations/{org}/dependabot/repository-access"
|
||||
],
|
||||
setRepositoryAccessDefaultLevel: [
|
||||
"PUT /organizations/{org}/dependabot/repository-access/default-level"
|
||||
],
|
||||
setSelectedReposForOrgSecret: [
|
||||
"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"
|
||||
],
|
||||
updateAlert: [
|
||||
"PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"
|
||||
],
|
||||
updateRepositoryAccessForOrg: [
|
||||
"PATCH /organizations/{org}/dependabot/repository-access"
|
||||
]
|
||||
},
|
||||
dependencyGraph: {
|
||||
@@ -70408,6 +70627,9 @@ const Endpoints = {
|
||||
addAssignees: [
|
||||
"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"
|
||||
],
|
||||
addBlockedByDependency: [
|
||||
"POST /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by"
|
||||
],
|
||||
addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"],
|
||||
addSubIssue: [
|
||||
"POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues"
|
||||
@@ -70434,10 +70656,17 @@ const Endpoints = {
|
||||
getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"],
|
||||
getLabel: ["GET /repos/{owner}/{repo}/labels/{name}"],
|
||||
getMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}"],
|
||||
getParent: ["GET /repos/{owner}/{repo}/issues/{issue_number}/parent"],
|
||||
list: ["GET /issues"],
|
||||
listAssignees: ["GET /repos/{owner}/{repo}/assignees"],
|
||||
listComments: ["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"],
|
||||
listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"],
|
||||
listDependenciesBlockedBy: [
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by"
|
||||
],
|
||||
listDependenciesBlocking: [
|
||||
"GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocking"
|
||||
],
|
||||
listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"],
|
||||
listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"],
|
||||
listEventsForTimeline: [
|
||||
@@ -70464,6 +70693,9 @@ const Endpoints = {
|
||||
removeAssignees: [
|
||||
"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"
|
||||
],
|
||||
removeDependencyBlockedBy: [
|
||||
"DELETE /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by/{issue_id}"
|
||||
],
|
||||
removeLabel: [
|
||||
"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"
|
||||
],
|
||||
@@ -70566,6 +70798,9 @@ const Endpoints = {
|
||||
convertMemberToOutsideCollaborator: [
|
||||
"PUT /orgs/{org}/outside_collaborators/{username}"
|
||||
],
|
||||
createArtifactStorageRecord: [
|
||||
"POST /orgs/{org}/artifacts/metadata/storage-record"
|
||||
],
|
||||
createInvitation: ["POST /orgs/{org}/invitations"],
|
||||
createIssueType: ["POST /orgs/{org}/issue-types"],
|
||||
createOrUpdateCustomProperties: ["PATCH /orgs/{org}/properties/schema"],
|
||||
@@ -70577,15 +70812,15 @@ const Endpoints = {
|
||||
],
|
||||
createWebhook: ["POST /orgs/{org}/hooks"],
|
||||
delete: ["DELETE /orgs/{org}"],
|
||||
deleteAttestationsBulk: ["POST /orgs/{org}/attestations/delete-request"],
|
||||
deleteAttestationsById: [
|
||||
"DELETE /orgs/{org}/attestations/{attestation_id}"
|
||||
],
|
||||
deleteAttestationsBySubjectDigest: [
|
||||
"DELETE /orgs/{org}/attestations/digest/{subject_digest}"
|
||||
],
|
||||
deleteIssueType: ["DELETE /orgs/{org}/issue-types/{issue_type_id}"],
|
||||
deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"],
|
||||
enableOrDisableSecurityProductOnAllOrgRepos: [
|
||||
"POST /orgs/{org}/{security_product}/{enablement}",
|
||||
{},
|
||||
{
|
||||
deprecated: "octokit.rest.orgs.enableOrDisableSecurityProductOnAllOrgRepos() is deprecated, see https://docs.github.com/rest/orgs/orgs#enable-or-disable-a-security-feature-for-an-organization"
|
||||
}
|
||||
],
|
||||
get: ["GET /orgs/{org}"],
|
||||
getAllCustomProperties: ["GET /orgs/{org}/properties/schema"],
|
||||
getCustomProperty: [
|
||||
@@ -70605,7 +70840,13 @@ const Endpoints = {
|
||||
],
|
||||
list: ["GET /organizations"],
|
||||
listAppInstallations: ["GET /orgs/{org}/installations"],
|
||||
listArtifactStorageRecords: [
|
||||
"GET /orgs/{org}/artifacts/{subject_digest}/metadata/storage-records"
|
||||
],
|
||||
listAttestations: ["GET /orgs/{org}/attestations/{subject_digest}"],
|
||||
listAttestationsBulk: [
|
||||
"POST /orgs/{org}/attestations/bulk-list{?per_page,before,after}"
|
||||
],
|
||||
listBlockedUsers: ["GET /orgs/{org}/blocks"],
|
||||
listCustomPropertiesValuesForRepos: ["GET /orgs/{org}/properties/values"],
|
||||
listFailedInvitations: ["GET /orgs/{org}/failed_invitations"],
|
||||
@@ -70800,6 +71041,44 @@ const Endpoints = {
|
||||
"PATCH /orgs/{org}/private-registries/{secret_name}"
|
||||
]
|
||||
},
|
||||
projects: {
|
||||
addItemForOrg: ["POST /orgs/{org}/projectsV2/{project_number}/items"],
|
||||
addItemForUser: ["POST /users/{user_id}/projectsV2/{project_number}/items"],
|
||||
deleteItemForOrg: [
|
||||
"DELETE /orgs/{org}/projectsV2/{project_number}/items/{item_id}"
|
||||
],
|
||||
deleteItemForUser: [
|
||||
"DELETE /users/{user_id}/projectsV2/{project_number}/items/{item_id}"
|
||||
],
|
||||
getFieldForOrg: [
|
||||
"GET /orgs/{org}/projectsV2/{project_number}/fields/{field_id}"
|
||||
],
|
||||
getFieldForUser: [
|
||||
"GET /users/{user_id}/projectsV2/{project_number}/fields/{field_id}"
|
||||
],
|
||||
getForOrg: ["GET /orgs/{org}/projectsV2/{project_number}"],
|
||||
getForUser: ["GET /users/{user_id}/projectsV2/{project_number}"],
|
||||
getOrgItem: ["GET /orgs/{org}/projectsV2/{project_number}/items/{item_id}"],
|
||||
getUserItem: [
|
||||
"GET /users/{user_id}/projectsV2/{project_number}/items/{item_id}"
|
||||
],
|
||||
listFieldsForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/fields"],
|
||||
listFieldsForUser: [
|
||||
"GET /users/{user_id}/projectsV2/{project_number}/fields"
|
||||
],
|
||||
listForOrg: ["GET /orgs/{org}/projectsV2"],
|
||||
listForUser: ["GET /users/{username}/projectsV2"],
|
||||
listItemsForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/items"],
|
||||
listItemsForUser: [
|
||||
"GET /users/{user_id}/projectsV2/{project_number}/items"
|
||||
],
|
||||
updateItemForOrg: [
|
||||
"PATCH /orgs/{org}/projectsV2/{project_number}/items/{item_id}"
|
||||
],
|
||||
updateItemForUser: [
|
||||
"PATCH /users/{user_id}/projectsV2/{project_number}/items/{item_id}"
|
||||
]
|
||||
},
|
||||
pulls: {
|
||||
checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],
|
||||
create: ["POST /repos/{owner}/{repo}/pulls"],
|
||||
@@ -71378,8 +71657,14 @@ const Endpoints = {
|
||||
listLocationsForAlert: [
|
||||
"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"
|
||||
],
|
||||
listOrgPatternConfigs: [
|
||||
"GET /orgs/{org}/secret-scanning/pattern-configurations"
|
||||
],
|
||||
updateAlert: [
|
||||
"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"
|
||||
],
|
||||
updateOrgPatternConfigs: [
|
||||
"PATCH /orgs/{org}/secret-scanning/pattern-configurations"
|
||||
]
|
||||
},
|
||||
securityAdvisories: {
|
||||
@@ -71489,6 +71774,15 @@ const Endpoints = {
|
||||
],
|
||||
createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"],
|
||||
createSshSigningKeyForAuthenticatedUser: ["POST /user/ssh_signing_keys"],
|
||||
deleteAttestationsBulk: [
|
||||
"POST /users/{username}/attestations/delete-request"
|
||||
],
|
||||
deleteAttestationsById: [
|
||||
"DELETE /users/{username}/attestations/{attestation_id}"
|
||||
],
|
||||
deleteAttestationsBySubjectDigest: [
|
||||
"DELETE /users/{username}/attestations/digest/{subject_digest}"
|
||||
],
|
||||
deleteEmailForAuthenticated: [
|
||||
"DELETE /user/emails",
|
||||
{},
|
||||
@@ -71533,6 +71827,9 @@ const Endpoints = {
|
||||
],
|
||||
list: ["GET /users"],
|
||||
listAttestations: ["GET /users/{username}/attestations/{subject_digest}"],
|
||||
listAttestationsBulk: [
|
||||
"POST /users/{username}/attestations/bulk-list{?per_page,before,after}"
|
||||
],
|
||||
listBlockedByAuthenticated: [
|
||||
"GET /user/blocks",
|
||||
{},
|
||||
|
82
docs/advanced-version-configuration.md
Normal file
82
docs/advanced-version-configuration.md
Normal file
@@ -0,0 +1,82 @@
|
||||
# Advanced Version Configuration
|
||||
|
||||
This document covers advanced options for configuring which version of uv to install.
|
||||
|
||||
## Install the latest version
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version: "latest"
|
||||
```
|
||||
|
||||
## Install a specific version
|
||||
|
||||
```yaml
|
||||
- name: Install a specific version of uv
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version: "0.4.4"
|
||||
```
|
||||
|
||||
## Install a version by supplying a semver range or pep440 specifier
|
||||
|
||||
You can specify a [semver range](https://github.com/npm/node-semver?tab=readme-ov-file#ranges)
|
||||
or [pep440 specifier](https://peps.python.org/pep-0440/#version-specifiers)
|
||||
to install the latest version that satisfies the range.
|
||||
|
||||
```yaml
|
||||
- name: Install a semver range of uv
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version: ">=0.4.0"
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Pinning a minor version of uv
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version: "0.4.x"
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Install a pep440-specifier-satisfying version of uv
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version: ">=0.4.25,<0.5"
|
||||
```
|
||||
|
||||
## Resolution strategy
|
||||
|
||||
By default, when resolving version ranges, setup-uv will install the highest compatible version.
|
||||
You can change this behavior using the `resolution-strategy` input:
|
||||
|
||||
```yaml
|
||||
- name: Install the lowest compatible version of uv
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version: ">=0.4.0"
|
||||
resolution-strategy: "lowest"
|
||||
```
|
||||
|
||||
The supported resolution strategies are:
|
||||
- `highest` (default): Install the latest version that satisfies the constraints
|
||||
- `lowest`: Install the oldest version that satisfies the constraints
|
||||
|
||||
This can be useful for testing compatibility with older versions of uv, similar to uv's own `--resolution-strategy` option.
|
||||
|
||||
## Install a version defined in a requirements or config file
|
||||
|
||||
You can use the `version-file` input to specify a file that contains the version of uv to install.
|
||||
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@v7
|
||||
with:
|
||||
version-file: "pyproject.toml"
|
||||
```
|
189
docs/caching.md
Normal file
189
docs/caching.md
Normal file
@@ -0,0 +1,189 @@
|
||||
# Caching
|
||||
|
||||
This document covers all caching-related configuration options for setup-uv.
|
||||
|
||||
## 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.
|
||||
|
||||
> [!TIP]
|
||||
>
|
||||
> On self-hosted runners this is usually not needed since the cache generated by uv on the runner's
|
||||
> filesystem is not removed after a run. For more details see [Local cache path](#local-cache-path).
|
||||
|
||||
You can optionally define a custom cache key suffix.
|
||||
|
||||
```yaml
|
||||
- name: Enable caching and define a custom cache key suffix
|
||||
id: setup-uv
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-suffix: "optional-suffix"
|
||||
```
|
||||
|
||||
When the cache was successfully restored, the output `cache-hit` will be set to `true` and you can
|
||||
use it in subsequent steps. For example, to use the cache in the above case:
|
||||
|
||||
```yaml
|
||||
- name: Do something if the cache was restored
|
||||
if: steps.setup-uv.outputs.cache-hit == 'true'
|
||||
run: echo "Cache was restored"
|
||||
```
|
||||
|
||||
## Cache dependency glob
|
||||
|
||||
If you want to control when the GitHub Actions cache is invalidated, specify a glob pattern with the
|
||||
`cache-dependency-glob` input. The GitHub Actions cache will be invalidated if any file matching the glob pattern
|
||||
changes. If you use relative paths, they are relative to the repository root.
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> You can look up supported patterns [here](https://github.com/actions/toolkit/tree/main/packages/glob#patterns)
|
||||
>
|
||||
> The default is
|
||||
> ```yaml
|
||||
> cache-dependency-glob: |
|
||||
> **/*requirements*.txt
|
||||
> **/*requirements*.in
|
||||
> **/*constraints*.txt
|
||||
> **/*constraints*.in
|
||||
> **/pyproject.toml
|
||||
> **/uv.lock
|
||||
> **/*.py.lock
|
||||
> ```
|
||||
|
||||
```yaml
|
||||
- name: Define a cache dependency glob
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: "**/pyproject.toml"
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Define a list of cache dependency globs
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: |
|
||||
**/requirements*.txt
|
||||
**/pyproject.toml
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Define an absolute cache dependency glob
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: "/tmp/my-folder/requirements*.txt"
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Never invalidate the cache
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
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@v7
|
||||
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@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
save-cache: false
|
||||
```
|
||||
|
||||
## Local cache path
|
||||
|
||||
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\setup-uv-cache` 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@v7
|
||||
with:
|
||||
cache-local-path: "/path/to/cache"
|
||||
```
|
||||
|
||||
## Disable cache pruning
|
||||
|
||||
By default, the uv cache is pruned after every run, removing pre-built wheels, but retaining any
|
||||
wheels that were built from source. On GitHub-hosted runners, it's typically faster to omit those
|
||||
pre-built wheels from the cache (and instead re-download them from the registry on each run).
|
||||
However, on self-hosted or local runners, preserving the cache may be more efficient. See
|
||||
the [documentation](https://docs.astral.sh/uv/concepts/cache/#caching-in-continuous-integration) for
|
||||
more information.
|
||||
|
||||
If you want to persist the entire cache across runs, disable cache pruning with the `prune-cache`
|
||||
input.
|
||||
|
||||
```yaml
|
||||
- name: Don't prune the cache before saving it
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
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@v7
|
||||
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).
|
||||
If you want to ignore this, set the `ignore-nothing-to-cache` input to `true`.
|
||||
|
||||
```yaml
|
||||
- name: Ignore nothing to cache
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
ignore-nothing-to-cache: true
|
||||
```
|
70
docs/customization.md
Normal file
70
docs/customization.md
Normal file
@@ -0,0 +1,70 @@
|
||||
# Customization
|
||||
|
||||
This document covers advanced customization options including checksum validation, custom manifests, and problem matchers.
|
||||
|
||||
## Validate checksum
|
||||
|
||||
You can specify a checksum to validate the downloaded executable. Checksums up to the default version
|
||||
are automatically verified by this action. The sha256 hashes can be found on the
|
||||
[releases page](https://github.com/astral-sh/uv/releases) of the uv repo.
|
||||
|
||||
```yaml
|
||||
- name: Install a specific version and validate the checksum
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
version: "0.3.1"
|
||||
checksum: "e11b01402ab645392c7ad6044db63d37e4fd1e745e015306993b07695ea5f9f8"
|
||||
```
|
||||
|
||||
## Manifest file
|
||||
|
||||
The `manifest-file` input allows you to specify a JSON manifest that lists available uv versions,
|
||||
architectures, and their download URLs. By default, this action uses the manifest file contained
|
||||
in this repository, which is automatically updated with each release of uv.
|
||||
|
||||
The manifest file contains an array of objects, each describing a version,
|
||||
architecture, platform, and the corresponding download URL. For example:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"version": "0.7.13",
|
||||
"artifactName": "uv-aarch64-apple-darwin.tar.gz",
|
||||
"arch": "aarch64",
|
||||
"platform": "apple-darwin",
|
||||
"downloadUrl": "https://github.com/astral-sh/uv/releases/download/0.7.13/uv-aarch64-apple-darwin.tar.gz"
|
||||
},
|
||||
...
|
||||
]
|
||||
```
|
||||
|
||||
You can supply a custom manifest file URL to define additional versions,
|
||||
architectures, or different download URLs.
|
||||
This is useful if you maintain your own uv builds or want to override the default sources.
|
||||
|
||||
```yaml
|
||||
- name: Use a custom manifest file
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
manifest-file: "https://example.com/my-custom-manifest.json"
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> When you use a custom manifest file and do not set the `version` input, its default value is `latest`.
|
||||
> 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@v7
|
||||
with:
|
||||
add-problem-matchers: false
|
||||
```
|
146
docs/environment-and-tools.md
Normal file
146
docs/environment-and-tools.md
Normal file
@@ -0,0 +1,146 @@
|
||||
# Environment and Tools
|
||||
|
||||
This document covers environment activation, tool directory configuration, and authentication options.
|
||||
|
||||
## Activate environment
|
||||
|
||||
You can set `activate-environment` to `true` to automatically activate a venv.
|
||||
This allows directly using it in later steps:
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv and activate the environment
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
activate-environment: true
|
||||
- run: uv pip install pip
|
||||
```
|
||||
|
||||
> [!WARNING]
|
||||
>
|
||||
> Activating the environment adds your dependencies to the `PATH`, which could break some workflows.
|
||||
> For example, if you have a dependency which requires uv, e.g., `hatch`, activating the
|
||||
> environment will shadow the `uv` binary installed by this action and may result in a different uv
|
||||
> version being used.
|
||||
>
|
||||
> We do not recommend using this setting for most use-cases. Instead, use `uv run` to execute
|
||||
> commands in the environment.
|
||||
|
||||
## GitHub authentication token
|
||||
|
||||
This action uses the GitHub API to fetch the uv release artifacts. To avoid hitting the GitHub API
|
||||
rate limit too quickly, an authentication token can be provided via the `github-token` input. By
|
||||
default, the `GITHUB_TOKEN` secret is used, which is automatically provided by GitHub Actions.
|
||||
|
||||
If the default
|
||||
[permissions for the GitHub token](https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)
|
||||
are not sufficient, you can provide a custom GitHub token with the necessary permissions.
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv with a custom GitHub token
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
```
|
||||
|
||||
## UV_TOOL_DIR
|
||||
|
||||
On Windows `UV_TOOL_DIR` is set to `uv-tool-dir` in the `TMP` dir (e.g. `D:\a\_temp\uv-tool-dir`).
|
||||
On GitHub hosted runners this is on the much faster `D:` drive.
|
||||
|
||||
On all other platforms the tool environments are placed in the
|
||||
[default location](https://docs.astral.sh/uv/concepts/tools/#tools-directory).
|
||||
|
||||
If you want to change this behaviour (especially on self-hosted runners) you can use the `tool-dir`
|
||||
input:
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv with a custom tool dir
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
tool-dir: "/path/to/tool/dir"
|
||||
```
|
||||
|
||||
## UV_TOOL_BIN_DIR
|
||||
|
||||
On Windows `UV_TOOL_BIN_DIR` is set to `uv-tool-bin-dir` in the `TMP` dir (e.g.
|
||||
`D:\a\_temp\uv-tool-bin-dir`). On GitHub hosted runners this is on the much faster `D:` drive. This
|
||||
path is also automatically added to the PATH.
|
||||
|
||||
On all other platforms the tool binaries get installed to the
|
||||
[default location](https://docs.astral.sh/uv/concepts/tools/#the-bin-directory).
|
||||
|
||||
If you want to change this behaviour (especially on self-hosted runners) you can use the
|
||||
`tool-bin-dir` input:
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv with a custom tool bin dir
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
tool-bin-dir: "/path/to/tool-bin/dir"
|
||||
```
|
||||
|
||||
## Tilde Expansion
|
||||
|
||||
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`
|
||||
- `cache-dependency-glob`
|
||||
|
||||
```yaml
|
||||
- name: Expand the tilde character
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
cache-local-path: "~/path/to/cache"
|
||||
tool-dir: "~/path/to/tool/dir"
|
||||
tool-bin-dir: "~/path/to/tool-bin/dir"
|
||||
cache-dependency-glob: "~/my-cache-buster"
|
||||
```
|
||||
|
||||
## Ignore empty workdir
|
||||
|
||||
By default, the action will warn if the workdir is empty, because this is usually the case when
|
||||
`actions/checkout` is configured to run after `setup-uv`, which is not supported.
|
||||
|
||||
If you want to ignore this, set the `ignore-empty-workdir` input to `true`.
|
||||
|
||||
```yaml
|
||||
- name: Ignore empty workdir
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
ignore-empty-workdir: true
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
|
||||
This action sets several environment variables that influence uv's behavior and can be used by subsequent steps:
|
||||
|
||||
- `UV_PYTHON`: Set when `python-version` input is specified. Controls which Python version uv uses.
|
||||
- `UV_CACHE_DIR`: Set when caching is enabled (unless already configured in uv config files). Controls where uv stores its cache.
|
||||
- `UV_TOOL_DIR`: Set when `tool-dir` input is specified. Controls where uv installs tool environments.
|
||||
- `UV_TOOL_BIN_DIR`: Set when `tool-bin-dir` input is specified. Controls where uv installs tool binaries.
|
||||
- `UV_PYTHON_INSTALL_DIR`: Always set. Controls where uv installs Python versions.
|
||||
- `VIRTUAL_ENV`: Set when `activate-environment` is true. Points to the activated virtual environment.
|
||||
|
||||
**Environment variables that affect the action behavior:**
|
||||
|
||||
- `UV_NO_MODIFY_PATH`: If set, prevents the action from modifying PATH. Cannot be used with `activate-environment`.
|
||||
- `UV_CACHE_DIR`: If already set, the action will respect it instead of setting its own cache directory.
|
||||
|
||||
```yaml
|
||||
- name: Example using environment variables
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
python-version: "3.12"
|
||||
tool-dir: "/custom/tool/dir"
|
||||
enable-cache: true
|
||||
|
||||
- name: Check environment variables
|
||||
run: |
|
||||
echo "UV_PYTHON: $UV_PYTHON"
|
||||
echo "UV_CACHE_DIR: $UV_CACHE_DIR"
|
||||
echo "UV_TOOL_DIR: $UV_TOOL_DIR"
|
||||
echo "UV_PYTHON_INSTALL_DIR: $UV_PYTHON_INSTALL_DIR"
|
||||
```
|
1635
package-lock.json
generated
1635
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
22
package.json
22
package.json
@@ -21,28 +21,28 @@
|
||||
"author": "@eifinger",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/cache": "^4.0.5",
|
||||
"@actions/cache": "^4.1.0",
|
||||
"@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.3",
|
||||
"@octokit/plugin-paginate-rest": "^13.1.1",
|
||||
"@octokit/plugin-rest-endpoint-methods": "^16.0.0",
|
||||
"@renovatebot/pep440": "^4.2.0",
|
||||
"@octokit/core": "^7.0.5",
|
||||
"@octokit/plugin-paginate-rest": "^13.2.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": "2.2.4",
|
||||
"@biomejs/biome": "2.2.5",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/node": "^24.3.1",
|
||||
"@types/node": "^24.7.0",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@vercel/ncc": "^0.38.3",
|
||||
"jest": "^30.1.3",
|
||||
"@vercel/ncc": "^0.38.4",
|
||||
"jest": "^30.2.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"ts-jest": "^29.4.1",
|
||||
"typescript": "^5.9.2"
|
||||
"ts-jest": "^29.4.4",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
11
src/cache/restore-cache.ts
vendored
11
src/cache/restore-cache.ts
vendored
@@ -5,8 +5,10 @@ import { hashFiles } from "../hash/hash-files";
|
||||
import {
|
||||
cacheDependencyGlob,
|
||||
cacheLocalPath,
|
||||
cachePython,
|
||||
cacheSuffix,
|
||||
pruneCache,
|
||||
pythonDir,
|
||||
pythonVersion as pythonVersionInput,
|
||||
restoreCache as shouldRestoreCache,
|
||||
workingDirectory,
|
||||
@@ -30,8 +32,12 @@ export async function restoreCache(): Promise<void> {
|
||||
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);
|
||||
@@ -62,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> {
|
||||
|
@@ -1,5 +1,401 @@
|
||||
// AUTOGENERATED_DO_NOT_EDIT
|
||||
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
|
||||
"aarch64-apple-darwin-0.9.3":
|
||||
"d6b2eaa1025b24b4779602763ad92f20112cbf19732fc6e0c72bb57a6a592c6c",
|
||||
"aarch64-pc-windows-msvc-0.9.3":
|
||||
"cf14a72d3a53e9cd63a0d87b6f2d1e92429dea9cd133d77c8ebffd57248191f1",
|
||||
"aarch64-unknown-linux-gnu-0.9.3":
|
||||
"2094a3ead5a026a2f6894c4d3f71026129c8878939a57f17f0c8246a737bed1d",
|
||||
"aarch64-unknown-linux-musl-0.9.3":
|
||||
"0544bdb24daffe91e3c14373875767e0be31e85e85e532171ab53d8c744149ac",
|
||||
"arm-unknown-linux-musleabihf-0.9.3":
|
||||
"d120656ddfd22cbcf751c3cf7173992ab4fccf83282868ba1e3ffb79cea4fee6",
|
||||
"armv7-unknown-linux-gnueabihf-0.9.3":
|
||||
"a524b78c31a43131ad0872e56fcaeb36616f11e5323acb74b547157272723eb6",
|
||||
"armv7-unknown-linux-musleabihf-0.9.3":
|
||||
"acb2a76a585e27b3ded59eeba114771cc76303ea1d3e53c7b9df6b60ed44b952",
|
||||
"i686-pc-windows-msvc-0.9.3":
|
||||
"dd054d5a92c1b88daa757e913c85f2f1b9c8bd3b6e530916cfc4d4a612f5638f",
|
||||
"i686-unknown-linux-gnu-0.9.3":
|
||||
"fd16f999a437157d7a0fce41963373d994480431412b465bda9d818c4070c952",
|
||||
"i686-unknown-linux-musl-0.9.3":
|
||||
"c77e3cd1ac93cf04695f952bc53f79f93b5ff2f126f0d1fa6a347b7099aca0b2",
|
||||
"powerpc64-unknown-linux-gnu-0.9.3":
|
||||
"98eee12b4bab516bdea0be3a6c5ea0077c6f90d8d745382fc1f41256fcbacddb",
|
||||
"powerpc64le-unknown-linux-gnu-0.9.3":
|
||||
"ae6e1c44e6291041dfcef21bedb5ea528992ff52ae193c5a17d4ac0bf94188e5",
|
||||
"riscv64gc-unknown-linux-gnu-0.9.3":
|
||||
"369eb1efe7126228a77eab55eafb53f176025b67c9c73c53cd176a173d2d3485",
|
||||
"s390x-unknown-linux-gnu-0.9.3":
|
||||
"3864b46a71bc7873d712a4b38d89df47c9e654b09a535d21a4280feb325e7c7a",
|
||||
"x86_64-apple-darwin-0.9.3":
|
||||
"ad57ed22bf793267ea97cfc0022afa096149e894dd161ee4ae5401b7c4a6db83",
|
||||
"x86_64-pc-windows-msvc-0.9.3":
|
||||
"9f7595313b44e57dcaeef63fe4f3de9a0cf4f92a53302b429341f457f70ca3b9",
|
||||
"x86_64-unknown-linux-gnu-0.9.3":
|
||||
"4d6f84490da4b21bb6075ffc1c6b22e0cf37bc98d7cca8aff9fbb759093cdc23",
|
||||
"x86_64-unknown-linux-musl-0.9.3":
|
||||
"bee6515c7476baea4a491a088ad7750cf599d25f4adcd37e0f987d4192c68f24",
|
||||
"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":
|
||||
|
@@ -2,7 +2,9 @@ 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 type { Endpoints } from "@octokit/types";
|
||||
import * as pep440 from "@renovatebot/pep440";
|
||||
import * as semver from "semver";
|
||||
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
|
||||
import { Octokit } from "../utils/octokit";
|
||||
import type { Architecture, Platform } from "../utils/platforms";
|
||||
@@ -12,6 +14,9 @@ import {
|
||||
getLatestKnownVersion as getLatestVersionInManifest,
|
||||
} from "./version-manifest";
|
||||
|
||||
type Release =
|
||||
Endpoints["GET /repos/{owner}/{repo}/releases"]["response"]["data"][number];
|
||||
|
||||
export function tryGetFromToolCache(
|
||||
arch: Architecture,
|
||||
version: string,
|
||||
@@ -28,7 +33,6 @@ export function tryGetFromToolCache(
|
||||
}
|
||||
|
||||
export async function downloadVersionFromGithub(
|
||||
serverUrl: string,
|
||||
platform: Platform,
|
||||
arch: Architecture,
|
||||
version: string,
|
||||
@@ -37,7 +41,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 +72,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,
|
||||
@@ -132,27 +135,43 @@ export async function resolveVersion(
|
||||
versionInput: string,
|
||||
manifestFile: string | undefined,
|
||||
githubToken: string,
|
||||
resolutionStrategy: "highest" | "lowest" = "highest",
|
||||
): Promise<string> {
|
||||
core.debug(`Resolving version: ${versionInput}`);
|
||||
let version: string;
|
||||
const isSimpleMinimumVersionSpecifier =
|
||||
versionInput.includes(">") && !versionInput.includes(",");
|
||||
const resolveVersionSpecifierToLatest =
|
||||
isSimpleMinimumVersionSpecifier && resolutionStrategy === "highest";
|
||||
if (resolveVersionSpecifierToLatest) {
|
||||
core.info("Found minimum version specifier, using latest version");
|
||||
}
|
||||
if (manifestFile) {
|
||||
version =
|
||||
versionInput === "latest"
|
||||
versionInput === "latest" || resolveVersionSpecifierToLatest
|
||||
? await getLatestVersionInManifest(manifestFile)
|
||||
: versionInput;
|
||||
} else {
|
||||
version =
|
||||
versionInput === "latest"
|
||||
versionInput === "latest" || resolveVersionSpecifierToLatest
|
||||
? await getLatestVersion(githubToken)
|
||||
: versionInput;
|
||||
}
|
||||
if (tc.isExplicitVersion(version)) {
|
||||
core.debug(`Version ${version} is an explicit version.`);
|
||||
if (resolveVersionSpecifierToLatest) {
|
||||
if (!pep440.satisfies(version, versionInput)) {
|
||||
throw new Error(`No version found for ${versionInput}`);
|
||||
}
|
||||
}
|
||||
return version;
|
||||
}
|
||||
const availableVersions = await getAvailableVersions(githubToken);
|
||||
core.debug(`Available versions: ${availableVersions}`);
|
||||
const resolvedVersion = maxSatisfying(availableVersions, version);
|
||||
const resolvedVersion =
|
||||
resolutionStrategy === "lowest"
|
||||
? minSatisfying(availableVersions, version)
|
||||
: maxSatisfying(availableVersions, version);
|
||||
if (resolvedVersion === undefined) {
|
||||
throw new Error(`No version found for ${version}`);
|
||||
}
|
||||
@@ -178,13 +197,14 @@ 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,
|
||||
});
|
||||
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(
|
||||
@@ -225,7 +245,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,
|
||||
@@ -251,3 +271,24 @@ function maxSatisfying(
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function minSatisfying(
|
||||
versions: string[],
|
||||
version: string,
|
||||
): string | undefined {
|
||||
// For semver, we need to use a different approach since tc.evaluateVersions only returns max
|
||||
// Let's use semver directly for min satisfying
|
||||
const minSemver = semver.minSatisfying(versions, version);
|
||||
if (minSemver !== null) {
|
||||
core.debug(`Found a version that satisfies the semver range: ${minSemver}`);
|
||||
return minSemver;
|
||||
}
|
||||
const minPep440 = pep440.minSatisfying(versions, version);
|
||||
if (minPep440 !== null) {
|
||||
core.debug(
|
||||
`Found a version that satisfies the pep440 specifier: ${minPep440}`,
|
||||
);
|
||||
return minPep440;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
@@ -2,14 +2,18 @@ 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 pep440 from "@renovatebot/pep440";
|
||||
import {
|
||||
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";
|
||||
@@ -52,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 (
|
||||
@@ -77,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();
|
||||
|
121
src/setup-uv.ts
121
src/setup-uv.ts
@@ -4,11 +4,12 @@ import * as core from "@actions/core";
|
||||
import * as exec from "@actions/exec";
|
||||
import { restoreCache } from "./cache/restore-cache";
|
||||
import {
|
||||
downloadVersionFromGithub,
|
||||
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,
|
||||
@@ -18,8 +19,9 @@ import {
|
||||
githubToken,
|
||||
ignoreEmptyWorkdir,
|
||||
manifestFile,
|
||||
pythonDir,
|
||||
pythonVersion,
|
||||
serverUrl,
|
||||
resolutionStrategy,
|
||||
toolBinDir,
|
||||
toolDir,
|
||||
versionFile as versionFileInput,
|
||||
@@ -51,12 +53,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) {
|
||||
@@ -69,7 +73,7 @@ async function run(): Promise<void> {
|
||||
}
|
||||
|
||||
function detectEmptyWorkdir(): void {
|
||||
if (fs.readdirSync(".").length === 0) {
|
||||
if (fs.readdirSync(workingDirectory).length === 0) {
|
||||
if (ignoreEmptyWorkdir) {
|
||||
core.info(
|
||||
"Empty workdir detected. Ignoring because ignore-empty-workdir is enabled",
|
||||
@@ -98,29 +102,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,
|
||||
@@ -132,7 +121,12 @@ async function determineVersion(
|
||||
manifestFile: string | undefined,
|
||||
): Promise<string> {
|
||||
if (versionInput !== "") {
|
||||
return await resolveVersion(versionInput, manifestFile, githubToken);
|
||||
return await resolveVersion(
|
||||
versionInput,
|
||||
manifestFile,
|
||||
githubToken,
|
||||
resolutionStrategy,
|
||||
);
|
||||
}
|
||||
if (versionFileInput !== "") {
|
||||
const versionFromFile = getUvVersionFromFile(versionFileInput);
|
||||
@@ -141,7 +135,12 @@ async function determineVersion(
|
||||
`Could not determine uv version from file: ${versionFileInput}`,
|
||||
);
|
||||
}
|
||||
return await resolveVersion(versionFromFile, manifestFile, githubToken);
|
||||
return await resolveVersion(
|
||||
versionFromFile,
|
||||
manifestFile,
|
||||
githubToken,
|
||||
resolutionStrategy,
|
||||
);
|
||||
}
|
||||
const versionFromUvToml = getUvVersionFromFile(
|
||||
`${workingDirectory}${path.sep}uv.toml`,
|
||||
@@ -158,23 +157,37 @@ async function determineVersion(
|
||||
versionFromUvToml || versionFromPyproject || "latest",
|
||||
manifestFile,
|
||||
githubToken,
|
||||
resolutionStrategy,
|
||||
);
|
||||
}
|
||||
|
||||
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 +208,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,26 +228,39 @@ 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 {
|
||||
|
@@ -1,4 +1,5 @@
|
||||
import * as core from "@actions/core";
|
||||
import type { Endpoints } from "@octokit/types";
|
||||
import * as semver from "semver";
|
||||
import { updateChecksums } from "./download/checksum/update-known-checksums";
|
||||
import {
|
||||
@@ -8,6 +9,9 @@ import {
|
||||
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];
|
||||
const versionsManifestFile = process.argv.slice(2)[1];
|
||||
@@ -31,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,5 +1,6 @@
|
||||
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");
|
||||
@@ -14,17 +15,19 @@ 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";
|
||||
export const resolutionStrategy = getResolutionStrategy();
|
||||
|
||||
function getVersionFile(): string {
|
||||
const versionFileInput = core.getInput("version-file");
|
||||
@@ -83,6 +86,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`;
|
||||
@@ -97,6 +108,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 !== "") {
|
||||
@@ -136,3 +187,16 @@ function getManifestFile(): string | undefined {
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function getResolutionStrategy(): "highest" | "lowest" {
|
||||
const resolutionStrategyInput = core.getInput("resolution-strategy");
|
||||
if (resolutionStrategyInput === "lowest") {
|
||||
return "lowest";
|
||||
}
|
||||
if (resolutionStrategyInput === "highest" || resolutionStrategyInput === "") {
|
||||
return "highest";
|
||||
}
|
||||
throw new Error(
|
||||
`Invalid resolution-strategy: ${resolutionStrategyInput}. Must be 'highest' or 'lowest'.`,
|
||||
);
|
||||
}
|
||||
|
@@ -1,8 +1,5 @@
|
||||
import type { OctokitOptions } from "@octokit/core";
|
||||
import { Octokit as Core } from "@octokit/core";
|
||||
import type {
|
||||
Constructor,
|
||||
OctokitOptions,
|
||||
} from "@octokit/core/dist-types/types";
|
||||
import {
|
||||
type PaginateInterface,
|
||||
paginateRest,
|
||||
@@ -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,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,6 +1,6 @@
|
||||
import fs from "node:fs";
|
||||
import * as core from "@actions/core";
|
||||
import { getRequiredVersionFromConfigFile } from "./config-file";
|
||||
import { getConfigValueFromTomlFile } from "../utils/config-file";
|
||||
import { getUvVersionFromRequirementsFile } from "./requirements-file";
|
||||
import { getUvVersionFromToolVersions } from "./tool-versions-file";
|
||||
|
||||
@@ -14,7 +14,7 @@ export function getUvVersionFromFile(filePath: string): string | undefined {
|
||||
try {
|
||||
uvVersion = getUvVersionFromToolVersions(filePath);
|
||||
if (uvVersion === undefined) {
|
||||
uvVersion = getRequiredVersionFromConfigFile(filePath);
|
||||
uvVersion = getConfigValueFromTomlFile(filePath, "required-version");
|
||||
}
|
||||
if (uvVersion === undefined) {
|
||||
uvVersion = getUvVersionFromRequirementsFile(filePath);
|
||||
|
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
|
||||
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
|
||||
"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. */,
|
||||
"target": "ES2022" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
|
||||
"target": "ES2024" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
|
||||
},
|
||||
"exclude": ["node_modules", "**/*.test.ts"]
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user