Skip to content

Commit d024d20

Browse files
committed
ci(test-unit): Inline git clone for legacy PHP cells
actions/checkout@v3 has been re-classified as a Node 20 action by the GitHub Actions runner. Node 20 requires glibc 2.27+, and the official php:5.6 / php:7.0 docker images are based on Debian 9 (glibc 2.24). The action errors out before its main logic with: /__e/node20/bin/node: /lib/x86_64-linux-gnu/libm.so.6: version \`GLIBC_2.27' not found (required by /__e/node20/bin/node) This was the original motivation for d6d36a1's host-orchestrated rewrite. With that revert in place, the matrix design has to provide its own checkout for legacy PHP cells. Substitute a plain git clone in those two cells: git init git remote add origin https://github.com/<repo>.git git fetch --no-tags --prune --depth=1 origin +<sha>:refs/remotes/origin/run-head git checkout --force refs/remotes/origin/run-head git was installed in the earlier "Install operating system dependencies" step (it's already in the apt-get install line), so the binary is on PATH before this step runs. Modern PHP cells continue to use actions/checkout@v3 unchanged.
1 parent da47684 commit d024d20

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/test-unit.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,22 @@ jobs:
129129
fi
130130
docker-php-ext-enable xdebug
131131
132+
# actions/checkout@v3 runs Node 20, which requires glibc 2.27+. The
133+
# php:5.6 and php:7.0 images are based on Debian 9 (glibc 2.24), so the
134+
# action's own bootstrap can't start. Inline a plain git clone instead;
135+
# git itself was installed in the OS-deps step above.
136+
- name: Check out repository (legacy PHP)
137+
if: matrix.interpreter.image == 'php:5.6' || matrix.interpreter.image == 'php:7.0'
138+
run: |
139+
git config --global --add safe.directory '*'
140+
cd "$GITHUB_WORKSPACE"
141+
git init
142+
git remote add origin "https://github.com/${{ github.repository }}.git"
143+
git fetch --no-tags --prune --depth=1 origin "+${{ github.sha }}:refs/remotes/origin/run-head"
144+
git checkout --force refs/remotes/origin/run-head
145+
132146
- uses: actions/checkout@v3
147+
if: matrix.interpreter.image != 'php:5.6' && matrix.interpreter.image != 'php:7.0'
133148

134149
- name: Install Composer
135150
run: curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer

0 commit comments

Comments
 (0)