git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] gitlab-ci: migrate Windows builds away from Chocolatey

From
Patrick Steinhardt <ps@pks.im>
Date
Jun 18, 2026, 05:40 UTC
Message-ID
<ajOE2XMBzgrXxbH8@pks.im>
In-Reply-To
<ajL1677NQShTO6tD@denethor>
On Wed, Jun 17, 2026 at 03:03:39PM -0500, Justin Tobler wrote:
Show 13 quoted lines
> On 26/06/15 02:21PM, Patrick Steinhardt wrote:
> > Introduce a new script that downloads and installs dependencies
> > directly. This has a couple of benefits:
> > 
> >   - We can drop our dependency on Chocolatey completely, thus improving
> >     reliability.
> > 
> >   - We can easily cache the installers.
> > 
> >   - We get direct control over the exact versions we install.
> 
> Naive question: Do we expect to have to update the pinned versions
> often?

Not really, no, as we're quite conservative when it comes to updating minimum required versions of dependencies.

Show 5 quoted lines
> >   - Installing dependencies is sped up from roundabout 3 minutes to 1
> >     minute.
> 
> Is fetching the dependencides directly just plain faster? Or is this due
> to the caching?

Downloading the dependencies doesn't seem to be the cause -- fetching them without a cache takes only ~3-4 seconds in total, and it didn't take much longer with Chocolatey. I think it's rather that Chocolatey does a bunch of extra steps and installs extra components that we don't need, and that saves us some time:

  - Installing Git is reduced from 70 seconds to 40 seconds.
  - Installing Meson and Ninja is reduced from 20 seconds to 4 seconds.
  - Installing Rust is reduced from 70 seconds to 23 seconds.
Show 16 quoted lines
> > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> > index e0b9a0d82b..87a5343a94 100644
> > --- a/.gitlab-ci.yml
> > +++ b/.gitlab-ci.yml
> > @@ -161,11 +161,16 @@ test:mingw64:
> >      TEST_OUTPUT_DIRECTORY: "C:/Git-Test"
> >    tags:
> >      - saas-windows-medium-amd64
> > +  cache:
> > +    key:
> > +      files:
> > +        - ci/install-dependencies.ps1
> > +    paths:
> > +      - .dependencies
> 
> Nice that we can cache the installers now.

Yeah. The intent behind this is less that we save download time (which as mentioned above is miniscule), but more that it should give us more reliability because we have less interactions with the internet.

Show 9 quoted lines
> >    before_script:
> >      - *windows_before_script
> > -    - choco install -y git meson ninja rust-ms
> > -    - Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
> > -    - refreshenv
> > +    - ./ci/install-dependencies.ps1
> > +    - $env:Path = "C:\Meson;C:\Rust\bin;$env:Path"
> 
> I assume Git is already discoverable on the path?

Good question -- in fact it's not, but in Meson we know to use the well-known path of "C:\Program Files\Git" automatically and that's why we don't have to add it here. That certainly is a bit hacky, but I'm not sure whether we need to change it.

Just let me know if you think so.
Thanks!
Patrick
Previous: Justin ToblerNext: Justin Tobler
Message 3 of 4 in “gitlab-ci: migrate Windows builds away from Chocolatey”
  1. gitlab-ci: migrate Windows builds away from ChocolateyPatrick Steinhardt, Jun 15, 2026
  2. Justin ToblerJun 17, 2026
  3. Patrick SteinhardtJun 18, 2026
  4. Justin ToblerJun 18, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.