Skip to content

Commit

Permalink
ci: don't redundantly install manifests/build binaries
Browse files Browse the repository at this point in the history
`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
#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 <[email protected]>
  • Loading branch information
MasonM committed Dec 23, 2024
1 parent 6699ab3 commit d50c96b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -339,15 +339,17 @@ 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
echo '127.0.0.1 minio' | sudo tee -a /etc/hosts
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}} \
Expand Down
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d50c96b

Please sign in to comment.