From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6657888687695593472 X-Received: by 2002:adf:f5c8:: with SMTP id k8mr262699wrp.26.1550160508882; Thu, 14 Feb 2019 08:08:28 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:ca1a:: with SMTP id a26ls404932wmg.8.gmail; Thu, 14 Feb 2019 08:08:28 -0800 (PST) X-Google-Smtp-Source: AHgI3IbTD7bJBjgbt1jC+TkWIYXg3szOANfWvCG37BCz7QSv4/12a1Lu+SUUA83Qs3kB89Kf2ikK X-Received: by 2002:a1c:5412:: with SMTP id i18mr315533wmb.19.1550160508333; Thu, 14 Feb 2019 08:08:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550160508; cv=none; d=google.com; s=arc-20160816; b=ih8WorIoT+A7rGuKk5/corQuP7aRkC4aYsM3rqNhAwqtuIjNgOArNl9tOYoiQGQfUH 8EWgMZ66yZU3bXjU74+65sUXWwfr1cqDkdDs1w9F0BNkFNM306ETcRAlguu46LH2GvxM GaxwQ+Jb+Oj+uIK88ScbLG1CLqPpbxpuTEnR0TGUlIjei6Fg7ryQR5sdX1Uom6tZ7Haw KL+ZjkCtgbYzpMJnv2MF7L5NypNj8fPkeCmmd+GHnMoUlhkeez5VqbWAsYYyhVPB/law db6ygiiftgpDKb+U0tWq/DPUQ005zmHA5d1vaD1fnGx6I5iPFaxNKhzf0DNWrKrQAibK fdEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:to:from; bh=fRn+XmLovo6dldwuB/Msw1uX6qHXoNrXDFe4SeiRVX4=; b=gdBDhy11RfV9ykUL9Cb/JTxueb/6j+BvtTJ6jo/T2+ouCYEG4KXL+3eGAnldUVmzSX PVwpGQ21+OrVMkHffTTUajmNEpPTeoZMjYWIXWL5dIlHtJkt7ooFKK0O4FuFWPQye6uq F3e4od53arMozjI2Jk5cPd+FF3bcfpwiYYxCTKQh1jQ+aSjIxefnYVJAnAeA7OlkRHo3 3ADrHa0jLNL6fICKd8MOKy6Q/YFpC2vk+guTdZyfXJqZJRyhrbX2Kjrz9BiYna36h0I3 bYM7syVrAR/E3A2n2PDXIvYaWNcFh4KLpW4kXYyb4ksx3N5c85ehXICD4A9+EYGtVxEw 4o+g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of mosipov@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id j12si163120wmh.2.2019.02.14.08.08.28 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Feb 2019 08:08:28 -0800 (PST) Received-SPF: pass (google.com: domain of mosipov@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of mosipov@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Received: from azat.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPSA id x1EG87dn028554 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 14 Feb 2019 17:08:27 +0100 From: "Maxim Yu. Osipov" To: isar-users@googlegroups.com Subject: [PATCH 2/4] ci: Introduce --repro parameter to enable use of cached base repository Date: Thu, 14 Feb 2019 17:08:05 +0100 Message-Id: <20190214160807.31948-3-mosipov@ilbers.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190214160807.31948-1-mosipov@ilbers.de> References: <20190214160807.31948-1-mosipov@ilbers.de> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: TZPGwqkO+8JJ This patch allows to test cached base repository functionality for not only fast build case. Signed-off-by: Maxim Yu. Osipov --- scripts/ci_build.sh | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh index 846349f..acce152 100755 --- a/scripts/ci_build.sh +++ b/scripts/ci_build.sh @@ -48,8 +48,9 @@ show_help() { echo " the build will be started in current path." echo " -c, --cross enable cross-compilation." echo " -d, --debug enable debug bitbake output." - echo " -f, --fast build reduced set of configurations." + echo " -f, --fast cross build reduced set of configurations." echo " -q, --quiet suppress verbose bitbake output." + echo " -r, --repro enable use of cached base repository." echo " --help display this message and exit." echo echo "Exit status:" @@ -78,7 +79,12 @@ do BB_ARGS="$BB_ARGS -d" ;; -f|--fast) + # Start build for the reduced set of configurations + # Enforce cross-compilation to speed up the build + # Enable use of cached base repository FAST_BUILD="1" + CROSS_BUILD="1" + REPRO_BUILD="1" TARGETS_SET="\ multiconfig:qemuarm-stretch:isar-image-base \ multiconfig:qemuarm64-stretch:isar-image-base \ @@ -87,6 +93,9 @@ do -q|--quiet) BB_ARGS="" ;; + -r|--repro) + REPRO_BUILD="1" + ;; *) echo "error: invalid parameter '$key', please try '--help' to get list of supported parameters" exit $ES_BUG @@ -106,22 +115,17 @@ if [ -n "$CROSS_BUILD" ]; then sed -i -e 's/ISAR_CROSS_COMPILE ?= "0"/ISAR_CROSS_COMPILE ?= "1"/g' conf/local.conf fi -if [ -n "$FAST_BUILD" ]; then - # Start build for the reduced set of configurations - # Enforce cross-compilation to speed up the build +if [ -n "$REPRO_BUILD" ]; then # Enable use of cached base repository - sed -i -e 's/ISAR_CROSS_COMPILE ?= "0"/ISAR_CROSS_COMPILE ?= "1"/g' conf/local.conf - bitbake $BB_ARGS -c cache_base_repo $TARGETS_SET + bitbake $BB_ARGS -c cache_base_repo $TARGETS_SET while [ -e bitbake.sock ]; do sleep 1; done sudo rm -rf tmp sed -i -e 's/#ISAR_USE_CACHED_BASE_REPO ?= "1"/ISAR_USE_CACHED_BASE_REPO ?= "1"/g' conf/local.conf - bitbake $BB_ARGS $TARGETS_SET -else - # Start build for the full set of configurations - bitbake $BB_ARGS $TARGETS_SET - fi +# Start build for the defined set of configurations +bitbake $BB_ARGS $TARGETS_SET + cp -a "${ISARROOT}/meta/classes/dpkg-base.bbclass" "${ISARROOT}/meta/classes/dpkg-base.bbclass.ci-backup" echo -e "do_fetch_append() {\n\n}" >> "${ISARROOT}/meta/classes/dpkg-base.bbclass" -- 2.11.0