From d4b9e51ab199db94187793380ca241da97f24562 Mon Sep 17 00:00:00 2001 From: Scott Andrews Date: Thu, 25 Jun 2026 21:40:54 -0400 Subject: [PATCH 1/3] Install tool improvements - install in parallel - use pre-built binaries when available - skip tools job, individual tools are installed lazily Signed-off-by: Scott Andrews --- .github/workflows/ci.yaml | 206 ++++++++++++++++++++++---------------- 1 file changed, 117 insertions(+), 89 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 20b0bab..28417e6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,82 +13,105 @@ on: jobs: tools: + # Synthetic job to host config anchors referenced by other jobs. + # Running this job does no meaningful work, but would pass. name: Build and cache tools runs-on: ubuntu-latest + if: false steps: - uses: actions/checkout@v7 - uses: actions/setup-go@v6 with: go-version-file: go.mod cache-dependency-path: '**/*.sum' - - &install-controller-gen - name: Install controller-gen - uses: reconcilerio/go-install-action@v1 - with: - package: sigs.k8s.io/controller-tools/cmd/controller-gen - working-directory: hack/controller-gen - output-path-env: CONTROLLER_GEN - - &install-crane - name: Install crane - uses: reconcilerio/install-crane-action@v1 - with: - version: v0.21.5 - - &install-diegen - name: Install diegen - uses: reconcilerio/go-install-action@v1 - with: - package: reconciler.io/dies/diegen - working-directory: hack/diegen - output-path-env: DIEGEN - - &install-goimports - name: Install goimports - uses: reconcilerio/go-install-action@v1 - with: - package: golang.org/x/tools/cmd/goimports - working-directory: hack/goimports - output-path-env: GOIMPORTS - - &install-imgpkg - name: Install imgpkg - uses: reconcilerio/go-install-action@v1 - with: - package: carvel.dev/imgpkg/cmd/imgpkg - working-directory: hack/imgpkg - output-path-env: IMGPKG - - &install-kapp - name: Install kapp - uses: reconcilerio/go-install-action@v1 - with: - package: carvel.dev/kapp/cmd/kapp - working-directory: hack/kapp - output-path-env: KAPP - - &install-kbld - name: Install kbld - uses: reconcilerio/go-install-action@v1 - with: - package: carvel.dev/kbld/cmd/kbld - working-directory: hack/kbld - output-path-env: KBLD - - &install-ko - name: Install ko - uses: reconcilerio/go-install-action@v1 - with: - package: github.com/google/ko - working-directory: hack/ko - output-path-env: KO - - &install-kustomize - name: Install kustomize - uses: reconcilerio/go-install-action@v1 - with: - package: sigs.k8s.io/kustomize/kustomize/v4 - working-directory: hack/kustomize - output-path-env: KUSTOMIZE - - &install-yq - name: Install yq - uses: reconcilerio/go-install-action@v1 - with: - package: github.com/mikefarah/yq/v4 - working-directory: hack/yq - output-path-env: YQ + - parallel: + - &install-controller-gen + name: Install controller-gen + uses: reconcilerio/go-install-action@v1 + with: + package: sigs.k8s.io/controller-tools/cmd/controller-gen + working-directory: hack/controller-gen + download-url-template: https://github.com/kubernetes-sigs/controller-tools/releases/download/${version}/controller-gen-${os}-${arch} + output-path-env: CONTROLLER_GEN + toolchain: auto + - &install-crane + name: Install crane + uses: reconcilerio/install-crane-action@v1 + with: + version: v0.21.5 + - &install-diegen + name: Install diegen + uses: reconcilerio/go-install-action@v1 + with: + package: reconciler.io/dies/diegen + working-directory: hack/diegen + download-url-template: https://github.com/reconcilerio/dies/releases/download/${version}/diegen-${os}-${arch} + output-path-env: DIEGEN + toolchain: auto + - &install-goimports + name: Install goimports + uses: reconcilerio/go-install-action@v1 + with: + package: golang.org/x/tools/cmd/goimports + working-directory: hack/goimports + output-path-env: GOIMPORTS + toolchain: auto + - &install-imgpkg + name: Install imgpkg + uses: reconcilerio/go-install-action@v1 + with: + package: carvel.dev/imgpkg/cmd/imgpkg + working-directory: hack/imgpkg + download-url-template: https://github.com/carvel-dev/imgpkg/releases/download/${version}/imgpkg-${os}-${arch} + output-path-env: IMGPKG + toolchain: auto + - &install-kapp + name: Install kapp + uses: reconcilerio/go-install-action@v1 + with: + package: carvel.dev/kapp/cmd/kapp + working-directory: hack/kapp + download-url-template: https://github.com/carvel-dev/kapp/releases/download/${version}/kapp-${os}-${arch} + output-path-env: KAPP + toolchain: auto + - &install-kbld + name: Install kbld + uses: reconcilerio/go-install-action@v1 + with: + package: carvel.dev/kbld/cmd/kbld + working-directory: hack/kbld + download-url-template: https://github.com/carvel-dev/kbld/releases/download/${version}/kbld-${os}-${arch} + output-path-env: KBLD + toolchain: auto + - &install-ko + name: Install ko + uses: reconcilerio/go-install-action@v1 + with: + package: github.com/google/ko + working-directory: hack/ko + download-url-template: https://github.com/ko-build/ko/releases/download/${version}/ko_${version:1}_${os^}_${arch/amd64/x86_64}.tar.gz + download-path-within-archive: ko + output-path-env: KO + toolchain: auto + - &install-kustomize + name: Install kustomize + uses: reconcilerio/go-install-action@v1 + with: + package: sigs.k8s.io/kustomize/kustomize/v5 + working-directory: hack/kustomize + download-url-template: https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2F${version}/kustomize_${version}_${os}_${arch}.tar.gz + download-path-within-archive: kustomize + output-path-env: KUSTOMIZE + toolchain: auto + - &install-yq + name: Install yq + uses: reconcilerio/go-install-action@v1 + with: + package: github.com/mikefarah/yq/v4 + working-directory: hack/yq + download-url-template: https://github.com/mikefarah/yq/releases/download/${version}/yq_${os}_${arch} + output-path-env: YQ + toolchain: auto unit: name: Unit Test @@ -100,11 +123,12 @@ jobs: with: go-version-file: go.mod cache-dependency-path: '**/*.sum' - - *install-controller-gen - - *install-diegen - - *install-goimports - - *install-kustomize - - *install-yq + - parallel: + - *install-controller-gen + - *install-diegen + - *install-goimports + - *install-kustomize + - *install-yq - name: Test run: make test - name: Report coverage @@ -131,9 +155,10 @@ jobs: with: go-version-file: go.mod cache-dependency-path: '**/*.sum' - - *install-imgpkg - - *install-kbld - - *install-ko + - parallel: + - *install-imgpkg + - *install-kbld + - *install-ko - name: OCI registry id: registry uses: reconcilerio/registry@v1 @@ -204,16 +229,18 @@ jobs: - kubernetes-version: v1.37 steps: - uses: actions/checkout@v7 - - uses: actions/setup-go@v6 - with: - go-version-file: go.mod - cache-dependency-path: '**/*.sum' - - uses: actions/setup-python@v6 - with: - python-version: "3.10" - - *install-imgpkg - - *install-kapp - - *install-kbld + - parallel: + - uses: actions/setup-go@v6 + with: + go-version-file: go.mod + cache-dependency-path: '**/*.sum' + - uses: actions/setup-python@v6 + with: + python-version: "3.10" + - parallel: + - *install-imgpkg + - *install-kapp + - *install-kbld - name: Start registry id: registry uses: reconcilerio/registry@v1 @@ -379,9 +406,10 @@ jobs: with: go-version-file: go.mod cache-dependency-path: '**/*.sum' - - *install-crane - - *install-imgpkg - - *install-kbld + - parallel: + - *install-crane + - *install-imgpkg + - *install-kbld - name: Get the version id: get_version run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} From 996c3ae8ef68c01da5460d73caf1d98b48c399c9 Mon Sep 17 00:00:00 2001 From: Scott Andrews Date: Thu, 25 Jun 2026 21:46:26 -0400 Subject: [PATCH 2/3] other jobs should not need the tools job Signed-off-by: Scott Andrews --- .github/workflows/ci.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 28417e6..07a7ee6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -116,7 +116,6 @@ jobs: unit: name: Unit Test runs-on: ubuntu-latest - needs: tools steps: - uses: actions/checkout@v7 - uses: actions/setup-go@v6 @@ -146,7 +145,6 @@ jobs: stage: name: Stage runs-on: ubuntu-latest - needs: tools env: KO_PLATFORMS: linux/amd64,linux/arm64 steps: From 977c22b887e91412f51f258c3db065fac8fdaf7a Mon Sep 17 00:00:00 2001 From: Scott Andrews Date: Thu, 25 Jun 2026 21:51:52 -0400 Subject: [PATCH 3/3] kusstomize v4 Signed-off-by: Scott Andrews --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 07a7ee6..29d41ae 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -97,7 +97,7 @@ jobs: name: Install kustomize uses: reconcilerio/go-install-action@v1 with: - package: sigs.k8s.io/kustomize/kustomize/v5 + package: sigs.k8s.io/kustomize/kustomize/v4 working-directory: hack/kustomize download-url-template: https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2F${version}/kustomize_${version}_${os}_${arch}.tar.gz download-path-within-archive: kustomize