From nobody Tue Feb 10 22:58:17 2026 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1622064435; cv=none; d=zohomail.com; s=zohoarc; b=fl6Kqm/fLOCxoHG1KyMHX8NAei4UBb5Fkb7xVMWKjB4vQ1vLU9niufxB1uoAnCCrEYYptY0v0qQgNI1rYesFDMgE9EHtOtgeYTPM9zwZktwtGZw0C9LPhZC7C87qIIheuUiI8GehH0R2d83QnKUJXy6zv5C6EbmR7nTlIlbnGSI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622064435; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qtpQnhGZkfCRsXEa9SZ4yCe8E1ZJmuR7BJFCDJ8Dfpg=; b=VyFxeGw9uZjMHsPKVzqeKR7TrWrctaznwy+cxonDeqUjheMFxGI26hhV2TIlMDS0h3ev70o/2n4geCIctKxCufAdPiv1ZDJSMDR1y3h2BmCh9OdkzOumCy3wdW8uHD+mjvu0B3T/gR12ZIyPdeUui58JrgPZ6+PIKCcRs5tEaNw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622064435137511.83139344969413; Wed, 26 May 2021 14:27:15 -0700 (PDT) Received: from localhost ([::1]:56304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lm13a-0004Sk-0U for importer2@patchew.org; Wed, 26 May 2021 17:27:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lm0w1-00037j-W8 for qemu-devel@nongnu.org; Wed, 26 May 2021 17:19:26 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:34718) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lm0w0-0008VN-3t for qemu-devel@nongnu.org; Wed, 26 May 2021 17:19:25 -0400 Received: by mail-wr1-x429.google.com with SMTP id r12so2566919wrp.1 for ; Wed, 26 May 2021 14:19:21 -0700 (PDT) Received: from localhost.localdomain (235.red-83-57-168.dynamicip.rima-tde.net. [83.57.168.235]) by smtp.gmail.com with ESMTPSA id p6sm318808wma.4.2021.05.26.14.19.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 14:19:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qtpQnhGZkfCRsXEa9SZ4yCe8E1ZJmuR7BJFCDJ8Dfpg=; b=sM+KBOMo8i8AaFapkk3uPcTcEQ5+Q+y5y3FOwrF21PX5OjHN6IvUiZGIRQ0o1KqANR xQO55637lghJ+YUqsN+ToFI9O/B1wF6fqS0/ghDh1aSHLf9NF+UWfShCqgy02VRisr5m gPVHANBM3oIbObDwLexiKw+vHh4rmvVIkQfPVYxHJZhq262u8flZVIU5ZJKGB/lU+mP2 tKqOeQBJrdsAtBjXX3A8bN5gglXZUFiaq8kZdiqPiGZTT1ccWUkMX4dQLY1PRVi+WGyT oaz1P6XXYrmUE5pvMlmKnVhUYbeWywhunLLHXUD3oCpdd9oDgH1NMz65S6SNIERY3E/O q2HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=qtpQnhGZkfCRsXEa9SZ4yCe8E1ZJmuR7BJFCDJ8Dfpg=; b=AJG2voYVkU6pyIFCXVM/7u5ze7QALAqST/nHSU3dxzu2YJL//LK2VpgfjZ0XK/ZwKg 9rqaGl00RU7Xu29UwdJA1ytC9Ub3PMnHd81f1+LgYxjw65R2om4FkCD+enO3edBdBJV+ dUPcwnwuQ+su/vhARioUpiB5Tro03Tl5Z8q2Yv7ZwaRBIr21UPjBnPAl+65p8DyHZXm3 1sPBBY6vYsGdxc/mQvuQDiCJ+A/XZbhV+do2M/5arFkXF0tWNbPbI6ymF1fKY6Sas1cu b73Q5JtzBa2MVhCYkKoE6E9lZMEBzBUqmB3eU2rmcCcCzwZk1vgjWK7ZUYn/wNkBFsGq 29ig== X-Gm-Message-State: AOAM530b12+vPgIIj/XOQzKaO++bLqrESGnQZH3PDRuYl1w5T/XLhkaI jghKbhOpAqSlhKVPQZhrJOypYt+t2AyNvA== X-Google-Smtp-Source: ABdhPJwZ6SeNMe0on1Dv0GfJWh7hmfnXkI77XXiytIFPeUkPLaB71x9cDNbDnWgFZ9HxRxGBDLMzXA== X-Received: by 2002:a5d:4246:: with SMTP id s6mr3842wrr.9.1622063960017; Wed, 26 May 2021 14:19:20 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 08/19] gitlab: Extract default build/test jobs templates Date: Wed, 26 May 2021 23:18:27 +0200 Message-Id: <20210526211838.421716-9-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210526211838.421716-1-f4bug@amsat.org> References: <20210526211838.421716-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Willian Rampazzo , Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) To be able to reuse the mainstream build/test jobs templates, extract them into a new file (buildtest-template.yml). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Willian Rampazzo Message-Id: <20210519185504.2198573-8-f4bug@amsat.org> [thuth: Keep the "acceptance_test_job_template" name for now] Signed-off-by: Thomas Huth --- .gitlab-ci.d/buildtest-template.yml | 69 ++++++++++++++++++++++++++++ .gitlab-ci.yml | 71 +---------------------------- 2 files changed, 70 insertions(+), 70 deletions(-) create mode 100644 .gitlab-ci.d/buildtest-template.yml diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-t= emplate.yml new file mode 100644 index 00000000000..167ee88c410 --- /dev/null +++ b/.gitlab-ci.d/buildtest-template.yml @@ -0,0 +1,69 @@ +.native_build_job_template: + stage: build + image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest + before_script: + - JOBS=3D$(expr $(nproc) + 1) + script: + - if test -n "$LD_JOBS"; + then + scripts/git-submodule.sh update meson ; + fi + - mkdir build + - cd build + - if test -n "$TARGETS"; + then + ../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=3Di= nternal} $CONFIGURE_ARGS --target-list=3D"$TARGETS" ; + else + ../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=3Di= nternal} $CONFIGURE_ARGS ; + fi || { cat config.log meson-logs/meson-log.txt && exit 1; } + - if test -n "$LD_JOBS"; + then + ../meson/meson.py configure . -Dbackend_max_links=3D"$LD_JOBS" ; + fi || exit 1; + - make -j"$JOBS" + - if test -n "$MAKE_CHECK_ARGS"; + then + make -j"$JOBS" $MAKE_CHECK_ARGS ; + fi + +.native_test_job_template: + stage: test + image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest + script: + - scripts/git-submodule.sh update + $(sed -n '/GIT_SUBMODULES=3D/ s/.*=3D// p' build/config-host.mak) + - cd build + - find . -type f -exec touch {} + + # Avoid recompiling by hiding ninja with NINJA=3D":" + - make NINJA=3D":" $MAKE_CHECK_ARGS + +.acceptance_test_job_template: + extends: .native_test_job_template + cache: + key: "${CI_JOB_NAME}-cache" + paths: + - ${CI_PROJECT_DIR}/avocado-cache + policy: pull-push + artifacts: + name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" + when: always + expire_in: 2 days + paths: + - build/tests/results/latest/results.xml + - build/tests/results/latest/test-results + reports: + junit: build/tests/results/latest/results.xml + before_script: + - mkdir -p ~/.config/avocado + - echo "[datadir.paths]" > ~/.config/avocado/avocado.conf + - echo "cache_dirs =3D ['${CI_PROJECT_DIR}/avocado-cache']" + >> ~/.config/avocado/avocado.conf + - echo -e '[job.output.testlogs]\nstatuses =3D ["FAIL", "INTERRUPT"]' + >> ~/.config/avocado/avocado.conf + - if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then + du -chs ${CI_PROJECT_DIR}/avocado-cache ; + fi + - export AVOCADO_ALLOW_UNTRUSTED_CODE=3D1 + after_script: + - cd build + - du -chs ${CI_PROJECT_DIR}/avocado-cache diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f170065ac63..ccd11e1625a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,78 +4,9 @@ include: - local: '/.gitlab-ci.d/opensbi.yml' - local: '/.gitlab-ci.d/containers.yml' - local: '/.gitlab-ci.d/crossbuilds.yml' + - local: '/.gitlab-ci.d/buildtest-template.yml' - local: '/.gitlab-ci.d/static_checks.yml' =20 -.native_build_job_template: - stage: build - image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest - before_script: - - JOBS=3D$(expr $(nproc) + 1) - script: - - if test -n "$LD_JOBS"; - then - scripts/git-submodule.sh update meson ; - fi - - mkdir build - - cd build - - if test -n "$TARGETS"; - then - ../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=3Di= nternal} $CONFIGURE_ARGS --target-list=3D"$TARGETS" ; - else - ../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=3Di= nternal} $CONFIGURE_ARGS ; - fi || { cat config.log meson-logs/meson-log.txt && exit 1; } - - if test -n "$LD_JOBS"; - then - ../meson/meson.py configure . -Dbackend_max_links=3D"$LD_JOBS" ; - fi || exit 1; - - make -j"$JOBS" - - if test -n "$MAKE_CHECK_ARGS"; - then - make -j"$JOBS" $MAKE_CHECK_ARGS ; - fi - -.native_test_job_template: - stage: test - image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest - script: - - scripts/git-submodule.sh update - $(sed -n '/GIT_SUBMODULES=3D/ s/.*=3D// p' build/config-host.mak) - - cd build - - find . -type f -exec touch {} + - # Avoid recompiling by hiding ninja with NINJA=3D":" - - make NINJA=3D":" $MAKE_CHECK_ARGS - -.acceptance_test_job_template: - extends: .native_test_job_template - cache: - key: "${CI_JOB_NAME}-cache" - paths: - - ${CI_PROJECT_DIR}/avocado-cache - policy: pull-push - artifacts: - name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" - when: always - expire_in: 2 days - paths: - - build/tests/results/latest/results.xml - - build/tests/results/latest/test-results - reports: - junit: build/tests/results/latest/results.xml - before_script: - - mkdir -p ~/.config/avocado - - echo "[datadir.paths]" > ~/.config/avocado/avocado.conf - - echo "cache_dirs =3D ['${CI_PROJECT_DIR}/avocado-cache']" - >> ~/.config/avocado/avocado.conf - - echo -e '[job.output.testlogs]\nstatuses =3D ["FAIL", "INTERRUPT"]' - >> ~/.config/avocado/avocado.conf - - if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then - du -chs ${CI_PROJECT_DIR}/avocado-cache ; - fi - - export AVOCADO_ALLOW_UNTRUSTED_CODE=3D1 - after_script: - - cd build - - du -chs ${CI_PROJECT_DIR}/avocado-cache - build-system-alpine: extends: .native_build_job_template needs: --=20 2.26.3