ci: build out-of-tree
PATCH 1/1 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.
--- .cirrus.yml | 8 ++++++-- .gitlab-ci.yml | 28 +++++++++++++++++++++------- .shippable.yml | 4 +++- .travis.yml | 7 +++++-- configure | 1 + 5 files changed, 36 insertions(+), 12 deletions(-)
.cirrus.yml +6 -2
@@ -22,7 +22,9 @@ macos_task: install_script: - brew install pkg-config python gnu-sed glib pixman make sdl2 script: - - ./configure --python=/usr/local/bin/python3 || { cat config.log; exit 1; } + - mkdir build + - cd build + - ../configure --python=/usr/local/bin/python3 || { cat config.log; exit 1; } - gmake -j$(sysctl -n hw.ncpu) - gmake check -j$(sysctl -n hw.ncpu)
@@ -33,6 +35,8 @@ macos_xcode_task: install_script: - brew install pkg-config gnu-sed glib pixman make sdl2 script: - - ./configure --cc=clang || { cat config.log; exit 1; } + - mkdir build + - cd build + - ../configure --cc=clang || { cat config.log; exit 1; } - gmake -j$(sysctl -n hw.ncpu) - gmake check -j$(sysctl -n hw.ncpu)
.gitlab-ci.yml +21 -7
@@ -6,7 +6,9 @@ build-system1: script: - apt-get install -y -qq libgtk-3-dev libvte-dev nettle-dev libcacard-dev libusb-dev libvde-dev libspice-protocol-dev libgl1-mesa-dev libvdeplug-dev - - ./configure --enable-werror --target-list="aarch64-softmmu alpha-softmmu + - mkdir build + - cd build + - ../configure --enable-werror --target-list="aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu lm32-softmmu moxie-softmmu microblazeel-softmmu mips64el-softmmu m68k-softmmu ppc-softmmu riscv64-softmmu sparc-softmmu" - make -j2
@@ -16,7 +18,9 @@ build-system2: script: - apt-get install -y -qq libsdl2-dev libgcrypt-dev libbrlapi-dev libaio-dev libfdt-dev liblzo2-dev librdmacm-dev libibverbs-dev libibumad-dev - - ./configure --enable-werror --target-list="tricore-softmmu unicore32-softmmu + - mkdir build + - cd build + - ../configure --enable-werror --target-list="tricore-softmmu unicore32-softmmu microblaze-softmmu mips-softmmu riscv32-softmmu s390x-softmmu sh4-softmmu sparc64-softmmu x86_64-softmmu xtensa-softmmu nios2-softmmu or1k-softmmu" - make -j2
@@ -24,7 +28,9 @@ build-system2: build-disabled: script: - - ./configure --enable-werror --disable-rdma --disable-slirp --disable-curl + - mkdir build + - cd build + - ../configure --enable-werror --disable-rdma --disable-slirp --disable-curl --disable-capstone --disable-live-block-migration --disable-glusterfs --disable-replication --disable-coroutine-pool --disable-smartcard --disable-guest-agent --disable-curses --disable-libxml2 --disable-tpm
@@ -37,7 +43,9 @@ build-disabled: build-tcg-disabled: script: - apt-get install -y -qq clang libgtk-3-dev libbluetooth-dev libusb-dev - - ./configure --cc=clang --enable-werror --disable-tcg --audio-drv-list="" + - mkdir build + - cd build + - ../configure --cc=clang --enable-werror --disable-tcg --audio-drv-list="" - make -j2 - make check-unit - make check-qapi-schema
@@ -52,7 +60,9 @@ build-tcg-disabled: build-user: script: - - ./configure --enable-werror --disable-system --disable-guest-agent + - mkdir build + - cd build + - ../configure --enable-werror --disable-system --disable-guest-agent --disable-capstone --disable-slirp --disable-fdt - make -j2 - make run-tcg-tests-i386-linux-user run-tcg-tests-x86_64-linux-user
@@ -61,7 +71,9 @@ build-clang: script: - apt-get install -y -qq clang libsdl2-dev libattr1-dev libcap-dev xfslibs-dev libiscsi-dev libnfs-dev libseccomp-dev gnutls-dev librbd-dev - - ./configure --cc=clang --cxx=clang++ --enable-werror + - mkdir build + - cd build + - ../configure --cc=clang --cxx=clang++ --enable-werror --target-list="alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu ppc-softmmu s390x-softmmu x86_64-softmmu arm-linux-user" - make -j2
@@ -70,7 +82,9 @@ build-clang: build-tci: script: - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64" - - ./configure --enable-tcg-interpreter + - mkdir build + - cd build + - ../configure --enable-tcg-interpreter --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" - make -j2 - make tests/boot-serial-test tests/cdrom-test tests/pxe-test
.shippable.yml +3 -1
@@ -35,5 +35,7 @@ build: options: "-e HOME=/root" ci: - unset CC - - ./configure ${QEMU_CONFIGURE_OPTS} --target-list=${TARGET_LIST} + - mkdir build + - cd build + - ../configure ${QEMU_CONFIGURE_OPTS} --target-list=${TARGET_LIST} - make -j$(($(getconf _NPROCESSORS_ONLN) + 1))
.travis.yml +5 -2
@@ -74,8 +74,8 @@ notifications: env: global: - - SRC_DIR="." - - BUILD_DIR="." + - SRC_DIR=".." + - BUILD_DIR="build" - BASE_CONFIG="--disable-docs --disable-tools" - TEST_CMD="make check V=1" # This is broadly a list of "mainline" softmmu targets which have support across the major distros
@@ -192,7 +192,9 @@ matrix: - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-sanitize" compiler: clang before_script: + - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} - ./configure ${CONFIG} --extra-cflags="-fsanitize=undefined -Werror" || { cat config.log && exit 1; } + - ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-fsanitize=undefined -Werror" --extra-ldflags="-fsanitize=undefined" || { cat config.log && exit 1; } - env:
@@ -323,6 +325,7 @@ matrix: - CONFIG="--cc=gcc-9 --cxx=g++-9 --disable-pie --disable-linux-user" - TEST_CMD="" before_script: + - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} - ./configure ${CONFIG} --extra-cflags="-g3 -O0 -Wno-error=stringop-truncation -fsanitize=thread -fuse-ld=gold" || { cat config.log && exit 1; }
configure +1 -0
@@ -6441,6 +6441,7 @@ else echo "local state directory queried at runtime" echo "Windows SDK $win_sdk" fi +echo "Build directory $(pwd)" echo "Source path $source_path" echo "GIT binary $git" echo "GIT submodules $git_submodules"
Signature · 1 line
1.8.3.1
Quoted 8 lines · Paolo Bonzini
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]>---
[...]
Quoted 16 lines
.travis.yml +2
-2@@ -74,8 +74,8 @@ notifications: env: global: - - SRC_DIR="." - - BUILD_DIR="." + - SRC_DIR=".." + - BUILD_DIR="build" - BASE_CONFIG="--disable-docs --disable-tools" - TEST_CMD="make check V=1" # This is broadly a list of "mainline" softmmu targets which have support across the major distros
.travis.yml matrix: · line 196
Quoted 5 lines
.travis.yml +1
-0@@ -192,7 +192,9 @@ matrix: - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-sanitize" compiler: clang before_script: + - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} - ./configure ${CONFIG} --extra-cflags="-fsanitize=undefined -Werror" || { cat config.log && exit 1; }
Don't you want to remove the old line?
.travis.yml matrix: · line 329
Quoted 10 lines
.travis.yml +2
-0+ - ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-fsanitize=undefined -Werror" --extra-ldflags="-fsanitize=undefined" || { cat config.log && exit 1; } - env:@@ -323,6 +325,7 @@ matrix: - CONFIG="--cc=gcc-9 --cxx=g++-9 --disable-pie --disable-linux-user" - TEST_CMD="" before_script: + - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} - ./configure ${CONFIG} --extra-cflags="-g3 -O0 -Wno-error=stringop-truncation -fsanitize=thread -fuse-ld=gold" || { cat config.log && exit 1; }
That should also use "../configure" (or $SRC_DIR/configure), shouldn't it?
Thomas
Quoted 47 lines · Thomas Huth
Quoted 8 lines · Paolo Bonzini
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]>---
[...]
Quoted 16 lines
.travis.yml +2
-2@@ -74,8 +74,8 @@ notifications: env: global: - - SRC_DIR="." - - BUILD_DIR="." + - SRC_DIR=".." + - BUILD_DIR="build" - BASE_CONFIG="--disable-docs --disable-tools" - TEST_CMD="make check V=1" # This is broadly a list of "mainline" softmmu targets which have support across the major distros.travis.yml matrix: · line 196
Quoted 5 lines
.travis.yml +1
-0@@ -192,7 +192,9 @@ matrix: - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-sanitize" compiler: clang before_script: + - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} - ./configure ${CONFIG} --extra-cflags="-fsanitize=undefined -Werror" || { cat config.log && exit 1; }Don't you want to remove the old line?
.travis.yml matrix: · line 329
Quoted 10 lines
.travis.yml +2
-0+ - ${SRC_DIR}/configure ${CONFIG} --extra-cflags="-fsanitize=undefined -Werror" --extra-ldflags="-fsanitize=undefined" || { cat config.log && exit 1; } - env:@@ -323,6 +325,7 @@ matrix: - CONFIG="--cc=gcc-9 --cxx=g++-9 --disable-pie --disable-linux-user" - TEST_CMD="" before_script: + - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} - ./configure ${CONFIG} --extra-cflags="-g3 -O0 -Wno-error=stringop-truncation -fsanitize=thread -fuse-ld=gold" || { cat config.log && exit 1; }That should also use "../configure" (or $SRC_DIR/configure), shouldn't it?
Quoted 2 lines
Thomas
Yes, I've sent v2. This was supposed to be --dry-run, sorry for the noise.
Paolo
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Subject: [PATCH] ci: build out-of-tree
Type: series
Message-id: [email protected]
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
error: unable to write file block/qcow2.c
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed. You can inspect what was checked out with 'git status' and retry the checkout with 'git checkout -f HEAD'
Traceback (most recent call last):
File "patchew-tester2/src/patchew-cli", line 531, in test_one
git_clone_repo(clone, r["repo"], r["head"], logf, True)
File "patchew-tester2/src/patchew-cli", line 62, in git_clone_repo
subprocess.check_call(clone_cmd, stderr=logf, stdout=logf)
File "/opt/rh/rh-python36/root/usr/lib64/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'clone', '-q', '/home/patchew2/.cache/patchew-git-cache/httpsgithubcompatchewprojectqemu-3c8cf5a9c21ff8782164d1def7f44bd888713384', '/var/tmp/patchew-tester-tmp-vkcoxs9n/src']' returned non-zero exit status 128.
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]