hendricius / the-sourdough-framework

Open source book dedicated to helping you to make the best possible sourdough bread at home.
https://breadco.de/book
Creative Commons Attribution Share Alike 4.0 International
2.62k stars 136 forks source link

Build time on CI went to the roof #337

Closed cedounet closed 5 months ago

cedounet commented 8 months ago

Between 25 min and 1 hour? I understand we build a new docker image every time... Surely there is lot we could cache?

hendricius commented 8 months ago
image

Agreed. The caching on Github is not ideal. I found this issue - maybe it can help? https://github.com/actions/cache/issues/31

Especially near the bottom:

      - name: Build and push
        id: docker_build
        uses: docker/build-push-action@v2
        with:
          push: true
          file: Dockerfile.prod
          tags: ${{ steps.meta.outputs.tags }}
          labels: ${{ steps.meta.outputs.labels }}
          cache-from: |
            type=registry,ref=${{ steps.meta.outputs.tags }}
            type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:master
          cache-to: type=inline
cedounet commented 8 months ago

My idea would be that we only build docker image "manually". I.e. we build one and keep using it for the next 6 months.... at some point, because bug-fix in TeXlive or simply to avoid code rot.

hendricius commented 7 months ago

Sounds good - I will create a PR soon!

cedounet commented 5 months ago

modulo https://github.com/hendricius/the-sourdough-framework/issues/349 this is better when pushing to branch or making a PR.

Merge to main still is a problem by the look of it (>30 min)

hendricius commented 5 months ago

Closing this for now. Feel free to open again!