Skip to content

Commit bc4486f

Browse files
bonzinistsquad
authored andcommitted
ci: build out-of-tree
Most developers are using out-of-tree builds and it was discussed in the past to only allow those. To prepare for the transition, use out-of-tree builds in all continuous integration jobs. Based on a patch by Marc-André Lureau. Signed-off-by: Paolo Bonzini <[email protected]> Signed-off-by: Alex Bennée <[email protected]> Reviewed-by: Thomas Huth <[email protected]> Reviewed-by: Li-Wen Hsu <[email protected]> Message-Id: <[email protected]>
1 parent 9c5941a commit bc4486f

File tree

5 files changed

+39
-15
lines changed

5 files changed

+39
-15
lines changed

.cirrus.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ macos_task:
2222
install_script:
2323
- brew install pkg-config python gnu-sed glib pixman make sdl2
2424
script:
25-
- ./configure --python=/usr/local/bin/python3 || { cat config.log; exit 1; }
25+
- mkdir build
26+
- cd build
27+
- ../configure --python=/usr/local/bin/python3 || { cat config.log; exit 1; }
2628
- gmake -j$(sysctl -n hw.ncpu)
2729
- gmake check -j$(sysctl -n hw.ncpu)
2830

@@ -33,6 +35,8 @@ macos_xcode_task:
3335
install_script:
3436
- brew install pkg-config gnu-sed glib pixman make sdl2
3537
script:
36-
- ./configure --cc=clang || { cat config.log; exit 1; }
38+
- mkdir build
39+
- cd build
40+
- ../configure --cc=clang || { cat config.log; exit 1; }
3741
- gmake -j$(sysctl -n hw.ncpu)
3842
- gmake check -j$(sysctl -n hw.ncpu)

.gitlab-ci.yml

+21-7
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ build-system1:
66
script:
77
- apt-get install -y -qq libgtk-3-dev libvte-dev nettle-dev libcacard-dev
88
libusb-dev libvde-dev libspice-protocol-dev libgl1-mesa-dev libvdeplug-dev
9-
- ./configure --enable-werror --target-list="aarch64-softmmu alpha-softmmu
9+
- mkdir build
10+
- cd build
11+
- ../configure --enable-werror --target-list="aarch64-softmmu alpha-softmmu
1012
cris-softmmu hppa-softmmu lm32-softmmu moxie-softmmu microblazeel-softmmu
1113
mips64el-softmmu m68k-softmmu ppc-softmmu riscv64-softmmu sparc-softmmu"
1214
- make -j2
@@ -16,15 +18,19 @@ build-system2:
1618
script:
1719
- apt-get install -y -qq libsdl2-dev libgcrypt-dev libbrlapi-dev libaio-dev
1820
libfdt-dev liblzo2-dev librdmacm-dev libibverbs-dev libibumad-dev
19-
- ./configure --enable-werror --target-list="tricore-softmmu unicore32-softmmu
21+
- mkdir build
22+
- cd build
23+
- ../configure --enable-werror --target-list="tricore-softmmu unicore32-softmmu
2024
microblaze-softmmu mips-softmmu riscv32-softmmu s390x-softmmu sh4-softmmu
2125
sparc64-softmmu x86_64-softmmu xtensa-softmmu nios2-softmmu or1k-softmmu"
2226
- make -j2
2327
- make -j2 check
2428

2529
build-disabled:
2630
script:
27-
- ./configure --enable-werror --disable-rdma --disable-slirp --disable-curl
31+
- mkdir build
32+
- cd build
33+
- ../configure --enable-werror --disable-rdma --disable-slirp --disable-curl
2834
--disable-capstone --disable-live-block-migration --disable-glusterfs
2935
--disable-replication --disable-coroutine-pool --disable-smartcard
3036
--disable-guest-agent --disable-curses --disable-libxml2 --disable-tpm
@@ -37,7 +43,9 @@ build-disabled:
3743
build-tcg-disabled:
3844
script:
3945
- apt-get install -y -qq clang libgtk-3-dev libusb-dev
40-
- ./configure --cc=clang --enable-werror --disable-tcg --audio-drv-list=""
46+
- mkdir build
47+
- cd build
48+
- ../configure --cc=clang --enable-werror --disable-tcg --audio-drv-list=""
4149
- make -j2
4250
- make check-unit
4351
- make check-qapi-schema
@@ -52,7 +60,9 @@ build-tcg-disabled:
5260

