metanorma / metanorma-docker

Docker container for running the Metanorma toolchain
https://www.metanorma.com
5 stars 3 forks source link

Unroll the flavors to multiple jobs (each in a separate container) to speed up GHA run #93

Closed ronaldtse closed 2 years ago

ronaldtse commented 3 years ago

https://github.com/metanorma/metanorma-docker/blob/e5dd3597091ca95211f88b8bb38ef6b240939eb6/Makefile#L121-L125

CAMOBAP commented 3 years ago

We need to find a way how we can share docker imaged between jobs https://github.community/t/whats-the-recommended-way-to-pass-a-docker-image-to-the-next-job-in-a-workflow/17225/11

Research in progress...

ronaldtse commented 3 years ago

@CAMOBAP isn't GHA's matrix functionality perfect for this? Then we can separate failures by the flavor as well.

CAMOBAP commented 3 years ago

docker save/load not works for image 2.2Gb, reviewing docker image to find potential to minimize it

CAMOBAP commented 3 years ago

After https://github.com/metanorma/metanorma-docker/pull/114 it becomes a bit less 1.85Gb

ronaldtse commented 2 years ago

This workflow is a perfect example on how we can build the image, upload as artifact (with minimal retention-days), then run tests on the containers, before releasing them.

https://github.com/docker/build-push-action/blob/master/docs/advanced/share-image-jobs.md

And this is "test before push": https://github.com/docker/build-push-action/blob/master/docs/advanced/test-before-push.md

ronaldtse commented 2 years ago

And this is building multiple platforms at the same time: https://github.com/docker/build-push-action/blob/master/docs/advanced/multi-platform.md