From patchwork Fri Mar 26 17:05:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?zqPPhM6xz43Pgc6/z4Igzp3PhM6tzr3PhM6/z4I=?= X-Patchwork-Id: 12167107 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 330D1C433E0 for ; Fri, 26 Mar 2021 17:06:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E36D161A4C for ; Fri, 26 Mar 2021 17:06:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230138AbhCZRFq (ORCPT ); Fri, 26 Mar 2021 13:05:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229871AbhCZRF2 (ORCPT ); Fri, 26 Mar 2021 13:05:28 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26F05C0613AA for ; Fri, 26 Mar 2021 10:05:28 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id v4so6290356wrp.13 for ; Fri, 26 Mar 2021 10:05:28 -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=m1yyu4kpSojRf2zeWMvDm7D3VHy5iN2yF7B1GotAq5Y=; b=g7yAx3sV4WIk7hLvKBKp0NkRAxVOPHct4E2nspFAfkAWZd4obAsx9PGcfFbAwH0Zrz +8+ATAbmL9/7cOeX1M2xijYdonLtBwd1tvXxrd1Gsme7m3NCK4CYSShnk23zzjTzsWQ1 8NntZOlbmx2E/S0KVL6FXLCfRMgwG0HHWWlxEafVHjMT7qHP6nP7dfiI1feWUmykIXIa EF//vkAxGS4HjDoNsZLqEdL1MAec03DQlZA3x2m4FEl2f4C1525SZwVf9e9cqBrpoVaU DPDozVZG21YxQLW9iuB3xrx3xz6S5MEmc+TNWB5uGaXghX4KNmjCj0qhBeo5tn4iRzjG wAJw== 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=m1yyu4kpSojRf2zeWMvDm7D3VHy5iN2yF7B1GotAq5Y=; b=sdtloTZTXbzL8wUB6juuUl/58AtnfJRKRF5Kxk1Mw05wmbk01ld2Mv4WE8c31gWAcB OPJHq6N58pjdBeRTtGThtHwGzLA0kLsCSRA8EdUApEnuEU5EIXFvuLXBeTnStVNd/BOg ySF/yhE2wSmb/XvKeSkkcKnq6F0FYZWZMaRuvrQut2E/kg0JyPk6oRtNVlWfcpA3SHRR 56kWFI/2YhpQs2rdMQWnLmnfmM3KVb/GUrWm0A0Q/HET0O/pg2bGZXbXBE0+tJp/OGoX Ll53UEOiN5ik3HxjEKuoaRiqKnlb+kQc9kWsdKYm/IUQkkRPDs4w49VfQ0E2aQuFYxao qBdA== X-Gm-Message-State: AOAM532ofICYGj4Vh56W/tgbBUHcdhcnN+WwNjGSTLM1nEB08AOmz2Iw ROLKZhA1kcWST7rghXP2OenXQnrcpKCEP/2r8bM= X-Google-Smtp-Source: ABdhPJw3GfzjMul8gPbFzqcOauPMTqZqAX1bNpE8ZcsisXV7B3DhOmc+KDzQ0LsMyZ0GJ8LwH9y6FQ== X-Received: by 2002:a5d:6d05:: with SMTP id e5mr14930184wrq.324.1616778326520; Fri, 26 Mar 2021 10:05:26 -0700 (PDT) Received: from localhost.localdomain ([2a02:85f:2a0a:9300:501f:ca6d:3b18:1e72]) by smtp.googlemail.com with ESMTPSA id n6sm13982958wrt.1.2021.03.26.10.05.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 10:05:26 -0700 (PDT) From: " =?utf-8?b?zqPPhM6xz43Pgc6/z4Igzp3PhM6tzr3PhM6/z4I=?= " X-Google-Original-From: =?utf-8?b?zqPPhM6xz43Pgc6/z4Igzp3PhM6tzr3PhM6/z4I=?= To: git@vger.kernel.org Cc: =?utf-8?b?zqPPhM6xz43Pgc6/z4Igzp3PhM6tzr3PhM6/z4I=?= , gitster@pobox.com, Stavros Ntentos <133706+stdedos@users.noreply.github.com> Subject: [PATCH v1 1/1] ci: facilitate dev to mimic a CI environment Date: Fri, 26 Mar 2021 19:05:05 +0200 Message-Id: <20210326170505.7771-2-stdedos+git@gmail.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210326170505.7771-1-stdedos+git@gmail.com> References: <20210326170505.7771-1-stdedos+git@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Stavros Ntentos <133706+stdedos@users.noreply.github.com> While trying to mimic a CI environment (to be able to locally run tests in isolation), I didn't find enough instructions how to do so - even though the project has CI set up. Attempt to bridge the gap, by providing a starting/discussion point. Leave instructions for people that want to run a ci-like isolated environment locally. --- .../setup-local-dev-environment-docker.sh | 43 +++++++++++++++++++ ci/setup-local-dev-environment-docker.sh | 1 + 2 files changed, 44 insertions(+) create mode 100644 Documentation/howto/setup-local-dev-environment-docker.sh create mode 120000 ci/setup-local-dev-environment-docker.sh -- 2.31.0 diff --git a/Documentation/howto/setup-local-dev-environment-docker.sh b/Documentation/howto/setup-local-dev-environment-docker.sh new file mode 100644 index 0000000000..265602ea55 --- /dev/null +++ b/Documentation/howto/setup-local-dev-environment-docker.sh @@ -0,0 +1,43 @@ +#!/bin/false + +# shellcheck shell=sh + +# Partially based on instructions from: +# ci/run-docker.sh +# +# Note: Alpine (and consequently the other variant ["non-32-bit"]) complains of: +# git-compat-util.h: 1139: #error "Git requires REG_STARTEND support. Compile with NO_REGEX=NeedsStartEnd" +# and no +# ```bash +# export NO_REGEX=NeedsStartEnd +# /usr/src/git/ci/run-docker-build.sh 0 +# ``` +# helps + +docker run -itv "${PWD}:/usr/src/git" --entrypoint /bin/bash "daald/ubuntu32:xenial" + +# And then, inside, initialize with: + +export jobname=Linux32 + +# Helpful initializations: + +cat >> ~/.gdbinit <<"EOF" +# https://stackoverflow.com/a/3176802/2309247 +set history save on +set history size -1 +set history filename ~/.gdb_history +EOF +chmod 600 ~/.gdbinit + +# cd to repo + +cd /usr/src/git/ || echo "cd error!" + +# In lieu of `$ make`: +ci/run-docker-build.sh 0 + +# # And then run a test with: +# prove t/t6130-pathspec-noglob.sh +# t/t6130-pathspec-noglob.sh +# ci/run-docker-build.sh 0 && prove t/t6130-pathspec-noglob.sh diff --git a/ci/setup-local-dev-environment-docker.sh b/ci/setup-local-dev-environment-docker.sh new file mode 120000 index 0000000000..1c4bcc90a9 --- /dev/null +++ b/ci/setup-local-dev-environment-docker.sh @@ -0,0 +1 @@ +../Documentation/howto/setup-local-dev-environment-docker.sh \ No newline at end of file