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

[WIP] Speed up CI tests by using the cached images for QFieldCloud #1092

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

gounux
Copy link
Contributor

@gounux gounux commented Dec 22, 2024

No description provided.

@duke-nyuki
Copy link
Collaborator

@gounux gounux changed the title [WIP] Use docker's build-push-action to speedup tests CI [WIP] Speed up CI tests by using the cached images for QFieldCloud Dec 27, 2024
@gounux
Copy link
Contributor Author

gounux commented Jan 14, 2025

Here is a summary of what has been done so far, regarding speeding up the tests CI.

3 different approaches have been tried :

  • using the docker/build-push-action, same as in the build_and_push release workflow

    • see this commit : the action is used 4 times, for docker-app (targets webserver_test and worker_wrapper_runtime), docker-qgis and docker-nginx
    • ❌ tests do not pass, workers seems not to be activated (see this workflow's log)
    • tried to add some network/host options, does not seem to change anything
    • cache seems to be used (see this action's summary), but loading the built image into local repository with the load: true key, which is necessary, makes build time slower
  • using the docker/bake-action, which allows to build a full compose stack

    • see this commit and this commit, the bake-action is used only once, with set keys for using ghcr registry cache
    • ✅ tests do pass but are slow, ~25 minutes (~5 minutes for build + ~45 seconds for starting containers, which is not much faster than what is currently implemented)
    • registry cache seems not to be used as requested (see this action's summary)
    • the docker compose up -d job seems to rebuild some local images
  • overriding the docker compose stack with a docker-compose.override.ci.yml file, which only replaces the image keys with the one previously built

    • see this commit
    • ❌ tests do not pass, targeted image suffixed with commit's SHA are not available from the ghcr repository actually
    • compose's image key does not take precedence on build key
    • this approach would force us to consider adding some changes and reviewing the way the whole docker-compose.override.*.yml files are organized and orchestrated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants