From a93cedabfc6b1349847e44f33edbaf1ba1660a80 Mon Sep 17 00:00:00 2001 From: tydeu Date: Fri, 4 Oct 2024 12:12:18 -0400 Subject: [PATCH 1/2] feat: expand to cache to full index --- scripts/testbed-create.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/testbed-create.py b/scripts/testbed-create.py index ec95f31..9aa62b7 100755 --- a/scripts/testbed-create.py +++ b/scripts/testbed-create.py @@ -113,11 +113,7 @@ def create_layers(entries: Iterable[TestbedEntry]) -> Iterable[TestbedLayer]: if git_url is None: logging.error(f"{pkg['fullName']}: Package lacks a Git source") else: - cache_builds = ( - args.cache and - pkg['owner'] in ['leanprover', 'leanprover-community'] and - pkg['fullName'] != 'leanprover-community/mathlib' - ) + cache_builds = args.cache and pkg['fullName'] != 'leanprover-community/mathlib' entry = create_entry( pkg['fullName'], git_url, toolchains, args.version_tags, cache_builds, From 0f15d8c3f9dca17138a1c1f6b5722434a284acb6 Mon Sep 17 00:00:00 2001 From: tydeu Date: Fri, 4 Oct 2024 14:54:49 -0400 Subject: [PATCH 2/2] chore: run testbed on cache label --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f0a583..5ebb02c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,7 +82,7 @@ jobs: name: Compute Configuration run: | if ${{ github.event_name == 'pull_request' }}; then - if ${{ contains(github.event.pull_request.labels.*.name, 'A-index') }}; then + if ${{ contains(github.event.pull_request.labels.*.name, 'A-index') || contains(github.event.pull_request.labels.*.name, 'A-cache') }}; then echo testbed=true >> "$GITHUB_OUTPUT" echo 'package-pattern=.*' >> "$GITHUB_OUTPUT" elif ${{ contains(github.event.pull_request.labels.*.name, 'A-testbed') }}; then @@ -90,7 +90,7 @@ jobs: echo 'package-pattern=^leanprover' >> "$GITHUB_OUTPUT" fi echo search-packages=${{ contains(github.event.pull_request.labels.*.name, 'A-search') }} >> "$GITHUB_OUTPUT" - echo 'testbed-toolchain=${{ contains(github.event.pull_request.labels.*.name, 'A-testbed') && 'package,latest' || 'none' }}' >> "$GITHUB_OUTPUT" + echo 'testbed-toolchain=${{ (contains(github.event.pull_request.labels.*.name, 'A-testbed') || contains(github.event.pull_request.labels.*.name, 'A-cache')) && 'package,latest' || 'none' }}' >> "$GITHUB_OUTPUT" echo cache-builds=${{ contains(github.event.pull_request.labels.*.name, 'A-cache') }} >> "$GITHUB_OUTPUT" else if ${{ github.event_name == 'push' && github.ref_name == 'master' && contains(github.event.head_commit.message, 'UPDATE-INDEX') }}; then