summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorIvan Gabaldon <igabaldon@inetol.net>2025-09-14 10:36:21 +0200
committerGitHub <noreply@github.com>2025-09-14 10:36:21 +0200
commita0d2ecf43466083925291e749ab9c2a451f6963d (patch)
tree7a16f51ebf4a892a26e94ec6bd2dc5c2bff8153f /.github
parent687121d58497ff170467d6b14988bde11d91516c (diff)
[enh] container: build with uv (#5199)
This commit replaces `pip` in container builds with `uv` pip compat with a 1:1 parity. The only thing that changes is the installation speed of the wheels, which seems to be considerably faster, although I haven't been able to properly quantify this yet. uv also gives us more tools to manage the cache. We can revert the prior cache changes in `container.yml` as we won't have duplicated wheels anymore.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/container.yml34
1 files changed, 5 insertions, 29 deletions
diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml
index 03cbdcd59..d331ed050 100644
--- a/.github/workflows/container.yml
+++ b/.github/workflows/container.yml
@@ -104,8 +104,6 @@ jobs:
needs: build-base
strategy:
fail-fast: false
- # Faster runners first to cache arch independent wheels
- max-parallel: 1
matrix:
include:
- arch: amd64
@@ -121,8 +119,6 @@ jobs:
permissions:
# Organization GHCR
packages: write
- # Clean key cache step
- actions: write
outputs:
docker_tag: ${{ steps.build.outputs.docker_tag }}
@@ -146,23 +142,12 @@ jobs:
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
path: "./local/"
- - name: Restore cache container mounts
- id: cache-container-mounts
- uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
+ - name: Setup cache container uv
+ uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with:
- key: "container-mounts-${{ hashFiles('./container/*.dockerfile') }}"
- restore-keys: "container-mounts-"
- path: |
- /var/tmp/buildah-cache/
- /var/tmp/buildah-cache-*/
-
- # https://github.com/actions/cache/pull/1308
- - if: steps.cache-container-mounts.outputs.cache-hit == 'true'
- name: Clean key cache container mounts
- continue-on-error: true
- env:
- GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- run: gh cache delete container-mounts-${{ hashFiles('./container/*.dockerfile') }}
+ key: "container-uv-${{ matrix.arch }}-${{ hashFiles('./requirements*.txt') }}"
+ restore-keys: "container-uv-${{ matrix.arch }}-"
+ path: "/var/tmp/buildah-cache-1001/uv/"
- if: ${{ matrix.emulation }}
name: Setup QEMU
@@ -181,15 +166,6 @@ jobs:
OVERRIDE_ARCH: "${{ matrix.arch }}"
run: make podman.build
- - if: always()
- name: Save cache container mounts
- uses: actions/cache/save@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
- with:
- key: "container-mounts-${{ hashFiles('./container/*.dockerfile') }}"
- path: |
- /var/tmp/buildah-cache/
- /var/tmp/buildah-cache-*/
-
test:
name: Test (${{ matrix.arch }})
runs-on: ${{ matrix.os }}