From patchwork Thu Apr 2 13:04:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= X-Patchwork-Id: 11470687 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DC411159A for ; Thu, 2 Apr 2020 13:04:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BBC66206F5 for ; Thu, 2 Apr 2020 13:04:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bJ9ome+F" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388167AbgDBNEf (ORCPT ); Thu, 2 Apr 2020 09:04:35 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:34725 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729033AbgDBNEf (ORCPT ); Thu, 2 Apr 2020 09:04:35 -0400 Received: by mail-pf1-f194.google.com with SMTP id 23so1737399pfj.1 for ; Thu, 02 Apr 2020 06:04:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=F/05iEFWX5JXC5UQTYfzsFMJZ0Wb9bXyAbm9U1echHc=; b=bJ9ome+F32mgtHffonhc7VuFDb5MZ22n/lMbKqc/ykc5uxNNTM2vDz3/sLdi6YI7FQ 15a02xVaF0yxuQO0zLdusaWcECapDiM5hrvzT+D8ZpVwnR68NNWJF5PfpmwQbwP/Q+Ie /X3XgDaaSj4vKbA/9J7+CcbXs35ByKyqm+l2motVBuPZ/v4IciqPhi7jUQktoM66kPOH 6h0lu9KF9OxTuSMKomdo3381QxD9OZK1x2eoK0VAtnIK9YuYK/Uo6FAPA9WkcJGfjTJO 4bdIIuU0ZLkcn3DdSxJTBXNZRRXEJ5MAfC/HBfAThJE6N1lMFhV651yY1sG/OcmhI0WL jTyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=F/05iEFWX5JXC5UQTYfzsFMJZ0Wb9bXyAbm9U1echHc=; b=AxzzkrJRTFN7cc8wONToxhQ0jvL1LhP0uDFbCTKxyPdip8Bg7vynV+wHPosBa0oGQC UT6KAXcPyJWJ3YfICHQa0rKgq8rDOoXcy6mKczDhyIdLm2YGbMzwoSXRmoei7CXc6Kif F1QdLI/V0J51eiUA0Gokw5Z44Vw56Nki7Idihfe45SzqDY/0QD9ZRCN8pgbbJXM/i0R3 ysVWdgyp5jmLb5UoLoGeYWDcPdIfnKjX8CyYWZukpI6YQwZQ6SFnra/y0+laBcvI2Zz+ /AlyuiN+a0Hkx8UIMJtyZId+fW+np7LNpgVwn7hExhegYgeWOt+oJcpDcmrQV3eIzBT7 Xqiw== X-Gm-Message-State: AGi0Pual/cFCv5xb9PmTz3+Q0gEHCytwPzHwLn5JP/h0LAsLXOMO/XES za/CC+Lu0DkfocM8JLYR/A+9oATZ X-Google-Smtp-Source: APiQypKOf0KI7tjO0A2c/yPIzhYjrwGBACyiPy+XhqxZLk0KGer0z/dsnjBCauvSI/15+c4YqOhbJg== X-Received: by 2002:a62:fc07:: with SMTP id e7mr3115804pfh.299.1585832674074; Thu, 02 Apr 2020 06:04:34 -0700 (PDT) Received: from localhost.localdomain ([2402:800:6375:207b:be21:746a:7a56:9d4d]) by smtp.gmail.com with ESMTPSA id o15sm3371124pgj.60.2020.04.02.06.04.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Apr 2020 06:04:33 -0700 (PDT) From: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= To: git@vger.kernel.org Cc: =?utf-8?q?SZEDER_G=C3=A1bor?= , =?utf-8?b?xJBvw6Bu?= =?utf-8?b?IFRy4bqnbiBDw7RuZyBEYW5o?= Subject: [PATCH v3 1/6] ci: make MAKEFLAGS available inside the Docker container in the Linux32 job Date: Thu, 2 Apr 2020 20:04:00 +0700 Message-Id: <2fdce60075935f8ff94bc117747f1768f41ed435.1585832270.git.congdanhqx@gmail.com> X-Mailer: git-send-email 2.26.0.334.g6536db25bb In-Reply-To: References: MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: SZEDER Gábor Once upon a time we ran 'make --jobs=2 ...' to build Git, its documentation, or to apply Coccinelle semantic patches. Then commit eaa62291ff (ci: inherit --jobs via MAKEFLAGS in run-build-and-tests, 2019-01-27) came along, and started using the MAKEFLAGS environment variable to centralize setting the number of parallel jobs in 'ci/libs.sh'. Alas, it forgot to update 'ci/run-linux32-docker.sh' to make MAKEFLAGS available inside the Docker container running the 32 bit Linux job, and, consequently, since then that job builds Git sequentially, and it ignores any Makefile knobs that we might set in MAKEFLAGS (though we don't set any for the 32 bit Linux job at the moment). So update the 'docker run' invocation in 'ci/run-linux32-docker.sh' to make MAKEFLAGS available inside the Docker container as well. Set CC=gcc for the 32 bit Linux job, because that's the compiler installed in the 32 bit Linux Docker image that we use (Travis CI nowadays sets CC=clang by default, but clang is not installed in this image). Signed-off-by: SZEDER Gábor Signed-off-by: Đoàn Trần Công Danh --- ci/lib.sh | 3 +++ ci/run-linux32-docker.sh | 1 + 2 files changed, 4 insertions(+) diff --git a/ci/lib.sh b/ci/lib.sh index c3a8cd2104..d637825222 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -198,6 +198,9 @@ osx-clang|osx-gcc) GIT_TEST_GETTEXT_POISON) export GIT_TEST_GETTEXT_POISON=true ;; +Linux32) + CC=gcc + ;; esac MAKEFLAGS="$MAKEFLAGS CC=${CC:-cc}" diff --git a/ci/run-linux32-docker.sh b/ci/run-linux32-docker.sh index 751acfcf8a..ebb18fa747 100755 --- a/ci/run-linux32-docker.sh +++ b/ci/run-linux32-docker.sh @@ -20,6 +20,7 @@ docker run \ --env GIT_PROVE_OPTS \ --env GIT_TEST_OPTS \ --env GIT_TEST_CLONE_2GB \ + --env MAKEFLAGS \ --env cache_dir="$container_cache_dir" \ --volume "${PWD}:/usr/src/git" \ --volume "$cache_dir:$container_cache_dir" \ From patchwork Thu Apr 2 13:04:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= X-Patchwork-Id: 11470689 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 32F231392 for ; Thu, 2 Apr 2020 13:04:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 11DD020784 for ; Thu, 2 Apr 2020 13:04:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mTZOKLky" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388192AbgDBNEk (ORCPT ); Thu, 2 Apr 2020 09:04:40 -0400 Received: from mail-pj1-f67.google.com ([209.85.216.67]:40062 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729033AbgDBNEj (ORCPT ); Thu, 2 Apr 2020 09:04:39 -0400 Received: by mail-pj1-f67.google.com with SMTP id kx8so1475444pjb.5 for ; Thu, 02 Apr 2020 06:04:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aUzV235WMnzvbTMVOAZmCWuc5LuKwPpcztnjQibor+Y=; b=mTZOKLkyIvRFie70lKuWn8GK/dJoCcFhQ+A+yPJ6s0VxM5P5LSipuQlSev3BOX1trD uTszSnCfGYwtAqMlR4U9NWMfQ3KJuoM1Sw2MNmMrJQz3qnYUMvOfmisXXH7Wum5vSieu LavMJvam/weifuhhk+5p9sftiGMNmWJ6JkLi1NZ1zR1+fecicz3QjGXJYMU5u/jr/p0I lKjh5jSCtwHrnZHxQrK/9I9x//H003nnx2fZtuTpVrXrHzbllaeqbtIYq8FcnFuaQCyd F80N46g068iOAl6G44/aujp1vtmRML8eUFGgqzrSDNvRRYcexWkWGVVW7nkgBw3V3Xd3 BqPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aUzV235WMnzvbTMVOAZmCWuc5LuKwPpcztnjQibor+Y=; b=Sl/4d3Z6xuRtGg6Lqi3RLDgCp0vcvc3YgQvTZ3VEqaMvHM/UYKQG3pboJTf+5U57T6 4kDNxQnenpKC4K3njpckYi8GjfRXdKG5CGZ1LOPf1iHW87bwAWDqp3gRZAP4q+zkwuJD qzaaaG/Hl4prVoDZsFiIWnpmXAqSDjaYLlgodWP6VK2jXZHzTYAVWDQ3aw4MXYpaeids xQXqwQfjQvEmBALwMTWAh6oziSuRPkmhjssBbMWsR6S9XHUeiE9S4palIrytcz3u3sP+ nhYNRlH3PpYnhVzXxDnuPM53uaxmthpNo+ePdhrRAO6PWv/pt1BWF9g2nKUQO9lGuDbM l9Cw== X-Gm-Message-State: AGi0Puau5vVfc/A/qLNc/N77ka5Prp5fGZJDNbhx/0mVKrMf/a7XCsqM LQRSWT3J3M2+mPqWC5ytfZlPeBu5 X-Google-Smtp-Source: APiQypJGTR6kOEB0llEeypcLWzLRQk6zdYa/b/3hA9XiJmmywMsQQ7Ci2KBaur2jAfCRxOU5VI5K0Q== X-Received: by 2002:a17:90a:fa08:: with SMTP id cm8mr3715045pjb.144.1585832678154; Thu, 02 Apr 2020 06:04:38 -0700 (PDT) Received: from localhost.localdomain ([2402:800:6375:207b:be21:746a:7a56:9d4d]) by smtp.gmail.com with ESMTPSA id o15sm3371124pgj.60.2020.04.02.06.04.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Apr 2020 06:04:37 -0700 (PDT) From: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= To: git@vger.kernel.org Cc: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= Subject: [PATCH v3 2/6] ci/lib-docker: preserve required environment variables Date: Thu, 2 Apr 2020 20:04:01 +0700 Message-Id: X-Mailer: git-send-email 2.26.0.334.g6536db25bb In-Reply-To: References: MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org We're using "su -m" to preserve environment variables in the shell run by "su". But, that options will be ignored while "-l" (aka "--login") is specified. Since we don't have interest in all environment variables, pass only those necessary variables to the inner script. Signed-off-by: Đoàn Trần Công Danh --- ci/run-linux32-build.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ci/run-linux32-build.sh b/ci/run-linux32-build.sh index e3a193adbc..7f985615c2 100755 --- a/ci/run-linux32-build.sh +++ b/ci/run-linux32-build.sh @@ -51,10 +51,17 @@ else fi # Build and test -linux32 --32bit i386 su -m -l $CI_USER -c ' +linux32 --32bit i386 su -m -l $CI_USER -c " set -ex + export DEVELOPER='$DEVELOPER' + export DEFAULT_TEST_TARGET='$DEFAULT_TEST_TARGET' + export GIT_PROVE_OPTS='$GIT_PROVE_OPTS' + export GIT_TEST_OPTS='$GIT_TEST_OPTS' + export GIT_TEST_CLONE_2GB='$GIT_TEST_CLONE_2GB' + export MAKEFLAGS='$MAKEFLAGS' + export cache_dir='$cache_dir' cd /usr/src/git - test -n "$cache_dir" && ln -s "$cache_dir/.prove" t/.prove + test -n '$cache_dir' && ln -s '$cache_dir/.prove' t/.prove make make test -' +" From patchwork Thu Apr 2 13:04:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= X-Patchwork-Id: 11470691 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E303D1392 for ; Thu, 2 Apr 2020 13:04:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C0742206F5 for ; Thu, 2 Apr 2020 13:04:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="U7yOJvaA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388253AbgDBNEp (ORCPT ); Thu, 2 Apr 2020 09:04:45 -0400 Received: from mail-pl1-f169.google.com ([209.85.214.169]:38381 "EHLO mail-pl1-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388171AbgDBNEm (ORCPT ); Thu, 2 Apr 2020 09:04:42 -0400 Received: by mail-pl1-f169.google.com with SMTP id w3so1312648plz.5 for ; Thu, 02 Apr 2020 06:04:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RjJlf+NbEOVWOA3c1dQ7gl1DX4DXq6IImAbBtdg7bHM=; b=U7yOJvaAttToLh6NBLq8zTCS/zD+CMvy5Mny/j786qZL6wDnSKgCqzhXanQeLQJEqy /KtCzguCkUlwKzx3U1kvto3d7GKABiWVr5rpFxxAHFscqeI93M8kYhL1fcNb6/xb3pOA KoW8AM50joOpVtrXE+hfsk+2lDbz9ay/Klyy5ofAhlHNrolp3T5Mpc0QdXYFaS7qTzfb v/CAELq0X+9IbVzLeLsLeb/rCFKvXwC7xtWeAj220h9o9hwVD3II8ia0dZDobQJhmYUQ 7YZXVuApE2n256hvMt6MzBGHncKRixGPBlqRvmYoCdRiMD8QrdAxSKiLf+Wp5t/2Jod8 60lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RjJlf+NbEOVWOA3c1dQ7gl1DX4DXq6IImAbBtdg7bHM=; b=s/6TtsiV2NMo4WHASwV1uS47mp/m7VX9Rreu3Ls8f3aNdgzADH//F81qT4b/ILNdSY es2DO/eAdwPg5CJh1AtXjhVszJT/HnZnk/b5Z0VN/seLlIPx+TnrKdgpLEP5QK2LzV0z x1UKlVfE24UyDdHry1JJ1UsBDUFKBAdvhUUFieF9itVB1z3rUenkYy2/YZi9izXJTwUe YN12oRCn6jzPlgjy+bElWHmHtEkgPV/izySNYDponpksd4aZqzLounwpAvKpGVbaOu7R 47ifIgAbGxz1DEo8ZtJJ/+kwadkHUwXsfNlQDbEvFHabf8MjouT4elPYdwa2v43IPH4o T+8w== X-Gm-Message-State: AGi0PuakRFatApzrCoW/W/QHO+O3EWSwkDmLhs7OPSAhmS++n+19DTja W47rxZH8c0M487btkFeid+N0twE/ X-Google-Smtp-Source: APiQypL0NX0MinsKIc+jrKJ0JbW2jTW3/Xph0Vf2y5fLTwnsEbkWORhXUfvWPCiv54Ykd2Cx5BS6Pw== X-Received: by 2002:a17:902:bf42:: with SMTP id u2mr2636637pls.99.1585832680521; Thu, 02 Apr 2020 06:04:40 -0700 (PDT) Received: from localhost.localdomain ([2402:800:6375:207b:be21:746a:7a56:9d4d]) by smtp.gmail.com with ESMTPSA id o15sm3371124pgj.60.2020.04.02.06.04.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Apr 2020 06:04:40 -0700 (PDT) From: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= To: git@vger.kernel.org Cc: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= Subject: [PATCH v3 3/6] ci/linux32: parameterise command to switch arch Date: Thu, 2 Apr 2020 20:04:02 +0700 Message-Id: <8c8cf3eb24d3099fcf95807a10c5e1b9b0256a98.1585832270.git.congdanhqx@gmail.com> X-Mailer: git-send-email 2.26.0.334.g6536db25bb In-Reply-To: References: MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org In a later patch, the remaining of this command will be re-used for the CI job for linux with musl libc. Allow customisation of the emulator, now. Signed-off-by: Đoàn Trần Công Danh --- ci/run-linux32-build.sh | 13 +++++++++++-- ci/run-linux32-docker.sh | 2 ++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ci/run-linux32-build.sh b/ci/run-linux32-build.sh index 7f985615c2..44bb332f64 100755 --- a/ci/run-linux32-build.sh +++ b/ci/run-linux32-build.sh @@ -14,8 +14,17 @@ then exit 1 fi +case "$jobname" in +Linux32) + switch_cmd="linux32 --32bit i386" + ;; +*) + exit 1 + ;; +esac + # Update packages to the latest available versions -linux32 --32bit i386 sh -c ' +command $switch_cmd sh -c ' apt update >/dev/null && apt install -y build-essential libcurl4-openssl-dev libssl-dev \ libexpat-dev gettext python >/dev/null @@ -51,7 +60,7 @@ else fi # Build and test -linux32 --32bit i386 su -m -l $CI_USER -c " +command $switch_cmd su -m -l $CI_USER -c " set -ex export DEVELOPER='$DEVELOPER' export DEFAULT_TEST_TARGET='$DEFAULT_TEST_TARGET' diff --git a/ci/run-linux32-docker.sh b/ci/run-linux32-docker.sh index ebb18fa747..54186b6aa7 100755 --- a/ci/run-linux32-docker.sh +++ b/ci/run-linux32-docker.sh @@ -9,6 +9,7 @@ docker pull daald/ubuntu32:xenial # Use the following command to debug the docker build locally: # $ docker run -itv "${PWD}:/usr/src/git" --entrypoint /bin/bash daald/ubuntu32:xenial +# root@container:/# export jobname= # root@container:/# /usr/src/git/ci/run-linux32-build.sh container_cache_dir=/tmp/travis-cache @@ -21,6 +22,7 @@ docker run \ --env GIT_TEST_OPTS \ --env GIT_TEST_CLONE_2GB \ --env MAKEFLAGS \ + --env jobname \ --env cache_dir="$container_cache_dir" \ --volume "${PWD}:/usr/src/git" \ --volume "$cache_dir:$container_cache_dir" \ From patchwork Thu Apr 2 13:04:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= X-Patchwork-Id: 11470693 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B4528159A for ; Thu, 2 Apr 2020 13:04:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 87DDF20757 for ; Thu, 2 Apr 2020 13:04:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EUxSjGul" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388274AbgDBNEp (ORCPT ); Thu, 2 Apr 2020 09:04:45 -0400 Received: from mail-pj1-f52.google.com ([209.85.216.52]:39839 "EHLO mail-pj1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388174AbgDBNEo (ORCPT ); Thu, 2 Apr 2020 09:04:44 -0400 Received: by mail-pj1-f52.google.com with SMTP id z3so1477602pjr.4 for ; Thu, 02 Apr 2020 06:04:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oZsbfhHg1d/pKYF4FSc/InjvjWMthEBndeltLqsIzSE=; b=EUxSjGulJmWeAUo7HqOiJeioDGobUJlJ8ZssBxQppJeGP3b1dz4pCTZDReze29Ef+c TElFrqRi/5o0g6x8LOTgz0CYmKv1oczlbzBy+KAesU5cUcuwXkjKzvnQbYnUv4+Q2ZlT u+GoD+mk/C4yiV6nSw02Aohi0MAXIcpI58mRj3G0dpMRZSJF0S200WFkkJPV7OXn4cKH tjY44xev/pMkviUP+e3njNu1mLKV/5gK0jozbhBDNj3c6tzH2q+p3tZoWsZQxuPJgjIk 4NwI7uqQLB+DyRGlRAwKIr0DUPPWeBscqh7UTO/Jmoi2vXxGBqMcdxtwKjVYDN2fw5Jp iZFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oZsbfhHg1d/pKYF4FSc/InjvjWMthEBndeltLqsIzSE=; b=AQwtxrjrWFGbE30OhcIjy9QwyBezXVyVc0dYFGLmnuuQV5hyfj6aBfkDU+u9BowO1U 5ad7HqBZU1vFheck0w/btHbyKuY7gl6PQ4uzNvMvBq85eI/F5kPlRUt6VSGtlNvCasmk wgGNGrqamcIIG97Alor1l/OOCDz//utkhurWBPToKyrFscl1sCP8R+KAYlrKUHSJEOzd vEbzlYI7di2hwgowS/urH3DKvimmRDhGfCcB3akwbkPneEeOeFmJXM7VY7GtvzxBGMyd Uy0w9itE34L+koFbgyD/t8gvWCc/BWEN9V+rHAjRs4KJNDevwJhx026Wx7OYtWQ0oX8o 0JTA== X-Gm-Message-State: AGi0PuZjJgtWvaWvmb49Xcp8ojWBuzUyBUpQD2UCgD/S4m1dlN8gZlC8 wb2t9uJz+oiCbINC8SxPpB/47FJ6 X-Google-Smtp-Source: APiQypIjZS3S3Oz8ANKSShhhH4Idg5P/9s2ranLZiAqEv9+3mRwxkw98NsYpEJjkIUVxqKHEXUbM5g== X-Received: by 2002:a17:902:164:: with SMTP id 91mr2791473plb.207.1585832682862; Thu, 02 Apr 2020 06:04:42 -0700 (PDT) Received: from localhost.localdomain ([2402:800:6375:207b:be21:746a:7a56:9d4d]) by smtp.gmail.com with ESMTPSA id o15sm3371124pgj.60.2020.04.02.06.04.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Apr 2020 06:04:42 -0700 (PDT) From: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= To: git@vger.kernel.org Cc: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= Subject: [PATCH v3 4/6] ci: refactor docker runner script Date: Thu, 2 Apr 2020 20:04:03 +0700 Message-Id: <22cc7960c3a3a74ad3cd8e7e9ea36d3952249702.1585832270.git.congdanhqx@gmail.com> X-Mailer: git-send-email 2.26.0.334.g6536db25bb In-Reply-To: References: MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org We will support alpine check in docker later in this series. While we're at it, tell people to run as root in podman, if podman is used as drop-in replacement for docker, because podman will map host-user to container's root, therefore, mapping their permission. Signed-off-by: Đoàn Trần Công Danh --- .travis.yml | 2 +- azure-pipelines.yml | 4 ++-- ...n-linux32-build.sh => run-docker-build.sh} | 6 ++--- ci/{run-linux32-docker.sh => run-docker.sh} | 22 ++++++++++++++----- 4 files changed, 22 insertions(+), 12 deletions(-) rename ci/{run-linux32-build.sh => run-docker-build.sh} (93%) rename ci/{run-linux32-docker.sh => run-docker.sh} (53%) diff --git a/.travis.yml b/.travis.yml index fc5730b085..069aeeff3c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ matrix: services: - docker before_install: - script: ci/run-linux32-docker.sh + script: ci/run-docker.sh - env: jobname=StaticAnalysis os: linux compiler: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 675c3a43c9..11413f66f8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -489,14 +489,14 @@ jobs: test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1 res=0 - sudo AGENT_OS="$AGENT_OS" BUILD_BUILDNUMBER="$BUILD_BUILDNUMBER" BUILD_REPOSITORY_URI="$BUILD_REPOSITORY_URI" BUILD_SOURCEBRANCH="$BUILD_SOURCEBRANCH" BUILD_SOURCEVERSION="$BUILD_SOURCEVERSION" SYSTEM_PHASENAME="$SYSTEM_PHASENAME" SYSTEM_TASKDEFINITIONSURI="$SYSTEM_TASKDEFINITIONSURI" SYSTEM_TEAMPROJECT="$SYSTEM_TEAMPROJECT" CC=$CC MAKEFLAGS="$MAKEFLAGS" bash -lxc ci/run-linux32-docker.sh || res=1 + sudo AGENT_OS="$AGENT_OS" BUILD_BUILDNUMBER="$BUILD_BUILDNUMBER" BUILD_REPOSITORY_URI="$BUILD_REPOSITORY_URI" BUILD_SOURCEBRANCH="$BUILD_SOURCEBRANCH" BUILD_SOURCEVERSION="$BUILD_SOURCEVERSION" SYSTEM_PHASENAME="$SYSTEM_PHASENAME" SYSTEM_TASKDEFINITIONSURI="$SYSTEM_TASKDEFINITIONSURI" SYSTEM_TEAMPROJECT="$SYSTEM_TEAMPROJECT" CC=$CC MAKEFLAGS="$MAKEFLAGS" jobname=Linux32 bash -lxc ci/run-docker.sh || res=1 sudo chmod a+r t/out/TEST-*.xml test ! -d t/failed-test-artifacts || sudo chmod a+r t/failed-test-artifacts test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || res=1 exit $res - displayName: 'ci/run-linux32-docker.sh' + displayName: 'jobname=Linux32 ci/run-docker.sh' env: GITFILESHAREPWD: $(gitfileshare.pwd) - task: PublishTestResults@2 diff --git a/ci/run-linux32-build.sh b/ci/run-docker-build.sh similarity index 93% rename from ci/run-linux32-build.sh rename to ci/run-docker-build.sh index 44bb332f64..a05b48c559 100755 --- a/ci/run-linux32-build.sh +++ b/ci/run-docker-build.sh @@ -1,16 +1,16 @@ #!/bin/sh # -# Build and test Git in a 32-bit environment +# Build and test Git inside container # # Usage: -# run-linux32-build.sh +# run-docker-build.sh # set -ex if test $# -ne 1 || test -z "$1" then - echo >&2 "usage: run-linux32-build.sh " + echo >&2 "usage: run-docker-build.sh " exit 1 fi diff --git a/ci/run-linux32-docker.sh b/ci/run-docker.sh similarity index 53% rename from ci/run-linux32-docker.sh rename to ci/run-docker.sh index 54186b6aa7..3881f99b53 100755 --- a/ci/run-linux32-docker.sh +++ b/ci/run-docker.sh @@ -1,16 +1,26 @@ #!/bin/sh # -# Download and run Docker image to build and test 32-bit Git +# Download and run Docker image to build and test Git # . ${0%/*}/lib.sh -docker pull daald/ubuntu32:xenial +case "$jobname" in +Linux32) + CI_CONTAINER="daald/ubuntu32:xenial" + ;; +*) + exit 1 + ;; +esac + +docker pull "$CI_CONTAINER" # Use the following command to debug the docker build locally: -# $ docker run -itv "${PWD}:/usr/src/git" --entrypoint /bin/bash daald/ubuntu32:xenial +# must be 0 if podman is used as drop-in replacement for docker +# $ docker run -itv "${PWD}:/usr/src/git" --entrypoint /bin/sh "$CI_CONTAINER" # root@container:/# export jobname= -# root@container:/# /usr/src/git/ci/run-linux32-build.sh +# root@container:/# /usr/src/git/ci/run-docker-build.sh container_cache_dir=/tmp/travis-cache @@ -26,8 +36,8 @@ docker run \ --env cache_dir="$container_cache_dir" \ --volume "${PWD}:/usr/src/git" \ --volume "$cache_dir:$container_cache_dir" \ - daald/ubuntu32:xenial \ - /usr/src/git/ci/run-linux32-build.sh $(id -u $USER) + "$CI_CONTAINER" \ + /usr/src/git/ci/run-docker-build.sh $(id -u $USER) check_unignored_build_artifacts From patchwork Thu Apr 2 13:04:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= X-Patchwork-Id: 11470695 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F0AC9159A for ; Thu, 2 Apr 2020 13:04:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CF96120757 for ; Thu, 2 Apr 2020 13:04:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Z3nmze7C" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388275AbgDBNEr (ORCPT ); Thu, 2 Apr 2020 09:04:47 -0400 Received: from mail-pj1-f46.google.com ([209.85.216.46]:55805 "EHLO mail-pj1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388174AbgDBNEq (ORCPT ); Thu, 2 Apr 2020 09:04:46 -0400 Received: by mail-pj1-f46.google.com with SMTP id fh8so1501354pjb.5 for ; Thu, 02 Apr 2020 06:04:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kUOnnFKNplO1jmxotbadtBf5lW2t/73rymw6qrkdEtY=; b=Z3nmze7C/ndxMqUdKB/CGulzGTlroZYR0M2Yo4SZMsh30WbsRB6mkPq25ffGH49MhH lsOXH/1RcnG0AL5uK1lBP6DRtvKIBvJaDmEV2xs549bBdYX72ShGDxF+uNJ3Zu7SeYUj 6GjyTNDSotd1+6394QoUBD0V5LnvVQ0FWBrY9g/kyThW9c/TR0WKNCfDH1iPsdxA645y 0Fs20Sb5yTl1WdV5xZt3Kc2qNDK3vq5oFQK8VwKd+V3RlTwD5Ts0FVXmZF4J7B3tsKsk IjvDpsifj9YRWHCWwizumBGNLWJBmezqG1xFmtE3IuFeN4qZF/1BU6LdlLIWQRZxluxV ZlIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kUOnnFKNplO1jmxotbadtBf5lW2t/73rymw6qrkdEtY=; b=YydAx4fgP1hcfovXvvt7iPImez2nAQ+gjrgDQ9DK8ineEx7wRLiu2VfstvWYG7MIpx 57LP1lqCfb7H7MPh7XFZjylzywJigRiS4X1MJyV79etRJ3Pfu6djw6iUmLVe8dKh909x 4si6DwPNcN44nF+mg0YY5WQwiNZ+ZhJiE9raiEtyJ8kDqIPk3bb8i6sKgR+JheR7qhyY BJz+M5h2QHbnQEHjTBY/RqHsccNhnkkYGySPKdPTkVA9FJNGgnttQOXnisgi0eR1nPdc GMhxse+gJGxHJlEqvL/NQAz5j5yYLvZsi5y7YBVa/NHvGLLHjYjyCzIapIuFSVSuM3Al YYqA== X-Gm-Message-State: AGi0PuZ0mwOBMmAoS4VsxwX7QFy527FcFGsff9xR7TnuYiG9KKUVUo7w OmESFHOJUmfP6CaJN2Knws2j9bMm X-Google-Smtp-Source: APiQypLo+r7L+4IRWkV/jdkUE4p0KPEzD5nr1tJmzM3OVDcoV1yXUCjBNkSg+8ZX8NTJ2c+hCG3+ZA== X-Received: by 2002:a17:902:9003:: with SMTP id a3mr2776391plp.331.1585832685081; Thu, 02 Apr 2020 06:04:45 -0700 (PDT) Received: from localhost.localdomain ([2402:800:6375:207b:be21:746a:7a56:9d4d]) by smtp.gmail.com with ESMTPSA id o15sm3371124pgj.60.2020.04.02.06.04.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Apr 2020 06:04:44 -0700 (PDT) From: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= To: git@vger.kernel.org Cc: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= Subject: [PATCH v3 5/6] ci/linux32: libify install-dependencies step Date: Thu, 2 Apr 2020 20:04:04 +0700 Message-Id: <2e0d54f81e4b997fd469cb6c0d04820140079a7c.1585832270.git.congdanhqx@gmail.com> X-Mailer: git-send-email 2.26.0.334.g6536db25bb In-Reply-To: References: MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org In a later patch, we will add new Travis Job for linux-musl. Most of other code in this file could be reuse for that job. Move the code to install dependencies to a common script. Should we add new CI system that can run directly in container, we can reuse this script for installation step. Signed-off-by: Đoàn Trần Công Danh --- ci/install-docker-dependencies.sh | 14 ++++++++++++++ ci/run-docker-build.sh | 7 +------ 2 files changed, 15 insertions(+), 6 deletions(-) create mode 100755 ci/install-docker-dependencies.sh diff --git a/ci/install-docker-dependencies.sh b/ci/install-docker-dependencies.sh new file mode 100755 index 0000000000..a104c61d29 --- /dev/null +++ b/ci/install-docker-dependencies.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Install dependencies required to build and test Git inside container +# + +case "$jobname" in +Linux32) + linux32 --32bit i386 sh -c ' + apt update >/dev/null && + apt install -y build-essential libcurl4-openssl-dev \ + libssl-dev libexpat-dev gettext python >/dev/null + ' + ;; +esac diff --git a/ci/run-docker-build.sh b/ci/run-docker-build.sh index a05b48c559..4a153492ba 100755 --- a/ci/run-docker-build.sh +++ b/ci/run-docker-build.sh @@ -23,12 +23,7 @@ Linux32) ;; esac -# Update packages to the latest available versions -command $switch_cmd sh -c ' - apt update >/dev/null && - apt install -y build-essential libcurl4-openssl-dev libssl-dev \ - libexpat-dev gettext python >/dev/null -' +"${0%/*}/install-docker-dependencies.sh" # If this script runs inside a docker container, then all commands are # usually executed as root. Consequently, the host user might not be From patchwork Thu Apr 2 13:04:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= X-Patchwork-Id: 11470697 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2E3A61392 for ; Thu, 2 Apr 2020 13:04:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0C962206F5 for ; Thu, 2 Apr 2020 13:04:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Y3I4w028" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388280AbgDBNEu (ORCPT ); Thu, 2 Apr 2020 09:04:50 -0400 Received: from mail-pl1-f182.google.com ([209.85.214.182]:39057 "EHLO mail-pl1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388174AbgDBNEt (ORCPT ); Thu, 2 Apr 2020 09:04:49 -0400 Received: by mail-pl1-f182.google.com with SMTP id k18so1310506pll.6 for ; Thu, 02 Apr 2020 06:04:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EOnEAcuytkdcItWsdyHCKGXs/Kf+95y4g8FgJKho6xQ=; b=Y3I4w028Zq0pK62mLdRKv25offgiwZpz2+lHuvTokQL2cNIhyvxKZwxoQ5vfwrKk/i o90Bq9hnt8nVEiye0jxwvrdnTzoKL6T0kht5HaR2AWfvqXwWnBHZebZ0BXCMzkjNeWNW m7iwQTUTzB7jl1lnpfI5vFqJaJJE8r9ld2uBPHnFS1slEH2L/j7At0Db0Y7GD2Utsn5Z itfcvJKhHjTV1+kkdj135q3dVg21swLUuQIhuL6PbsMS0+OR45cwb9hOd3mlX6uXf6jB dv9ULLQywIUJg1v7EvYqCkpIhMS7f7DZqs0/9o78c6IAwc0P1y0+hSwYSNxXby2zX/n9 f4kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EOnEAcuytkdcItWsdyHCKGXs/Kf+95y4g8FgJKho6xQ=; b=Pmpd0oXksNO80zPsEUQUmVI3EaIPBgVCMvwwLP/hgxOP6e9zQlfyg3gfLpeicZxy32 NMQQMB5kIM5r9kw3TnmdCXdkrCADHURDA29Emfy+Z35Fk7CsYFwINPJvvEYW4HZU4k06 broxO5myDXCAE+oYhBC54EkF6Qldw/uTModKDJLusAAAXL5zowbOhn1GPI0LJ6SESwYf fNEVE+aSBsrprJadV3rfWy+bDbdc3pCkRJmbOcaPhjLui6g2+GO7eRCscBARoZZdxFKp AtNf1q7G9o98NR+nM8ItdRDQypJdXptqyS+9nCpvNyNhZN8v7g/Rtc1asV0FkVjeHABX B1fw== X-Gm-Message-State: AGi0PuY8R4UdzcRQG19s1IxP7TS3+qJH9y6pldYl8pE4bSLA2j/xVWAn N/X9HAk7MG1AxCQjpTh0v79mFwu5 X-Google-Smtp-Source: APiQypIj0BF2PI/tbBvDKSrt6fn303oGIuSGIWyYfDBDAOBtgH+e7f4bYS4gDiXJTcwpc8HiXdMgug== X-Received: by 2002:a17:902:b905:: with SMTP id bf5mr2704489plb.162.1585832687426; Thu, 02 Apr 2020 06:04:47 -0700 (PDT) Received: from localhost.localdomain ([2402:800:6375:207b:be21:746a:7a56:9d4d]) by smtp.gmail.com with ESMTPSA id o15sm3371124pgj.60.2020.04.02.06.04.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Apr 2020 06:04:46 -0700 (PDT) From: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= To: git@vger.kernel.org Cc: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= Subject: [PATCH v3 6/6] travis: build and test on Linux with musl libc and busybox Date: Thu, 2 Apr 2020 20:04:05 +0700 Message-Id: X-Mailer: git-send-email 2.26.0.334.g6536db25bb In-Reply-To: References: MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Signed-off-by: Đoàn Trần Công Danh --- .travis.yml | 8 +++++++ azure-pipelines.yml | 35 +++++++++++++++++++++++++++++++ ci/install-docker-dependencies.sh | 4 ++++ ci/lib.sh | 5 +++++ ci/run-docker-build.sh | 4 ++++ ci/run-docker.sh | 3 +++ 6 files changed, 59 insertions(+) diff --git a/.travis.yml b/.travis.yml index 069aeeff3c..0cfc3c3428 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,6 +33,14 @@ matrix: - docker before_install: script: ci/run-docker.sh + - env: jobname=linux-musl + os: linux + compiler: + addons: + services: + - docker + before_install: + script: ci/run-docker.sh - env: jobname=StaticAnalysis os: linux compiler: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 11413f66f8..84ecad76ec 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -514,6 +514,41 @@ jobs: PathtoPublish: t/failed-test-artifacts ArtifactName: failed-test-artifacts +- job: linux_musl + displayName: linux-musl + condition: succeeded() + pool: + vmImage: ubuntu-latest + steps: + - bash: | + test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare "$GITFILESHAREPWD" "$HOME/test-cache" || exit 1 + + res=0 + sudo AGENT_OS="$AGENT_OS" BUILD_BUILDNUMBER="$BUILD_BUILDNUMBER" BUILD_REPOSITORY_URI="$BUILD_REPOSITORY_URI" BUILD_SOURCEBRANCH="$BUILD_SOURCEBRANCH" BUILD_SOURCEVERSION="$BUILD_SOURCEVERSION" SYSTEM_PHASENAME="$SYSTEM_PHASENAME" SYSTEM_TASKDEFINITIONSURI="$SYSTEM_TASKDEFINITIONSURI" SYSTEM_TEAMPROJECT="$SYSTEM_TEAMPROJECT" CC=$CC MAKEFLAGS="$MAKEFLAGS" jobname=linux-musl bash -lxc ci/run-docker.sh || res=1 + + sudo chmod a+r t/out/TEST-*.xml + test ! -d t/failed-test-artifacts || sudo chmod a+r t/failed-test-artifacts + + test "$GITFILESHAREPWD" = '$(gitfileshare.pwd)' || sudo umount "$HOME/test-cache" || res=1 + exit $res + displayName: 'jobname=linux-musl ci/run-docker.sh' + env: + GITFILESHAREPWD: $(gitfileshare.pwd) + - task: PublishTestResults@2 + displayName: 'Publish Test Results **/TEST-*.xml' + inputs: + mergeTestResults: true + testRunTitle: 'musl' + platform: Linux + publishRunAttachments: false + condition: succeededOrFailed() + - task: PublishBuildArtifacts@1 + displayName: 'Publish trash directories of failed tests' + condition: failed() + inputs: + PathtoPublish: t/failed-test-artifacts + ArtifactName: failed-test-artifacts + - job: static_analysis displayName: StaticAnalysis condition: succeeded() diff --git a/ci/install-docker-dependencies.sh b/ci/install-docker-dependencies.sh index a104c61d29..26a6689766 100755 --- a/ci/install-docker-dependencies.sh +++ b/ci/install-docker-dependencies.sh @@ -11,4 +11,8 @@ Linux32) libssl-dev libexpat-dev gettext python >/dev/null ' ;; +linux-musl) + apk add --update build-base curl-dev openssl-dev expat-dev gettext \ + pcre2-dev python3 musl-libintl perl-utils ncurses >/dev/null + ;; esac diff --git a/ci/lib.sh b/ci/lib.sh index d637825222..87cd29bab6 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -201,6 +201,11 @@ GIT_TEST_GETTEXT_POISON) Linux32) CC=gcc ;; +linux-musl) + CC=gcc + MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/python3 USE_LIBPCRE2=Yes" + MAKEFLAGS="$MAKEFLAGS NO_REGEX=Yes ICONV_OMITS_BOM=Yes" + ;; esac MAKEFLAGS="$MAKEFLAGS CC=${CC:-cc}" diff --git a/ci/run-docker-build.sh b/ci/run-docker-build.sh index 4a153492ba..8d47a5fda3 100755 --- a/ci/run-docker-build.sh +++ b/ci/run-docker-build.sh @@ -18,6 +18,10 @@ case "$jobname" in Linux32) switch_cmd="linux32 --32bit i386" ;; +linux-musl) + switch_cmd= + useradd () { adduser -D "$@"; } + ;; *) exit 1 ;; diff --git a/ci/run-docker.sh b/ci/run-docker.sh index 3881f99b53..37fa372052 100755 --- a/ci/run-docker.sh +++ b/ci/run-docker.sh @@ -9,6 +9,9 @@ case "$jobname" in Linux32) CI_CONTAINER="daald/ubuntu32:xenial" ;; +linux-musl) + CI_CONTAINER=alpine + ;; *) exit 1 ;;