5361
build-user:
5462
script:
55-
- ./configure --enable-werror --disable-system --disable-guest-agent
63+
- mkdir build
64+
- cd build
65+
- ../configure --enable-werror --disable-system --disable-guest-agent
5666
--disable-capstone --disable-slirp --disable-fdt
5767
- make -j2
5868
- make run-tcg-tests-i386-linux-user run-tcg-tests-x86_64-linux-user
@@ -61,7 +71,9 @@ build-clang:
6171
script:
6272
- apt-get install -y -qq clang libsdl2-dev libattr1-dev libcap-ng-dev
6373
xfslibs-dev libiscsi-dev libnfs-dev libseccomp-dev gnutls-dev librbd-dev
64-
- ./configure --cc=clang --cxx=clang++ --enable-werror
74+
- mkdir build
75+
- cd build
76+
- ../configure --cc=clang --cxx=clang++ --enable-werror
6577
--target-list="alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
6678
ppc-softmmu s390x-softmmu x86_64-softmmu arm-linux-user"
6779
- make -j2
@@ -70,7 +82,9 @@ build-clang:
7082
build-tci:
7183
script:
7284
- TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64"
73-
- ./configure --enable-tcg-interpreter
85+
- mkdir build
86+
- cd build
87+
- ../configure --enable-tcg-interpreter
7488
--target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)"
7589
- make -j2
7690
- make tests/boot-serial-test tests/cdrom-test tests/pxe-test

.shippable.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,7 @@ build:
3535
options: "-e HOME=/root"
3636
ci:
3737
- unset CC
38-
- ./configure ${QEMU_CONFIGURE_OPTS} --target-list=${TARGET_LIST}
38+
- mkdir build
39+
- cd build
40+
- ../configure ${QEMU_CONFIGURE_OPTS} --target-list=${TARGET_LIST}
3941
- make -j$(($(getconf _NPROCESSORS_ONLN) + 1))

.travis.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ notifications:
7373

7474
env:
7575
global:
76-
- SRC_DIR="."
77-
- BUILD_DIR="."
76+
- SRC_DIR=".."
77+
- BUILD_DIR="build"
7878
- BASE_CONFIG="--disable-docs --disable-tools"
7979
- TEST_CMD="make check V=1"
8080
# This is broadly a list of "mainline" softmmu targets which have support across the major distros
@@ -191,7 +191,8 @@ matrix:
191191
- CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-sanitize"
192192
compiler: clang
193193
before_script:
194-
- ./configure ${CONFIG} --extra-cflags="-fsanitize=undefined -Werror" || { cat config.log && exit 1; }
194+
- mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
195+
- ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-fsanitize=undefined -Werror" || { cat config.log && exit 1; }
195196

196197

197198
- env:
@@ -323,7 +324,8 @@ matrix:
323324
- CONFIG="--cc=gcc-9 --cxx=g++-9 --disable-pie --disable-linux-user"
324325
- TEST_CMD=""
325326
before_script:
326-
- ./configure ${CONFIG} --extra-cflags="-g3 -O0 -Wno-error=stringop-truncation -fsanitize=thread -fuse-ld=gold" || { cat config.log && exit 1; }
327+
- mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
328+
- ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-g3 -O0 -Wno-error=stringop-truncation -fsanitize=thread -fuse-ld=gold" || { cat config.log && exit 1; }
327329

328330

329331
# Run check-tcg against linux-user
@@ -460,5 +462,6 @@ matrix:
460462
- make -C ${SRC_DIR} qemu-${QEMU_VERSION}.tar.bz2
461463
- ls -l ${SRC_DIR}/qemu-${QEMU_VERSION}.tar.bz2
462464
- tar -xf ${SRC_DIR}/qemu-${QEMU_VERSION}.tar.bz2 && cd qemu-${QEMU_VERSION}
463-
- ./configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && exit 1; }
465+
- mkdir -p release-build && cd release-build
466+
- ../configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && exit 1; }
464467
- make install

configure

+1
Original file line numberDiff line numberDiff line change
@@ -6401,6 +6401,7 @@ else
64016401
echo "local state directory queried at runtime"
64026402
echo "Windows SDK $win_sdk"
64036403
fi
6404+
echo "Build directory $(pwd)"
64046405
echo "Source path $source_path"
64056406
echo "GIT binary $git"
64066407
echo "GIT submodules $git_submodules"

0 commit comments

Comments
 (0)