quick-lint / quick-lint-js

quick-lint-js finds bugs in JavaScript programs
https://quick-lint-js.com
GNU General Public License v3.0
1.54k stars 192 forks source link

CI: use GitLab instead of GitHub Actions #778

Open strager opened 2 years ago

strager commented 2 years ago

Let's try GitLab's CI solution.

Benefits over GitHub Actions:

Downsides of GitLab CI:

vegerot commented 2 years ago

https://about.gitlab.com/solutions/github/

strager commented 2 years ago

I did some research into this.

I set up a GitLab CE instance on a Debian 11 VM, then set up a docker runner on an Ubuntu 22.04 VM. It seems to work okay.

Plan for runners/executors:

strager commented 2 years ago

I got Docker-Windows working on my Windows machine. However, process isolation doesn't work. (Hyper-V isolation does work.) Implementing a firewall seems easier with process isolation, and I suspect performance is better too. Will do more research.

strager commented 2 years ago

MSVC Debug build times (cmake --build build --config Debug):

Host Hypervisor License cost MSVC Debug build time
GitHub CI 0$ 6m 59s
Windows (stradler) VMware 0$ or 199$** 2m 57s
Windows (stradler) VirtualBox 0$
Windows (stradler) Hyper-V 0$
Windows (stradler) Docker (Hyper-V) 0$ 3m 1s
macOS (straddler) Parallels 0$* 4m 40s
macOS (straddler) VMware 0$* 5m 17s ~ 5m 45s
macOS (straddler) VirtualBox 0$
Linux (straglum) VMware 0$ or 199$**
Linux (straglum) VirtualBox 0$
Linux (straglum) qemu-kvm 0$

* Would be shared with macOS guests, so effectively free. 99$/yr (Parallels) or 199$ (VMware) if not shared. ** VMware Workstation Player is 0$ but has no snapshot support.

strager commented 2 years ago

Note: After installing VS, run c:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe executequeueditems. This saved 10 seconds for build times in Parallels.

strager commented 2 years ago

I got a GitLab Runner working with a Parallels VM. Some notes:

strager commented 2 years ago

straddler perf notes: Parallels template VM takes about 20+4 seconds to boot. Snapshot VM takes about 9+3 seconds to boot. Git clone (LAN over WiFi) takes about 14 seconds.

strager commented 2 years ago

For GitHub integration: parts of the feature are available in CE, but some are not. The advertised GitHub integration is not free. However, @vegerot suggests that the relevant code might be open source but merely disabled by default.