diff --git a/.github/workflows/custom.yml b/.github/workflows/custom.yml index 04f1bdc..d344855 100644 --- a/.github/workflows/custom.yml +++ b/.github/workflows/custom.yml @@ -15,29 +15,25 @@ jobs: matrix: python-version: ["3.13"] steps: - - name: checkout repo - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + - name: setup Python with uv + id: setup-uv + uses: astral-sh/setup-uv@v5 with: + version: latest python-version: ${{ matrix.python-version }} + enable-cache: true + prune-cache: false # do not remove pre-built wheels + ignore-nothing-to-cache: true + cache-dependency-glob: "**/pyproject.toml" - - name: get site-packages path - id: site_packages - run: echo "site_dir=$(python -c 'import site; print(site.getsitepackages()[0])')" > "$GITHUB_OUTPUT" - - - name: cache installed packages - uses: actions/cache@v4 - with: - path: ${{ steps.site_packages.outputs.site_dir }} - key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }} - restore-keys: ${{ runner.os }}-pip- + - name: hint on cache hit + if: steps.setup-uv.outputs.cache-hit == 'true' + run: echo "Hit cache" - name: install dependencies - run: | - python -m pip install --upgrade pip - pip install . + run: uv pip install . - name: build my custom calendar run: make run diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f4d62a5..34d79aa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,29 +15,25 @@ jobs: matrix: python-version: ["3.13"] steps: - - name: checkout repo - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + - name: setup Python with uv + id: setup-uv + uses: astral-sh/setup-uv@v5 with: + version: latest python-version: ${{ matrix.python-version }} + enable-cache: true + prune-cache: false # do not remove pre-built wheels + ignore-nothing-to-cache: true + cache-dependency-glob: "**/pyproject.toml" - - name: get site-packages path - id: site_packages - run: echo "site_dir=$(python -c 'import site; print(site.getsitepackages()[0])')" > "$GITHUB_OUTPUT" - - - name: cache installed packages - uses: actions/cache@v4 - with: - path: ${{ steps.site_packages.outputs.site_dir }} - key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }} - restore-keys: ${{ runner.os }}-pip- + - name: hint on cache hit + if: steps.setup-uv.outputs.cache-hit == 'true' + run: echo "Hit cache" - name: install dependencies - run: | - python -m pip install --upgrade pip - pip install . + run: uv pip install . - name: build VNDB calendar with en & ja releases run: make en