Skip to content

Commit e3e392f

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 e3e392f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: .github/workflows/main.yml

+6
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,12 @@ 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 update
420+
apt add git
421+
# one time fix to avoid permission problems later on
422+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
417423
- uses: actions/checkout@v4
418424
- run: ci/install-dependencies.sh
419425
- run: useradd builder --create-home

0 commit comments

Comments
 (0)