Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify and optimize builds (Makefiles and Workflows) #253

Closed
bfjelds opened this issue Feb 24, 2021 · 5 comments
Closed

Simplify and optimize builds (Makefiles and Workflows) #253

bfjelds opened this issue Feb 24, 2021 · 5 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request stale

Comments

@bfjelds
Copy link
Collaborator

bfjelds commented Feb 24, 2021

The Akri builds are based on Makefile. The Makefile can be run locally and are run from our Workflows. They work. And that might be the best thing that can be said about them.

But they are hard to maintain and easy to get incorrect and have no linting/validation.

This is a pattern that is all over the scripts that seems ridiculous (there must be a better way, a more function-like way with some reuse):

ifeq (1, ${BUILD_ARM32})
	docker build $(CACHE_OPTION) -f $(DOCKERFILE_DIR)/Dockerfile.controller . -t $(PREFIX)/controller:$(LABEL_PREFIX)-$(ARM32V7_SUFFIX) --build-arg PLATFORM=$(ARM32V7_SUFFIX) --build-arg CROSS_BUILD_TARGET=$(ARM32V7_TARGET)
endif

The automated Workflow builds are based on the Makefiles. For each Rust container, we build the entire source tree for a given platform, then put the appropriate binary into the appropriate container (so, we build the whole tree to grab the agent, the whole tree to grab the controller, etc). It would be better to only build once if possible.

@bfjelds bfjelds added documentation Improvements or additions to documentation enhancement New feature or request labels Feb 24, 2021
@bfjelds
Copy link
Collaborator Author

bfjelds commented Feb 24, 2021

Also, at a minimum, we should provide much more documentation (#211) around how the existing system works.

@kate-goldenring
Copy link
Contributor

@bfjelds can this PR be closed due to #270 which makes it so we only build our rust components once in our Workflows?

@bfjelds
Copy link
Collaborator Author

bfjelds commented Aug 24, 2021

I think #270 is only part of this issue ... part of this issue was intended to address the fact that the Makefiles were created by someone who doesn't know make (me). There must be better ways to create the Makefiles that are more manageable and clear.

@kate-goldenring
Copy link
Contributor

That Makes sense. We can see this issue as a call for help for optimizing our makefiles

@github-actions
Copy link
Contributor

Issue has been automatically marked as stale due to inactivity for 90 days. Update the issue to remove label, otherwise it will be automatically closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request stale
Projects
Status: Done
Development

No branches or pull requests

2 participants