From patchwork Thu Nov 24 15:39:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Xin X-Patchwork-Id: 13055129 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F7A4C43217 for ; Thu, 24 Nov 2022 15:39:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229707AbiKXPjo (ORCPT ); Thu, 24 Nov 2022 10:39:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229664AbiKXPjl (ORCPT ); Thu, 24 Nov 2022 10:39:41 -0500 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3D734A591 for ; Thu, 24 Nov 2022 07:39:39 -0800 (PST) Received: by mail-pj1-x102a.google.com with SMTP id b11so1644161pjp.2 for ; Thu, 24 Nov 2022 07:39:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Avf/eaLDZ+faqe4g0/bm3f0HXP2JQxdX0woN8nnI/yE=; b=hbQU03AAJNoaV6Wf3tEXjAdU2gBWI4HE/ZKrYPSVJPuuunsjcNQ09tL6PkU8Dojaw/ GcMhs5zExOMDco2Oj+HT7eV6er12nmUQsU97EdqEthZC30IVeVEk4GqPJY+OhGNkjEvQ DcxVyySl3CqeR82+p3Izk9VEdky55gST2zXkz78ExKVAiLQQib4ffh3QerNv9s5oXFfm Trza3tNwzh+h0rEYDrY/Tukis7HeGskj6jPefrZKdC4WXfvhL/TyzSw6QtYas24fZIpg 0WlhH4k3PJxtNTONzwGhU6Fcg0Ed8zI2zIH+hdhwg/a/4ENA/03coQdvhzGMG5uxOJh4 q02Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Avf/eaLDZ+faqe4g0/bm3f0HXP2JQxdX0woN8nnI/yE=; b=xwwaUpd2B4dAJxg1nNWndXkXBIW9n9LmshqiLxahS72idrRNCzNiGN17CfrbgWU4Mp NvnfYZ7qkCGrS8LkW1o77kDAp37D7dX6l6arh6DYwX1wm7RJaL9oTHPmGVFkVPkFZNor IQVRIxx2UFRqDfAAq0MXmVQbBBEPlVmKVW5m3nEgR25AWaXeT3H88mqqoB01eIEwfZAV Vq3bmC0WvpCJ3mC1tnH2p9Mar3P6+dEHLmKAcCm/ZkSFP7UH1peA2SMGl0gPTbnPApeL Pu6xoLvixdqo9Ssn7i4CCL0tIZHIoTH+8EZ3yQN5mU7WtykD5HFWIIi4oVwBxF0BkU6h jyZg== X-Gm-Message-State: ANoB5pnGjWTUk/w3sJwCXu1GvKTjfE2x12r+JueB+2Z08Qc+CCZWOA5H cXCCan9IwF3zx0bwgY4DMxbYAmUYAbM= X-Google-Smtp-Source: AA0mqf6biK7htWFRB5QCILsga3xkqoH8IO50RSWEr/F+9PCRmiRe3y8b3D9atOSw78jjRIAje9jVCw== X-Received: by 2002:a17:902:ec01:b0:186:878e:3b0d with SMTP id l1-20020a170902ec0100b00186878e3b0dmr14006670pld.149.1669304379143; Thu, 24 Nov 2022 07:39:39 -0800 (PST) Received: from tigtog-proxy.localdomain.localdomain (144.34.163.219.16clouds.com. [144.34.163.219]) by smtp.gmail.com with ESMTPSA id x22-20020a170902821600b0017f48a9e2d6sm1413089pln.292.2022.11.24.07.39.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Nov 2022 07:39:38 -0800 (PST) From: Jiang Xin To: Git List , Junio C Hamano , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Johannes Schindelin Cc: Jiang Xin , Jiang Xin Subject: [PATCH v3 1/4] github-actions: run gcc-8 on ubuntu-20.04 image Date: Thu, 24 Nov 2022 23:39:31 +0800 Message-Id: <20221124153934.12470-2-worldhello.net@gmail.com> X-Mailer: git-send-email 2.32.0.rc3 In-Reply-To: <20221124090545.4790-1-worldhello.net@gmail.com> References: <20221124090545.4790-1-worldhello.net@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Jiang Xin GitHub starts to upgrade its runner image "ubuntu-latest" from version "ubuntu-20.04" to version "ubuntu-22.04". It will fail to find and install "gcc-8" package on the new runner image. Change the runner images from "ubuntu-latest" to "ubuntu-20.04" in order to run with "gcc-8" as a dependency. Instead of use the environment "$runs_on_pool" as below: case "$runs_on_pool" in ubuntu-20.04 | ubuntu-latest) ;; we can reuse the os field in the matrix, and use a new environment "$runs_on_os" as below: case "$runs_on_os" in ubuntu) ;; In this way, we can change the "ubuntu-latest" runner image to any version such as "ubuntu-22.04" to test CI behavior in advance. Reviewed-by: Johannes Schindelin Signed-off-by: Jiang Xin --- .github/workflows/main.yml | 16 ++++++++++++---- ci/install-dependencies.sh | 6 +++--- ci/lib.sh | 6 +++--- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 592f9193a8..da0d8ab0bf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -224,6 +224,7 @@ jobs: vector: - jobname: linux-clang cc: clang + os: ubuntu pool: ubuntu-latest - jobname: linux-sha256 cc: clang @@ -232,36 +233,43 @@ jobs: - jobname: linux-gcc cc: gcc cc_package: gcc-8 - pool: ubuntu-latest + os: ubuntu + pool: ubuntu-20.04 - jobname: linux-TEST-vars cc: gcc - os: ubuntu cc_package: gcc-8 - pool: ubuntu-latest + os: ubuntu + pool: ubuntu-20.04 - jobname: osx-clang cc: clang + os: macos pool: macos-latest - jobname: osx-gcc cc: gcc cc_package: gcc-9 + os: macos pool: macos-latest - jobname: linux-gcc-default cc: gcc + os: ubuntu pool: ubuntu-latest - jobname: linux-leaks cc: gcc + os: ubuntu pool: ubuntu-latest - jobname: linux-asan cc: gcc + os: ubuntu pool: ubuntu-latest - jobname: linux-ubsan cc: gcc + os: ubuntu pool: ubuntu-latest env: CC: ${{matrix.vector.cc}} CC_PACKAGE: ${{matrix.vector.cc_package}} jobname: ${{matrix.vector.jobname}} - runs_on_pool: ${{matrix.vector.pool}} + runs_on_os: ${{matrix.vector.os}} runs-on: ${{matrix.vector.pool}} steps: - uses: actions/checkout@v2 diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh index 107757a1fe..f639263a62 100755 --- a/ci/install-dependencies.sh +++ b/ci/install-dependencies.sh @@ -11,8 +11,8 @@ UBUNTU_COMMON_PKGS="make libssl-dev libcurl4-openssl-dev libexpat-dev tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl libemail-valid-perl libio-socket-ssl-perl libnet-smtp-ssl-perl" -case "$runs_on_pool" in -ubuntu-latest) +case "$runs_on_os" in +ubuntu) sudo apt-get -q update sudo apt-get -q -y install language-pack-is libsvn-perl apache2 \ $UBUNTU_COMMON_PKGS $CC_PACKAGE @@ -30,7 +30,7 @@ ubuntu-latest) cp git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs . popd ;; -macos-latest) +macos) export HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1 # Uncomment this if you want to run perf tests: # brew install gnu-time diff --git a/ci/lib.sh b/ci/lib.sh index 24d20a5d64..0c0767d354 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -225,8 +225,8 @@ export DEFAULT_TEST_TARGET=prove export GIT_TEST_CLONE_2GB=true export SKIP_DASHED_BUILT_INS=YesPlease -case "$runs_on_pool" in -ubuntu-latest) +case "$runs_on_os" in +ubuntu) if test "$jobname" = "linux-gcc-default" then break @@ -253,7 +253,7 @@ ubuntu-latest) GIT_LFS_PATH="$HOME/custom/git-lfs" export PATH="$GIT_LFS_PATH:$P4_PATH:$PATH" ;; -macos-latest) +macos) if [ "$jobname" = osx-gcc ] then MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)" From patchwork Thu Nov 24 15:39:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Xin X-Patchwork-Id: 13055130 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58D32C4321E for ; Thu, 24 Nov 2022 15:39:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229733AbiKXPjr (ORCPT ); Thu, 24 Nov 2022 10:39:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229671AbiKXPjm (ORCPT ); Thu, 24 Nov 2022 10:39:42 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D47575214E for ; Thu, 24 Nov 2022 07:39:40 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id o5-20020a17090a678500b00218cd5a21c9so1897359pjj.4 for ; Thu, 24 Nov 2022 07:39:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pRVnSpep1qlRswrNiE8Cg7USHImW3vHd0rLSMiWznFA=; b=QIUHyVZuD0Q4rilE5VTqWMPzshfzfJKFVUSpBsimGXDptDA0qKc8Rnp/mdAl0hqvMA ye9H5cn29eD3y6iq0mlHbTzIT/mulE/uzzBsBr61qjkEdmOVAc+H+w4GnuYKSqLCb04D xv0EFjmoddHFWo4qErVIucRfL0PlRGghWnIzvQO4m2KP+T7BFxDP6x4eztNGwIg3gZPm kRd+7F9G6v2bkK0Jde2Mh+sKhImzOAxVTxw27MAqVF6sLJekxPG+eeBT2iWFf63hT6f9 HwZs3+Sm4/Q+Q53yb/UeUTFRYPsC5Kc3e52fbfwfyZ8WlybsUcnwdOsTCGvK55YS2AK3 WKAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pRVnSpep1qlRswrNiE8Cg7USHImW3vHd0rLSMiWznFA=; b=ShPESa/jJHuIW+yOkQSL/wBXCYrbtivX/INhEaPGOhoAD3drUVrp4L30BZsD8YjLL/ MA2Hew/FDj6xLOu2oZTrn1LBL/iE6+0pt9SJaPZJmb+yyZFilSFkHilKt13Ha8ozW6Jg Lv4VXy7ZoBi7ILKfZs3okfzI3XNHMP2j0hhryBWDJkQpjabicKtY9PeUxv3d0VAGClQZ cJwfTWpCPX8TAhDEQSVqCx/jq6RtbgwENMfxAGvb8QKxG7BhFWuoXlCz5wkpOAZW+HWN NuIqfHMnk4nWv1UrIAQvf4A2uCuD3uyebDwM58ZK9QMQNi1bv8e1baBmhS6m66zfMqX5 PeJQ== X-Gm-Message-State: ANoB5pmvy9QL8k6Haohc+4keZl+VZ8VWmYtBmd1wGgnzaYjRJNvl6vTs P/xuAgz/nun6LdsfV63whH9EH9U4C+c= X-Google-Smtp-Source: AA0mqf7vN79ys9fiv/AEbBBMmARdTG/qW+UaIh+ZIHkJ276M+BeGiYInaL0DyTXS5vj9b47C+S22Vg== X-Received: by 2002:a17:902:a418:b0:187:edc:82f3 with SMTP id p24-20020a170902a41800b001870edc82f3mr14444368plq.161.1669304380174; Thu, 24 Nov 2022 07:39:40 -0800 (PST) Received: from tigtog-proxy.localdomain.localdomain (144.34.163.219.16clouds.com. [144.34.163.219]) by smtp.gmail.com with ESMTPSA id x22-20020a170902821600b0017f48a9e2d6sm1413089pln.292.2022.11.24.07.39.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Nov 2022 07:39:39 -0800 (PST) From: Jiang Xin To: Git List , Junio C Hamano , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Johannes Schindelin Cc: Jiang Xin , Jiang Xin Subject: [PATCH v3 2/4] ci: show error message of "p4 -V" Date: Thu, 24 Nov 2022 23:39:32 +0800 Message-Id: <20221124153934.12470-3-worldhello.net@gmail.com> X-Mailer: git-send-email 2.32.0.rc3 In-Reply-To: <20221124090545.4790-1-worldhello.net@gmail.com> References: <20221124090545.4790-1-worldhello.net@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Jiang Xin When installing p4 as a dependency, we used to pipe output of "p4 -V" to validate the installation, but this would hide potential errors of p4. E.g.: A broken p4 installation fails to run. Add some instructions to show errors of command "p4 -V", so we can see why the command output doesn't match. Reviewed-by: Johannes Schindelin Signed-off-by: Jiang Xin --- ci/install-dependencies.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh index f639263a62..291e49bdde 100755 --- a/ci/install-dependencies.sh +++ b/ci/install-dependencies.sh @@ -83,9 +83,9 @@ esac if type p4d >/dev/null 2>&1 && type p4 >/dev/null 2>&1 then echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)" - p4d -V | grep Rev. + p4d -V | grep Rev. || { echo >&2 "p4d: bad version"; p4d -V; exit 1; } echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)" - p4 -V | grep Rev. + p4 -V | grep Rev. || { echo >&2 "p4: bad version"; p4 -V; exit 1; } else echo >&2 "WARNING: perforce wasn't installed, see above for clues why" fi From patchwork Thu Nov 24 15:39:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jiang Xin X-Patchwork-Id: 13055131 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D844C433FE for ; Thu, 24 Nov 2022 15:39:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229717AbiKXPjt (ORCPT ); Thu, 24 Nov 2022 10:39:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229681AbiKXPjm (ORCPT ); Thu, 24 Nov 2022 10:39:42 -0500 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F31C030562 for ; Thu, 24 Nov 2022 07:39:41 -0800 (PST) Received: by mail-pl1-x629.google.com with SMTP id d20so1738686plr.10 for ; Thu, 24 Nov 2022 07:39:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pOecyeyTetxTaFOgnmxEvvHNBhzKBuwDfSjKxQpFkO8=; b=DPYnx5fdXyElrdNVMMfVw62fdYAS9dFRcHwVkmpXKnJ76SbRZU5ZCVafpgyNfENFoO GTHTUcT6hukam1qa7490KhH9q1tNDCKjYoWYKvyRWAF1H2EmkSACBpWkruKoKngDJnOo 9VLvA2wd3mqRxFxd7ZpfXofr0RRxAybuRZb8R4tWSRcTOixoRX0vuKKuior27jOWvQ7R veu8Hi2Mx4cUwGoXF+qcxO84/2KDDFXAC7HiTqsXZp7/QEla5woJw2Lf7cvVWIfv8Mv9 Xxv0nYOBwGa5iCI1OQCJXdKLs4s8uphx09eebxFph89+vftz7V7b1sHKIRxQqs7jXJR+ RLMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pOecyeyTetxTaFOgnmxEvvHNBhzKBuwDfSjKxQpFkO8=; b=odRrHRhySRZCVTL4HghIXEorYYlZrGzsOjvDbt51ECbmPz1OFIFZiMOK7wj7aYofb5 lIepPBeRrKDFE9G/RHrtwXFhuViq05E3Dfpiw0IuQ/OWMA1wumHdjMdZNJHhgq0lOBZO CLo3HSS2490MbTA8nEGQ+Gi9g9t8lc4I/6lIRgwC6qi/+XWlCWt1TJHzsKlJAaI+Ubdo JfYW4URgxnEQSNxY5m1aAloVv9EW+xXUnwm6fX3hCS6E+IQ3G3T5Y22T4T98enxkeJZN n7acnNlUUBt0fYqUI6nuob0FrsQxBwt4oQKmm30YWVuJyAqokMTCE+7OWMAbv+2FoycN oOdg== X-Gm-Message-State: ANoB5pm/yqlJ80O3i5ILjrJg+yBHs49qqQaqQaSw25PdxEoAwGypnUh1 LDBohUdfPACuNb0IHNH0OnC19TMABxU= X-Google-Smtp-Source: AA0mqf7UMNUmJtvFaif4hdUFaMhgsqpIQHtx+TdXD9ndekDP2iQn4a8oULghstX6dk/sL3CA03mScw== X-Received: by 2002:a17:902:e807:b0:186:fb90:5774 with SMTP id u7-20020a170902e80700b00186fb905774mr14829037plg.137.1669304381209; Thu, 24 Nov 2022 07:39:41 -0800 (PST) Received: from tigtog-proxy.localdomain.localdomain (144.34.163.219.16clouds.com. [144.34.163.219]) by smtp.gmail.com with ESMTPSA id x22-20020a170902821600b0017f48a9e2d6sm1413089pln.292.2022.11.24.07.39.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Nov 2022 07:39:40 -0800 (PST) From: Jiang Xin To: Git List , Junio C Hamano , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Johannes Schindelin Cc: Jiang Xin , Jiang Xin Subject: [PATCH v3 3/4] ci: p4 on Linux has the same version as on macOS Date: Thu, 24 Nov 2022 23:39:33 +0800 Message-Id: <20221124153934.12470-4-worldhello.net@gmail.com> X-Mailer: git-send-email 2.32.0.rc3 In-Reply-To: <20221124090545.4790-1-worldhello.net@gmail.com> References: <20221124090545.4790-1-worldhello.net@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Jiang Xin There would be a segmentation fault when running p4 v16.2 on ubuntu 22.04 which is the latest version of ubuntu runner image for github actions. By checking each version from [1], p4d version 21.1 and above can work properly on ubuntu 22.04. But version 22.x will break some p4 test cases. So p4 version 21.x is exactly the version we can use. With this update, the versions of p4 for Linux and macOS happen to be the same. So we can add the version number directly into the "P4WHENCE" variable, and reuse it in p4 installation for macOS. By removing the "LINUX_P4_VERSION" variable from "ci/lib.sh", the comment left above has nothing to do with p4, but still applies to git-lfs. Since we have a fixed version of git-lfs installed on Linux, we may have a different version on macOS. [1]: https://cdist2.perforce.com/perforce/ Reviewed-by: Johannes Schindelin Helped-by: Ævar Arnfjörð Bjarmason Signed-off-by: Jiang Xin --- ci/install-dependencies.sh | 4 ++-- ci/lib.sh | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh index 291e49bdde..f860c35c75 100755 --- a/ci/install-dependencies.sh +++ b/ci/install-dependencies.sh @@ -5,7 +5,7 @@ . ${0%/*}/lib.sh -P4WHENCE=https://cdist2.perforce.com/perforce/r$LINUX_P4_VERSION +P4WHENCE=https://cdist2.perforce.com/perforce/r21.2 LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION UBUNTU_COMMON_PKGS="make libssl-dev libcurl4-openssl-dev libexpat-dev tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl @@ -40,7 +40,7 @@ macos) mkdir -p $HOME/bin ( cd $HOME/bin - wget -q "https://cdist2.perforce.com/perforce/r21.2/bin.macosx1015x86_64/helix-core-server.tgz" && + wget -q "$P4WHENCE/bin.macosx1015x86_64/helix-core-server.tgz" && tar -xf helix-core-server.tgz && sudo xattr -d com.apple.quarantine p4 p4d 2>/dev/null || true ) diff --git a/ci/lib.sh b/ci/lib.sh index 0c0767d354..991ea4f8a6 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -246,7 +246,6 @@ ubuntu) # were recorded in the Homebrew database upon creating the OS X # image. # Keep that in mind when you encounter a broken OS X build! - export LINUX_P4_VERSION="16.2" export LINUX_GIT_LFS_VERSION="1.5.2" P4_PATH="$HOME/custom/p4" From patchwork Thu Nov 24 15:39:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jiang Xin X-Patchwork-Id: 13055132 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BA76C43217 for ; Thu, 24 Nov 2022 15:39:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229751AbiKXPju (ORCPT ); Thu, 24 Nov 2022 10:39:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229704AbiKXPjo (ORCPT ); Thu, 24 Nov 2022 10:39:44 -0500 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07FAC30562 for ; Thu, 24 Nov 2022 07:39:43 -0800 (PST) Received: by mail-pf1-x433.google.com with SMTP id 9so1886215pfx.11 for ; Thu, 24 Nov 2022 07:39:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XrodGsdgDfEdezt9f/pW1vlRzb3Km+y0QPGok/vIRE4=; b=MA6Zf3RS0cHzFjVO+JmC4VjiXTisrFyb7hgwHWBd9clXfpdd0rK2mB44HjR2TnEeO+ phPIW+GBDSjpJ0UQGjsBwGUiXhJQM2MCFcEZlsXVzmbTQ9WxPie8Ik9lfy5bu4cXVWb7 xOZ6YuqzvYga8e/vk4Ka8eu5CuPv6pHs9beNBAnuKyqvaWqk4vA31RRh26DCnfzQXrkO ZD6rvah3rqZUIVArtVMuKItAgBjDHRskSk5F/AB3bmW1YR52eXtTruQDgBlfzQz1Rw// vqJifyctkcFCPyeTt5pox99hX5D6gsB0UvOAwU5aBH64r1IoWAYwYxvFNfUo8ozKxZyn x5LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XrodGsdgDfEdezt9f/pW1vlRzb3Km+y0QPGok/vIRE4=; b=gwGEZrT3k1QtHdpZPKLJGhPknrq9vgV+E2/HRJQsxpgpnPiqokBJK/7E3cG4M9IY/h rLN9OwP+5GfOFK6sI+lNcH6IaHuafv4L2tgNynQmPHpvqEZDHTPavJcyMQRzbCo0hRNk 2WLE3iuLKpBphmK2exCTsROambt9Z7lciu3/B5pnBcFYTj/OGeYcLrG1jDDuiEsvrpPw 5K/UtohHusKaZzSjlvkcfZBdSOCJkdnRcwUEaVRSDfQLtIpbbXAw7qRCpILlAMXE2xbQ Kvwl/aunIIF/MdUv6N4n8Zn2DIjgbrBUrFLobJOw/MTW0o9tHT+j/eNxx7m96196nGyL mNOw== X-Gm-Message-State: ANoB5pla12AhQINkN8f0VO6Lwcsg42CuRXXZqQOvrJVCdyxEZXMD0gay K8W2WAFCOY/6BcAEhTNFo0LX03t82iE= X-Google-Smtp-Source: AA0mqf5sJsmO8e5N6mo3StvS6asCKyE0vBFperb8Dp/rLDLk9Ysrb8ApV1qD+e9H2hAEQEyK9WkcuQ== X-Received: by 2002:a63:1659:0:b0:46e:f23a:e9aa with SMTP id 25-20020a631659000000b0046ef23ae9aamr14884231pgw.428.1669304382305; Thu, 24 Nov 2022 07:39:42 -0800 (PST) Received: from tigtog-proxy.localdomain.localdomain (144.34.163.219.16clouds.com. [144.34.163.219]) by smtp.gmail.com with ESMTPSA id x22-20020a170902821600b0017f48a9e2d6sm1413089pln.292.2022.11.24.07.39.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Nov 2022 07:39:41 -0800 (PST) From: Jiang Xin To: Git List , Junio C Hamano , =?utf-8?b?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Johannes Schindelin Cc: Jiang Xin , Jiang Xin Subject: [PATCH v3 4/4] ci: install python on ubuntu Date: Thu, 24 Nov 2022 23:39:34 +0800 Message-Id: <20221124153934.12470-5-worldhello.net@gmail.com> X-Mailer: git-send-email 2.32.0.rc3 In-Reply-To: <20221124090545.4790-1-worldhello.net@gmail.com> References: <20221124090545.4790-1-worldhello.net@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Jiang Xin Python is missing from the default ubuntu-22.04 runner image, which prevent git-p4 from working. To install python on ubuntu, we need to provide correct package name: * On Ubuntu 18.04 (bionic), "/usr/bin/python2" is provided by the "python" package, and "/usr/bin/python3" is provided by the "python3" package. * On Ubuntu 20.04 (focal) and above, "/usr/bin/python2" is provided by the "python2" package which has a different name from bionic, and "/usr/bin/python3" is provided by "python3". Since the "ubuntu-latest" runner image has a higher version, so its safe to use "python2" or "python3" package name. Helped-by: Ævar Arnfjörð Bjarmason Signed-off-by: Jiang Xin --- ci/install-dependencies.sh | 2 +- ci/lib.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh index f860c35c75..e804b1935e 100755 --- a/ci/install-dependencies.sh +++ b/ci/install-dependencies.sh @@ -15,7 +15,7 @@ case "$runs_on_os" in ubuntu) sudo apt-get -q update sudo apt-get -q -y install language-pack-is libsvn-perl apache2 \ - $UBUNTU_COMMON_PKGS $CC_PACKAGE + $UBUNTU_COMMON_PKGS $CC_PACKAGE $PYTHON_PACKAGE mkdir --parents "$P4_PATH" pushd "$P4_PATH" wget --quiet "$P4WHENCE/bin.linux26x86_64/p4d" diff --git a/ci/lib.sh b/ci/lib.sh index 991ea4f8a6..fbebad4b9c 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -232,12 +232,12 @@ ubuntu) break fi - if [ "$jobname" = linux-gcc ] + PYTHON_PACKAGE=python2 + if test "$jobname" = linux-gcc then - MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/python3" - else - MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/python2" + PYTHON_PACKAGE=python3 fi + MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/$PYTHON_PACKAGE" export GIT_TEST_HTTPD=true