Skip to content

Commit d2edb40

Browse files
committed
ci/github: install git before checking out the repository
The GitHub CI workflow uses 'actions/checkout@v4' to checkout the repository. This action defaults to using the GitHub REST API to obtain the repository if Git isn't present. The REST API downloads a tar of the repository sans the Git information. Since we don't install Git before this step, using the REST API is the current behavior. The following commits will add the 'hdr-check' static check to meson. The check will use 'git ls-files' to obtain the set of header files. This will fail if the repository doesn't contain the Git directory. So install Git before running the 'actions/checkout@v4' action. Signed-off-by: Karthik Nayak <[email protected]>
1 parent d1b5184 commit d2edb40

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/main.yml

+5
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,11 @@ jobs:
414414
- name: prepare libc6 for actions
415415
if: matrix.vector.jobname == 'linux32'
416416
run: apt -q update && apt -q -y install libc6-amd64 lib64stdc++6
417+
- name: install git in container
418+
run: |
419+
apt -q update && apt -q -y install git
420+
# one time fix to avoid permission problems later on
421+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
417422
- uses: actions/checkout@v4
418423
- run: ci/install-dependencies.sh
419424
- run: useradd builder --create-home

0 commit comments

Comments
 (0)