Coder Social home page Coder Social logo

Comments (5)

future-highway avatar future-highway commented on July 17, 2024 1

The build step in the two jobs are doing different work (container one is downloading crates). That would account for the some difference in run times.

They both were cache hits (so not cold builds) but the container based one either didn't have everything it needed cached, or it isn't configured (or can't) take advantage of the cache as well as the other.

The biggest take away for me though was that initializing the container was more time then downloading the dependencies (the current setup). So it may be worth waiting to switch until containers can provide some other value or the dependencies increase, flipping the advantage.

from aurae.

sidpalas avatar sidpalas commented on July 17, 2024 1

@future-highway, that makes sense!

I added another test job using the busybox image (1.24MB) and it starts in 2 seconds to see how long initialization would take for a small image, so it seems that most of the container initialization time is spent pulling the large image with the Rust toolchain.

With self-hosted runners, this image could be cached across runs, but with GitHub's hosted runners I don't think we have any control over image caching.

Holding off until there is a significant speedup seems like the way to go.

Also, I am not very familiar with Rust so perhaps others have ideas on making the build container image smaller

from aurae.

sidpalas avatar sidpalas commented on July 17, 2024

I took a stab at this with sidpalas#1

It still needs some work and the container-based version is slower than the one without. Does anyone have thoughts on why this is? Are containers run with constrained CPU/memory relative to the default VM?

from aurae.

cryptaliagy avatar cryptaliagy commented on July 17, 2024

@future-highway, that makes sense!

I added another test job using the busybox image (1.24MB) and it starts in 2 seconds to see how long initialization would take for a small image, so it seems that most of the container initialization time is spent pulling the large image with the Rust toolchain.

With self-hosted runners, this image could be cached across runs, but with GitHub's hosted runners I don't think we have any control over image caching.

Holding off until there is a significant speedup seems like the way to go.

Also, I am not very familiar with Rust so perhaps others have ideas on making the build container image smaller

You might be able to leverage this experimental GH actions cache

https://docs.docker.com/build/cache/backends/gha/

from aurae.

jesse-peters avatar jesse-peters commented on July 17, 2024

We have migrated the jobs to use a build container for both the final build step and the test jobs.

from aurae.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.