Skip to content

GitLab CI for Windows & OSX #25980

@saraedum

Description

@saraedum

Developers currently don't have an easy way to test proposed changes on OSX & Windows if they do not have access to such machines themselves. Given the flakiness of the patchbot on Windows, it would be nice to provision GitLab CI infrastructure for these systems.

We can not use the docker setup unfortunately, as docker on Windows is not ready to run fork-heavy workloads (#25805) and docker on OSX does simply not exist.

The current idea would be to provide SSH runners on Linux machines tagged as osx & nt that run QEMU/KVM. An incoming CI request would then take an LVM snapshot of an existing Windows/OSX machine, start a QEMU/KVM machine on it, and run its CI via SSH.

CI on the "develop" branch would probably start from a clean OS snapshot and tag the resulting LVM volume to "develop" so the build artifacts can be reused by runs on other branches.

GitLab does not support libvirt officially but there is this runner that seems quite reasonable as a starting point.

Performance

OSX

Sage builds from scratch on QEMU on a dual core with 2GB RAM and a seeded ccache in 160 minutes. With local/ intact from a previous build it rebuilds in seconds.

Windows

Sage builds from scratch on QEMU on a single core with 1.5GB RAM and a seeded ccache in about 500 minutes.

real    472m37.961s
user    284m29.903s
sys     180m23.735s

With local/ intact from a previous build it rebuilds in seconds.

Legalities

OSX

Relevant seems to be 2.B of their license in particular

to install, use and run up to two (2) additional copies or instances of the Apple Software
within virtual operating system environments on each Mac Computer you own or control that is
already running the Apple Software, for purposes of: (a) software development; (b) testing during
software development; (c) using macOS Server; or (d) personal, non-commercial use.

Now, the "already running" bit is weird because that means that we cannot use Linux as the base system?

This bit is the same for all the languages that I can read except for the German one which surprisingly omits the "already running":

Zum Installieren, Nutzen und Ausführen von bis zu zwei (2) zusätzlichen Kopien oder
Exemplaren der Apple-Software innerhalb virtueller Betriebssystemumgebungen auf jedem Mac-
Computer, dessen Eigentümer du bist oder der deiner Kontrolle unterliegt, zum Zwecke der: (a)
Softwareentwicklung; (b) Durchführung von Tests während der Softwareentwicklung; (c) Nutzung
von macOS Server; oder (d) der persönlichen, nicht kommerziellen Nutzung.

So, it's Ok to run two instances of OSX virtualized on Apple Hardware. I could imagine that it would be Ok to run more than two if we used different versions of OSX and therefore got separate licenses but I am not an expert here.

Windows

Can we use the trial versions of Win10 for testing purposes? I guess not, but we should check.

Depends on #24655

CC: @embray @slel

Component: build

Keywords: osx, windows, ContinuousIntegration

Issue created by migration from https://trac.sagemath.org/ticket/25980

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions