@samitouri / QOSamiQemu / commits / 7684e78132

gitlab: add initial MacOS 15 on gitlab runner

The gitlab runners are currently in beta but available to projects on the Premium and Ultimate plans (which QEMU is via the Open Source program). We install some compilers via brew so we can run some of the check-tcg softmmu test cases. We disable rust as the version is too old. We disable plugins because we haven't taught the test harness about .dynlib vs .so yet. There is a discrepancy between the vars and version of MacOS because lcitool needs teaching about other versions (although I don't think it matters as brew is shared across versions). Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> Message-ID: <20260526110243.470002-7-alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

Alex Bennée committed May 26, 2026 at 12:02 UTC 7684e78132905393e604014dce3185def4114108
4 files changed +75
.gitlab-ci.d/macos-14.vars new
+16
@@ -0,0 +1,16 @@
1 +# THIS FILE WAS AUTO-GENERATED
2 +#
3 +# $ lcitool variables macos-14 qemu
4 +#
5 +# https://gitlab.com/libvirt/libvirt-ci
6 +
7 +CCACHE='/opt/homebrew/bin/ccache'
8 +CPAN_PKGS=''
9 +CROSS_PKGS=''
10 +MAKE='/opt/homebrew/bin/gmake'
11 +NINJA='/opt/homebrew/bin/ninja'
12 +PACKAGING_COMMAND='brew'
13 +PIP3='/opt/homebrew/bin/pip3'
14 +PKGS='bash bc bindgen bison bzip2 capstone ccache cmocka coreutils ctags curl dbus diffutils dtc flex gcovr gettext git glib gnu-sed gnutls gtk+3 gtk-vnc jemalloc jpeg-turbo json-c libcbor libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb llvm lzo make meson mtools ncurses nettle ninja pixman pkg-config python-setuptools python3 rpm2cpio rust sdl2 sdl2_image snappy socat sparse spice-protocol swtpm tesseract usbredir vde vte3 vulkan-tools xorriso zlib zstd'
15 +PYPI_PKGS='PyYAML numpy pillow sphinx sphinx-rtd-theme tomli'
16 +PYTHON='/opt/homebrew/bin/python3'
.gitlab-ci.d/macos.yml new
+47
@@ -0,0 +1,47 @@
1 +.macos_job_template:
2 + extends: .base_job_template
3 + stage: build
4 + tags:
5 + - saas-macos-large-m2pro
6 + needs: []
7 + timeout: 80m
8 + artifacts:
9 + name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
10 + expire_in: 7 days
11 + paths:
12 + - build/meson-logs/
13 + - build/tests/tcg/
14 + reports:
15 + junit: build/meson-logs/*.junit.xml
16 + when: always
17 + before_script:
18 + - set -o allexport
19 + - source .gitlab-ci.d/macos-14.vars
20 + - set +o allexport
21 + - export PATH="$PATH_EXTRA:$PATH"
22 + - export PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
23 + - brew update
24 + - brew install $PKGS
25 + - brew install gdb aarch64-elf-gcc i686-elf-gcc x86_64-elf-gcc
26 + - if test -n "$PYPI_PKGS" ; then PYLIB=$($PYTHON -c 'import sysconfig; print(sysconfig.get_path("stdlib"))'); rm -f $PYLIB/EXTERNALLY-MANAGED; $PIP3 install --break-system-packages $PYPI_PKGS ; fi
27 + script:
28 + - mkdir build
29 + - cd build
30 + - ../configure --enable-werror $CONFIGURE_ARGS || { cat config.log meson-logs/meson-log.txt; exit 1; }
31 + - $MAKE -j$(sysctl -n hw.ncpu)
32 + - for TARGET in $TEST_TARGETS ; do $MAKE $TARGET ; done
33 +
34 +aarch64-macos-15-build:
35 + extends: .macos_job_template
36 + image: macos-15-xcode-16
37 + variables:
38 + NAME: macos-15
39 + PATH_EXTRA: /opt/homebrew/gettext/bin
40 + PKG_CONFIG_PATH: /opt/homebrew/curl/lib/pkgconfig:/opt/homebrew/ncurses/lib/pkgconfig:/opt/homebrew/readline/lib/pkgconfig
41 + CONFIGURE_ARGS:
42 + --target-list=aarch64-softmmu,i386-softmmu,x86_64-softmmu
43 + --cross-prefix-aarch64=aarch64-elf-
44 + --cross-prefix-i386=i686-elf-
45 + --cross-prefix-x86_64=x86_64-elf-
46 + --disable-plugins
47 + TEST_TARGETS: check-unit run-tcg-tests-aarch64-softmmu run-tcg-tests-i386-softmmu run-tcg-tests-x86_64-softmmu
.gitlab-ci.d/qemu-project.yml
+1
@@ -19,3 +19,4 @@ include:
19 - local: '/.gitlab-ci.d/custom-runners.yml'
20 - local: '/.gitlab-ci.d/cirrus.yml'
21 - local: '/.gitlab-ci.d/windows.yml'
22 + - local: '/.gitlab-ci.d/macos.yml'
tests/lcitool/refresh
+11
@@ -87,6 +87,12 @@ def generate_cirrus(target, trailer=None):
87 generate(filename, cmd, trailer)
88
89
90 +def generate_vars(target, trailer=None):
91 + filename = Path(src_dir, ".gitlab-ci.d", target + ".vars")
92 + cmd = lcitool_cmd + ["variables", "--format", "shell", target, "qemu"]
93 + generate(filename, cmd, trailer)
94 +
95 +
96 def generate_pkglist(vm, target, project="qemu"):
97 filename = Path(src_dir, "tests", "vm", "generated", vm + ".json")
98 cmd = lcitool_cmd + ["variables", "--format", "json", target, project]
@@ -302,6 +308,11 @@ try:
308 #
309 generate_cirrus("freebsd-14")
310
311 + #
312 + # GitLab packages lists
313 + #
314 + generate_vars("macos-14")
315 +
316 #
317 # VM packages lists
318 #