Giter Club home page Giter Club logo

Comments (6)

jamwaffles avatar jamwaffles commented on May 29, 2024

It looks like most of that time is spent in Docker containers. Cargo's cache doesn't get copied into them AFAIK, so it will spend the time downloading and compiling every dependency for every arch for every build. Is it enough to cargo build --target <target arch>, or should/must the tests be run against that arch? If you just wanted a successful build, you could let Travis keep the build cache for a target.

A bandaid I can think of right now is defining a build matrix in the Travis config so each arch is at least built and tested in parallel. I haven't had good luck exposing Cargo caches to Docker containers, but it might worth a shot with a volume mapping.

from angle-grinder.

rcoh avatar rcoh commented on May 29, 2024

For pull requests, I'm fine only running the tests directly on linux without using docker.

When travis has containers available, we each arch does get built and tested in parallel, so the wall-clock time to results is "only" 30 minutes

from angle-grinder.

akdor1154 avatar akdor1154 commented on May 29, 2024

I am a bit confused over what cross is doing in there tbh. Unless I am really misunderstanding how Travis is configured, it looks like each platform is built on its native OS type, so cross isn't really achieving anything at present. (So on linux, host os is linux and cross targets x86_64-unknown-linux-musl; on OS X, host OS is OS X and cross targets x86_64-darwin-whatever-the-rest-of-the-tuple-is.)

I'm not sure if this impacts build time however. Happy to look though, it would be basically applying the flow I've put in the Windows Build PR to the other platforms as well.

Generally when I need quick CI my first response is "set up CircleCI", not sure if you are up for such a change though. :) You'd need to stick with cross then though, afaik it only supports Linux host OSes. There may also be issues because CircleCI itself uses Docker heavily in order to get its startup times so quick.

Additionally, when I was testing, I think the cache is acting per-branch. So updates to a PR would be down to normal times, but each new PR is currently quite a slow build. I'm not sure if this is by design in Travis or if it's configurable (or if it's a bug...)

from angle-grinder.

rcoh avatar rcoh commented on May 29, 2024

Additionally, when I was testing, I think the cache is acting per-branch. So updates to a PR would be down to normal times, but each new PR is currently quite a slow build. I'm not sure if this is by design in Travis or if it's configurable (or if it's a bug...)

From the travis docs,

If a branch does not have its own cache, Travis CI fetches the default branch cache.

I'm not sure if that's something I have to setup manually, but it seems like branches should get a cache on first-built

from angle-grinder.

rcoh avatar rcoh commented on May 29, 2024

I made some tweaks in #54 that get PR builds down to 10 minutes, a decent improvement

from angle-grinder.

rcoh avatar rcoh commented on May 29, 2024

I have no idea what happened, maybe something on Travis? Anyway, builds now finish in 3 minutes!

from angle-grinder.

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.