This MR adds support for building AMD64,ARM64,ARMv7 (the list can be easily extended) images as part of the CI flow.
Few notes:
tests also had to be dockerized, due to sql library depending on CGO_ENABLED=1
the images are built in parallel and merged in a separate job to speed up the process, but using qemu still causes the whole pipeline to take around 40 minutes for new code (for ARM, roughly 20 minutes for test and 20 for build). This concept is based on Docker docs
due to GH Actions limitations (matrix jobs can not use env variables), a bootstrap generate-matrix job was added. Its role is to output a list of PLATFORMS defined in env in a way that can be consumed by matrix for parallel builds. docs
Tagging scheme:
default branch pushes get :latest
tag pushes get :<tag>
any other branch pushes will run the tests and builds, but won't tag the built image
Resolves https://github.com/anatol/pacoloco/issues/89
This MR adds support for building AMD64,ARM64,ARMv7 (the list can be easily extended) images as part of the CI flow.
Few notes:
matrix
jobs can not useenv
variables), a bootstrapgenerate-matrix
job was added. Its role is to output a list ofPLATFORMS
defined inenv
in a way that can be consumed bymatrix
for parallel builds. docsTagging scheme:
:latest
:<tag>
Example run