From d50c96b35028e5ebdf30063ca795a60fd7c942a2 Mon Sep 17 00:00:00 2001 From: Mason Malone <651224+MasonM@users.noreply.github.com> Date: Mon, 23 Dec 2024 12:35:49 -0800 Subject: [PATCH] ci: don't redundantly install manifests/build binaries `make install` is being redundantly run three times for each E2E test: 1. In the workflow: https://github.com/argoproj/argo-workflows/blob/6699ab396f830210f6dcac4f00a9328a629c142f/.github/workflows/ci-build.yaml#L349-L350 2. As a prerequisite of `make start`: https://github.com/argoproj/argo-workflows/blob/6699ab396f830210f6dcac4f00a9328a629c142f/Makefile#L547o 3. As a dependency by Kit: https://github.com/argoproj/argo-workflows/blob/6699ab396f830210f6dcac4f00a9328a629c142f/tasks.yaml#L39 Similarly, the changes in https://github.com/argoproj/argo-workflows/pull/14012 to centralize binary building aren't effective because the binaries are being rebuilt. This eliminates the redundancy by removing the unnecessary prerequisites from the `Makefile` and the redundant `make install` step in `ci-build.yaml`. Also, I added `make --touch dist/*` to mark everything as up-to-date so the binaries aren't rebuilts (docs: https://www.gnu.org/software/make/manual/html_node/Instead-of-Execution.html) Signed-off-by: Mason Malone <651224+MasonM@users.noreply.github.com> --- .github/workflows/ci-build.yaml | 6 ++++-- Makefile | 6 +----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml index d42bf0cee4aa..1b0d7b5b23d6 100644 --- a/.github/workflows/ci-build.yaml +++ b/.github/workflows/ci-build.yaml @@ -339,6 +339,10 @@ jobs: with: name: cli path: dist/ + - name: Prepare binaries + run: | + chmod +x dist/* + make --touch dist/* - name: Set-up /etc/hosts run: | echo '127.0.0.1 dex' | sudo tee -a /etc/hosts @@ -346,8 +350,6 @@ jobs: echo '127.0.0.1 postgres' | sudo tee -a /etc/hosts echo '127.0.0.1 mysql' | sudo tee -a /etc/hosts echo '127.0.0.1 azurite' | sudo tee -a /etc/hosts - - name: Install manifests - run: make install PROFILE=${{matrix.profile}} STATIC_FILES=false - name: Start controller/API run: | make start PROFILE=${{matrix.profile}} \ diff --git a/Makefile b/Makefile index 54ece57cc82a..bc4368ff4bed 100644 --- a/Makefile +++ b/Makefile @@ -541,11 +541,7 @@ endif .PHONY: start ifeq ($(RUN_MODE),local) -ifeq ($(API),true) -start: install controller kit cli -else -start: install controller kit -endif +start: kit else start: install kit endif