From nobody Tue Feb 10 08:03:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.41 as permitted sender) client-ip=209.85.221.41; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f41.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.41 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1622063961; cv=none; d=zohomail.com; s=zohoarc; b=SuZ51d30JMMKya69ilrLDVMZZbkrTWsn55r8ltJu4ChyXtTD6cUaSiJlKaZXGbiHufNqLry4ZXp9973kKhpar2CDsrXfO7sdiWtJOqOfxGB1NDF0Fn6tT0fosroGaxSiUrTTUZvNpVb2Q96P3UHDtfDUVcE6mBLzST+p6kchmOw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622063961; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qtpQnhGZkfCRsXEa9SZ4yCe8E1ZJmuR7BJFCDJ8Dfpg=; b=DcXsmaoSOA5O/fr91/BIl7ZtDXafOIeU6XLW9gQRljfhYn6WlRN90zHePnCDgTszvhneVwGOfX4aQnig41kai9uBb1aRpsDgDjM/OYFsNYLkPavqcP/SqZjQnhSC1ZOToRs9KUZkBLPEPRkPRo0yG3PB8Ti31M2zkFDpVtcOSKE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.41 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mx.zohomail.com with SMTPS id 1622063961757865.5620034290694; Wed, 26 May 2021 14:19:21 -0700 (PDT) Received: by mail-wr1-f41.google.com with SMTP id g17so2315158wrs.13 for ; Wed, 26 May 2021 14:19:21 -0700 (PDT) Return-Path: Return-Path: 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=SzjBSshYIjMU2oqAQ91vqMKQN4vHOiXEq/P4FvSxyFpRrOHH4BaHbVbWZquXZUyTaj Dv77LnGr//Vt2PCg/6O/aLrRGigmVlPv52yaV0gLQkMEOzRQOnkU/8evFnx+Snhdjuzt f9/j9lHeGXFBWseXVVxbwqinU2/DJ+sIS870o5INGWrU9wSXORHshxZPUTLJUb20hp1Z RH1B4fO66MK9inB+vX7zpupCMh3ufQWs0OzJ6Fgn1yHkdvxjH0D+zRCpKS7pOIrU6OQi uiC/g5yS27lfNrjNERzwxewGtRdwJI6t5Urm+5noteozewwDKlbNxkXVyCKvCl9sUDqD 8mIg== X-Gm-Message-State: AOAM5323eUvkt4MUYsTkcTp7a7SOlSyUFpxHm2hvbHpGYdTws3k8kplw snGRgzFTqZUUmtVI1yii9kQ= 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) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Willian Rampazzo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Wainer dos Santos Moschetta 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 X-ZohoMail-DKIM: pass (identity @gmail.com) 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