blob: 53051ec793c6064361d33e42ebcc73483a240d99 [file] [log] [blame]
Philippe Mathieu-Daudéecac85f2021-05-19 20:54:58 +02001.cross_system_build_job:
Daniel P. Berrangée312d1f2022-05-27 16:36:01 +01002 extends: .base_job_template
Philippe Mathieu-Daudéecac85f2021-05-19 20:54:58 +02003 stage: build
Daniel P. Berrangéd4c7a562023-06-08 17:40:14 +01004 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
Daniel P. Berrangé2f7350c2023-08-29 17:15:17 +01005 cache:
6 paths:
7 - ccache
8 key: "$CI_JOB_NAME"
9 when: always
Philippe Mathieu-Daudéecac85f2021-05-19 20:54:58 +020010 timeout: 80m
Daniel P. Berrangéb86a4692024-07-29 15:44:02 +010011 before_script:
12 - cat /packages.txt
Philippe Mathieu-Daudéecac85f2021-05-19 20:54:58 +020013 script:
Daniel P. Berrangé2f7350c2023-08-29 17:15:17 +010014 - export CCACHE_BASEDIR="$(pwd)"
15 - export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
16 - export CCACHE_MAXSIZE="500M"
17 - export PATH="$CCACHE_WRAPPERSDIR:$PATH"
Philippe Mathieu-Daudéecac85f2021-05-19 20:54:58 +020018 - mkdir build
19 - cd build
Daniel P. Berrangé2f7350c2023-08-29 17:15:17 +010020 - ccache --zero-stats
Thomas Hutheda23212023-02-07 21:14:47 +010021 - ../configure --enable-werror --disable-docs --enable-fdt=system
22 --disable-user $QEMU_CONFIGURE_OPTS $EXTRA_CONFIGURE_OPTS
23 --target-list-exclude="arm-softmmu cris-softmmu
Philippe Mathieu-Daudéecac85f2021-05-19 20:54:58 +020024 i386-softmmu microblaze-softmmu mips-softmmu mipsel-softmmu
Daniel P. Berrangéa6235492021-08-10 15:06:52 +010025 mips64-softmmu ppc-softmmu riscv32-softmmu sh4-softmmu
Daniel P. Berrangéa1f0f362021-08-10 15:06:53 +010026 sparc-softmmu xtensa-softmmu $CROSS_SKIP_TARGETS"
Philippe Mathieu-Daudéecac85f2021-05-19 20:54:58 +020027 - make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS
Gerd Hoffmann8619b5d2021-06-23 11:11:35 +020028 - if grep -q "EXESUF=.exe" config-host.mak;
29 then make installer;
Stefan Hajnoczi6340af72022-02-04 20:43:22 +000030 version="$(git describe --match v[0-9]* 2>/dev/null || git rev-parse --short HEAD)";
Gerd Hoffmann8619b5d2021-06-23 11:11:35 +020031 mv -v qemu-setup*.exe qemu-setup-${version}.exe;
32 fi
Daniel P. Berrangé2f7350c2023-08-29 17:15:17 +010033 - ccache --show-stats
Philippe Mathieu-Daudéecac85f2021-05-19 20:54:58 +020034
35# Job to cross-build specific accelerators.
36#
37# Set the $ACCEL variable to select the specific accelerator (default to
38# KVM), and set extra options (such disabling other accelerators) via the
39# $EXTRA_CONFIGURE_OPTS variable.
40.cross_accel_build_job:
Daniel P. Berrangée312d1f2022-05-27 16:36:01 +010041 extends: .base_job_template
Philippe Mathieu-Daudéecac85f2021-05-19 20:54:58 +020042 stage: build
Daniel P. Berrangéd4c7a562023-06-08 17:40:14 +010043 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
Philippe Mathieu-Daudéecac85f2021-05-19 20:54:58 +020044 timeout: 30m
Daniel P. Berrangé2f7350c2023-08-29 17:15:17 +010045 cache:
46 paths:
47 - ccache/
48 key: "$CI_JOB_NAME"
Philippe Mathieu-Daudéecac85f2021-05-19 20:54:58 +020049 script:
Daniel P. Berrangé2f7350c2023-08-29 17:15:17 +010050 - export CCACHE_BASEDIR="$(pwd)"
51 - export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
52 - export CCACHE_MAXSIZE="500M"
53 - export PATH="$CCACHE_WRAPPERSDIR:$PATH"
Philippe Mathieu-Daudéecac85f2021-05-19 20:54:58 +020054 - mkdir build
55 - cd build
Daniel P. Berrangé190973d2022-11-03 13:30:43 -040056 - ../configure --enable-werror --disable-docs $QEMU_CONFIGURE_OPTS
Philippe Mathieu-Daudéecac85f2021-05-19 20:54:58 +020057 --disable-tools --enable-${ACCEL:-kvm} $EXTRA_CONFIGURE_OPTS
58 - make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS
59
60.cross_user_build_job:
Daniel P. Berrangée312d1f2022-05-27 16:36:01 +010061 extends: .base_job_template
Philippe Mathieu-Daudéecac85f2021-05-19 20:54:58 +020062 stage: build
Daniel P. Berrangéd4c7a562023-06-08 17:40:14 +010063 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
Daniel P. Berrangé2f7350c2023-08-29 17:15:17 +010064 cache:
65 paths:
66 - ccache/
67 key: "$CI_JOB_NAME"
Philippe Mathieu-Daudéecac85f2021-05-19 20:54:58 +020068 script:
Daniel P. Berrangé2f7350c2023-08-29 17:15:17 +010069 - export CCACHE_BASEDIR="$(pwd)"
70 - export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
71 - export CCACHE_MAXSIZE="500M"
Philippe Mathieu-Daudéecac85f2021-05-19 20:54:58 +020072 - mkdir build
73 - cd build
Daniel P. Berrangé190973d2022-11-03 13:30:43 -040074 - ../configure --enable-werror --disable-docs $QEMU_CONFIGURE_OPTS
Alex Bennée9864b7f2022-09-14 16:59:21 +010075 --disable-system --target-list-exclude="aarch64_be-linux-user
76 alpha-linux-user cris-linux-user m68k-linux-user microblazeel-linux-user
Philippe Mathieu-Daudé6c301482024-03-27 12:10:58 +010077 or1k-linux-user ppc-linux-user sparc-linux-user
Alex Bennée9864b7f2022-09-14 16:59:21 +010078 xtensa-linux-user $CROSS_SKIP_TARGETS"
Philippe Mathieu-Daudéecac85f2021-05-19 20:54:58 +020079 - make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS
Alex Bennée1ea5e0b2023-02-28 19:06:41 +000080
81# We can still run some tests on some of our cross build jobs. They can add this
82# template to their extends to save the build logs and test results
83.cross_test_artifacts:
84 artifacts:
85 name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
Daniel P. Berrangécef63302023-06-30 19:03:46 +010086 when: always
Alex Bennée1ea5e0b2023-02-28 19:06:41 +000087 expire_in: 7 days
88 paths:
89 - build/meson-logs/testlog.txt
90 reports:
91 junit: build/meson-logs/testlog.junit.xml