Re: [PATCH v4 0/5] meson: add corresponding target for Makefile's hdr-check
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Apr 21, 2025, 20:08 UTC
- Message-ID
- <CAOLa=ZSa-qQzi3iWPF+M5a4EsvGiQFX=2Ca=vzuqwSLWWXSw+g@mail.gmail.com>
- In-Reply-To
- <xmqq8qnt7c9w.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 13 quoted lines
> Phillip Wood <phillip.wood123@gmail.com> writes: > >> "git ls-files" is complaining that there isn't a git >> repository. Looking at the output of the checkout action (reproduced >> below) it appears it is extracting a tarball rather than using "git >> clone" because git is not available. I don't know what the best way to >> fix that is - I guess we could run "apt-get install git" before >> calling the checkout action. > > Interesting. The use of actions/checkout@v4 is nothing new in > Karthik's series and we haven't seen this issue come up. What's so > different with this particular series, I have to wonder... >
So the steps in the GitHub CI are:
... - uses: actions/checkout@v4 #1 - run: ci/install-dependencies.sh #2 ... - run: sudo --preserve-env --set-home --user=builder ci/run-build-and-tests.sh #3 ...
Step #1, clones the repository, since the `git` executable isn't present at this step, it uses GitHub's REST API to obtain a tar of the repository.
Step #2, installs all dependencies, which includes the `git` executable.
Step #3, sets up the build, which includes setting up meson in the meson job. At this point the `git` executable is present, so within meson `git.found()` would be true. As such we run 'git ls-files' as part of my patch series, but since the repository doesn't contain the `.git` folder, the command fails.
So like Phillip mentioned, we need to ensure that the `git` executable is present before step #1.
I hope that makes sense.
> Thanks.