From e097838b3ca0a943191e8a625fdb885783ef2603 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Sun, 31 Mar 2024 11:25:36 +0200 Subject: [PATCH 01/10] Try out potential new action --- action.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 893e78b..6d63066 100644 --- a/action.yml +++ b/action.yml @@ -47,9 +47,7 @@ runs: python-version: "3.x" update-environment: false - - name: Install uv - run: curl -LsSf https://astral.sh/uv/install.sh | sh - shell: bash + - uses: hynek/setup-cached-uv@8f76bff4e5cc - name: Find uv cache run: echo "UV_CACHE=$(uv cache dir)" >>$GITHUB_ENV From b133041f053479a9d9dc3f004307185dd2414a21 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Sun, 31 Mar 2024 11:26:40 +0200 Subject: [PATCH 02/10] fix hash --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 6d63066..55f712f 100644 --- a/action.yml +++ b/action.yml @@ -47,7 +47,7 @@ runs: python-version: "3.x" update-environment: false - - uses: hynek/setup-cached-uv@8f76bff4e5cc + - uses: hynek/setup-cached-uv@976188647b9b72117802028580eea6c3f3ae7a26 - name: Find uv cache run: echo "UV_CACHE=$(uv cache dir)" >>$GITHUB_ENV From 6ce90349d596f4d70dad6eb7bd696d167e96109c Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Sun, 31 Mar 2024 11:53:09 +0200 Subject: [PATCH 03/10] Remove double cache handling --- action.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/action.yml b/action.yml index 55f712f..ba752f8 100644 --- a/action.yml +++ b/action.yml @@ -49,16 +49,6 @@ runs: - uses: hynek/setup-cached-uv@976188647b9b72117802028580eea6c3f3ae7a26 - - name: Find uv cache - run: echo "UV_CACHE=$(uv cache dir)" >>$GITHUB_ENV - shell: bash - - - name: Cache uv - uses: actions/cache@v4 - with: - path: ${{ env.UV_CACHE }} - key: ${{ runner.os }}-uv - - name: Create venv for tools run: > uv venv From e9cdbe10219b5a1f501b93f20d760dce038d6c0f Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Sun, 31 Mar 2024 13:13:54 +0200 Subject: [PATCH 04/10] No more hashes --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index ba752f8..585edf2 100644 --- a/action.yml +++ b/action.yml @@ -47,7 +47,7 @@ runs: python-version: "3.x" update-environment: false - - uses: hynek/setup-cached-uv@976188647b9b72117802028580eea6c3f3ae7a26 + - uses: hynek/setup-cached-uv@v1 - name: Create venv for tools run: > From 0dd5ebcea842b98083c03c8a893812ec1efdec80 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Mon, 8 Apr 2024 10:52:29 -0700 Subject: [PATCH 05/10] use suffixes for more efficient cache-use --- action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/action.yml b/action.yml index 585edf2..d81d146 100644 --- a/action.yml +++ b/action.yml @@ -48,6 +48,8 @@ runs: update-environment: false - uses: hynek/setup-cached-uv@v1 + with: + cache-dependency-path: requirements/tools.txt - name: Create venv for tools run: > From aa138039fadb052fa2931110fd036240443ac4b1 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Mon, 8 Apr 2024 10:54:27 -0700 Subject: [PATCH 06/10] Fix paths --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index d81d146..b6ba01e 100644 --- a/action.yml +++ b/action.yml @@ -49,7 +49,7 @@ runs: - uses: hynek/setup-cached-uv@v1 with: - cache-dependency-path: requirements/tools.txt + cache-dependency-path: ${{ github.action_path }}/requirements/tools.txt - name: Create venv for tools run: > From ff28223025e6b1d06e560b5d9ef3c1b34d4a7bf0 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Mon, 8 Apr 2024 10:57:43 -0700 Subject: [PATCH 07/10] Move deps to somewhere hashable --- action.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index b6ba01e..e00facc 100644 --- a/action.yml +++ b/action.yml @@ -47,10 +47,6 @@ runs: python-version: "3.x" update-environment: false - - uses: hynek/setup-cached-uv@v1 - with: - cache-dependency-path: ${{ github.action_path }}/requirements/tools.txt - - name: Create venv for tools run: > uv venv @@ -58,6 +54,14 @@ runs: --python ${{ steps.python-baipp.outputs.python-path }} shell: bash + - name: Move deps to a public path so we can hash them in another action. + run: cp ${{ github.action_path }}/requirements/tools.txt /tmp/baipp/tools.txt + shell: bash + + - uses: hynek/setup-cached-uv@v1 + with: + cache-dependency-path: /tmp/baipp/tools.txt + - name: Install our tools run: > uv pip sync From e4df2b3f7f48436316dbc3eb25d9ed33a489eca6 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Mon, 8 Apr 2024 10:59:02 -0700 Subject: [PATCH 08/10] oops --- action.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/action.yml b/action.yml index e00facc..387f89b 100644 --- a/action.yml +++ b/action.yml @@ -47,21 +47,23 @@ runs: python-version: "3.x" update-environment: false - - name: Create venv for tools - run: > - uv venv - /tmp/baipp - --python ${{ steps.python-baipp.outputs.python-path }} - shell: bash - - name: Move deps to a public path so we can hash them in another action. - run: cp ${{ github.action_path }}/requirements/tools.txt /tmp/baipp/tools.txt + run: | + mkdir /tmp/baipp + cp ${{ github.action_path }}/requirements/tools.txt /tmp/baipp/tools.txt shell: bash - uses: hynek/setup-cached-uv@v1 with: cache-dependency-path: /tmp/baipp/tools.txt + - name: Create venv for tools + run: > + uv venv + /tmp/baipp + --python ${{ steps.python-baipp.outputs.python-path }} + shell: bash + - name: Install our tools run: > uv pip sync From f5aa41d94644254a198a3ededb5c0746c2d16c22 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Mon, 8 Apr 2024 11:00:36 -0700 Subject: [PATCH 09/10] Can't update in place --- action.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 387f89b..0f11996 100644 --- a/action.yml +++ b/action.yml @@ -48,14 +48,12 @@ runs: update-environment: false - name: Move deps to a public path so we can hash them in another action. - run: | - mkdir /tmp/baipp - cp ${{ github.action_path }}/requirements/tools.txt /tmp/baipp/tools.txt + run: cp ${{ github.action_path }}/requirements/tools.txt /tmp/tools.txt shell: bash - uses: hynek/setup-cached-uv@v1 with: - cache-dependency-path: /tmp/baipp/tools.txt + cache-dependency-path: /tmp/tools.txt - name: Create venv for tools run: > From a3c8002b1a885bbea200be58007d61d3adb78bbd Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Mon, 8 Apr 2024 11:19:47 -0700 Subject: [PATCH 10/10] no tmp --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 0f11996..c1f1f5c 100644 --- a/action.yml +++ b/action.yml @@ -48,12 +48,12 @@ runs: update-environment: false - name: Move deps to a public path so we can hash them in another action. - run: cp ${{ github.action_path }}/requirements/tools.txt /tmp/tools.txt + run: cp ${{ github.action_path }}/requirements/tools.txt . shell: bash - uses: hynek/setup-cached-uv@v1 with: - cache-dependency-path: /tmp/tools.txt + cache-dependency-path: tools.txt - name: Create venv for tools run: >