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). Signed-off-by: Alex Bennée <[email protected]> --- v2 - call tcg run directly to work around makefile issues - drop debug lines --- tests/lcitool/refresh | 11 ++++++++ .gitlab-ci.d/macos-14.vars | 16 ++++++++++++ .gitlab-ci.d/macos.yml | 47 +++++++++++++++++++++++++++++++++++ .gitlab-ci.d/qemu-project.yml | 1 + 4 files changed, 75 insertions(+) create mode 100644 .gitlab-ci.d/macos-14.vars create mode 100644 .gitlab-ci.d/macos.yml diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh index fa4a16e3583..4289cc381a6 100755 --- a/tests/lcitool/refresh +++ b/tests/lcitool/refresh @@ -87,6 +87,12 @@ def generate_cirrus(target, trailer=None): generate(filename, cmd, trailer) +def generate_vars(target, trailer=None): + filename = Path(src_dir, ".gitlab-ci.d", target + ".vars") + cmd = lcitool_cmd + ["variables", "--format", "shell", target, "qemu"] + generate(filename, cmd, trailer) + + def generate_pkglist(vm, target, project="qemu"): filename = Path(src_dir, "tests", "vm", "generated", vm + ".json") cmd = lcitool_cmd + ["variables", "--format", "json", target, project] @@ -312,6 +318,11 @@ try: # generate_cirrus("freebsd-14") + # + # GitLab packages lists + # + generate_vars("macos-14") + # # VM packages lists # diff --git a/.gitlab-ci.d/macos-14.vars b/.gitlab-ci.d/macos-14.vars new file mode 100644 index 00000000000..def77cfdea5 --- /dev/null +++ b/.gitlab-ci.d/macos-14.vars @@ -0,0 +1,16 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool variables macos-14 qemu +# +# https://gitlab.com/libvirt/libvirt-ci + +CCACHE='/opt/homebrew/bin/ccache' +CPAN_PKGS='' +CROSS_PKGS='' +MAKE='/opt/homebrew/bin/gmake' +NINJA='/opt/homebrew/bin/ninja' +PACKAGING_COMMAND='brew' +PIP3='/opt/homebrew/bin/pip3' +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' +PYPI_PKGS='PyYAML numpy pillow sphinx sphinx-rtd-theme tomli' +PYTHON='/opt/homebrew/bin/python3' diff --git a/.gitlab-ci.d/macos.yml b/.gitlab-ci.d/macos.yml new file mode 100644 index 00000000000..c93bf12a294 --- /dev/null +++ b/.gitlab-ci.d/macos.yml @@ -0,0 +1,47 @@ +.macos_job_template: + extends: .base_job_template + stage: build + tags: + - saas-macos-large-m2pro + needs: [] + timeout: 80m + artifacts: + name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" + expire_in: 7 days + paths: + - build/meson-logs/ + - build/tests/tcg/ + reports: + junit: build/meson-logs/*.junit.xml + when: always + before_script: + - set -o allexport + - source .gitlab-ci.d/macos-14.vars + - set +o allexport + - export PATH="$PATH_EXTRA:$PATH" + - export PKG_CONFIG_PATH="$PKG_CONFIG_PATH" + - brew update + - brew install $PKGS + - brew install gdb aarch64-elf-gcc i686-elf-gcc x86_64-elf-gcc + - 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 + script: + - mkdir build + - cd build + - ../configure --enable-werror $CONFIGURE_ARGS || { cat config.log meson-logs/meson-log.txt; exit 1; } + - $MAKE -j$(sysctl -n hw.ncpu) + - for TARGET in $TEST_TARGETS ; do $MAKE $TARGET ; done + +aarch64-macos-15-build: + extends: .macos_job_template + image: macos-15-xcode-16 + variables: + NAME: macos-15 + PATH_EXTRA: /opt/homebrew/gettext/bin + PKG_CONFIG_PATH: /opt/homebrew/curl/lib/pkgconfig:/opt/homebrew/ncurses/lib/pkgconfig:/opt/homebrew/readline/lib/pkgconfig + CONFIGURE_ARGS: + --target-list=aarch64-softmmu,i386-softmmu,x86_64-softmmu + --cross-prefix-aarch64=aarch64-elf- + --cross-prefix-i386=i686-elf- + --cross-prefix-x86_64=x86_64-elf- + --disable-plugins + TEST_TARGETS: check-unit run-tcg-tests-aarch64-softmmu run-tcg-tests-i386-softmmu run-tcg-tests-x86_64-softmmu diff --git a/.gitlab-ci.d/qemu-project.yml b/.gitlab-ci.d/qemu-project.yml index 4d914c4897b..9cbb5fe787f 100644 --- a/.gitlab-ci.d/qemu-project.yml +++ b/.gitlab-ci.d/qemu-project.yml @@ -19,3 +19,4 @@ include: - local: '/.gitlab-ci.d/custom-runners.yml' - local: '/.gitlab-ci.d/cirrus.yml' - local: '/.gitlab-ci.d/windows.yml' + - local: '/.gitlab-ci.d/macos.yml' -- 2.47.3
