git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karthik Nayak <karthik.188@gmail.com>
To: ps@pks.im
Cc: git@vger.kernel.org, gitster@pobox.com, karthik.188@gmail.com,
	peff@peff.net
Subject: [PATCH] ci/github: add missing 'CI_JOB_IMAGE' env variable
Date: Wed, 19 Mar 2025 17:33:28 +0100	[thread overview]
Message-ID: <20250319163328.525284-1-karthik.188@gmail.com> (raw)
In-Reply-To: <Z9qNNq0p10YJCZYo@pks.im>

The CI setups of GitLab and GitHub use a common dependency management
script 'ci/install-dependencies.sh'. The script install the necessary
packages based on a combination of the "$distro" and "$jobname" env
variables.

The "$distro" variable is derived from the "CI_JOB_IMAGE" env variable
set by the CI configs. In the GitHub CI config, some of the jobs are
missing this variable. For the 'Documentation' job which depends on
'meson' being installed, this raises an error since the 'meson'
dependency is never installed.

Fix this by adding the 'CI_JOB_IMAGE' variable to all missing jobs. We
don't add it the windows jobs, since they manager their dependency as
part of the CI config and no further dependency management is needed.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
---

Junio, not sure if you wanted a patch here, since you already had a fix
yourself. But I'm providing one nonetheless, feel free to drop it.

 .github/workflows/main.yml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 9959b61ece..37541f3d10 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -349,6 +349,7 @@ jobs:
     if: needs.ci-config.outputs.enabled == 'yes'
     env:
       CC: clang
+      CI_JOB_IMAGE: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     - uses: actions/checkout@v4
@@ -432,6 +433,7 @@ jobs:
     if: needs.ci-config.outputs.enabled == 'yes'
     env:
       jobname: StaticAnalysis
+      CI_JOB_IMAGE: ubuntu-22.04
     runs-on: ubuntu-22.04
     concurrency:
       group: static-analysis-${{ github.ref }}
@@ -446,6 +448,7 @@ jobs:
     if: needs.ci-config.outputs.enabled == 'yes'
     env:
       jobname: sparse
+      CI_JOB_IMAGE: ubuntu-20.04
     runs-on: ubuntu-20.04
     concurrency:
       group: sparse-${{ github.ref }}
@@ -473,6 +476,7 @@ jobs:
       cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
     env:
       jobname: Documentation
+      CI_JOB_IMAGE: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     - uses: actions/checkout@v4
-- 
2.48.1


  parent reply	other threads:[~2025-03-19 16:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-14 17:36 What's cooking in git.git (Mar 2025, #04; Fri, 14) Junio C Hamano
2025-03-14 18:41 ` Jeff King
2025-03-14 18:42   ` Jeff King
2025-03-15  0:02   ` Junio C Hamano
2025-03-18 15:57     ` [PATCH] install meson for Documentation job Junio C Hamano
2025-03-18 16:19       ` Karthik Nayak
2025-03-18 20:40         ` Junio C Hamano
2025-03-19  9:24           ` Patrick Steinhardt
2025-03-19 16:22             ` Karthik Nayak
2025-03-19 16:33             ` Karthik Nayak [this message]
2025-03-20  7:10               ` [PATCH] ci/github: add missing 'CI_JOB_IMAGE' env variable Patrick Steinhardt
2025-03-21  7:51               ` Junio C Hamano
2025-03-20 20:27             ` [PATCH] install meson for Documentation job Junio C Hamano
2025-03-15  0:32 ` en/diff-rename-follow-fix (Was: Re: What's cooking in git.git (Mar 2025, #04; Fri, 14)) Elijah Newren
2025-03-15  1:22   ` en/diff-rename-follow-fix Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250319163328.525284-1-karthik.188@gmail.com \
    --to=karthik.188@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=ps@pks.im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).