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