From 1c0b64471666dcdcf8c60e31ed8435915d5b1267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Wed, 11 Feb 2026 21:05:16 +0100 Subject: [PATCH 1/4] Verify bundled JIT IR using CI --- .github/scripts/download-bundled/jit-ir.sh | 36 ++++++++++++++++++++++ .github/workflows/verify-bundled-files.yml | 13 ++++++++ 2 files changed, 49 insertions(+) create mode 100755 .github/scripts/download-bundled/jit-ir.sh diff --git a/.github/scripts/download-bundled/jit-ir.sh b/.github/scripts/download-bundled/jit-ir.sh new file mode 100755 index 000000000000..79b23d4c0258 --- /dev/null +++ b/.github/scripts/download-bundled/jit-ir.sh @@ -0,0 +1,36 @@ +#!/bin/sh +set -ex +cd "$(dirname "$0")/../../.." + +tmp_dir=/tmp/php-src-download-bundled/jit-ir +rm -rf "$tmp_dir" + +revision=a098f9ed6c2f1c2852d6c0921283212aafb4afed + +git clone --depth 1 --revision="$revision" https://github.com/dstogov/ir.git "$tmp_dir" + +rm -rf ext/opcache/jit/ir +cp -R "$tmp_dir" ext/opcache/jit/ir + +cd ext/opcache/jit/ir + +# remove unneeded files +rm -r .git +rm -r .github +rm -r bench +rm -r examples +rm -r tests +rm -r tools +rm README.md +rm TODO +rm ir.g +rm ir_cpuinfo.c +rm ir_emit_c.c +rm ir_emit_llvm.c +rm ir_load.c +rm ir_load_llvm.c +rm ir_main.c +rm ir_mem2ssa.c + +# add extra files +git restore README diff --git a/.github/workflows/verify-bundled-files.yml b/.github/workflows/verify-bundled-files.yml index 473d6e2d8f4d..f36317473110 100644 --- a/.github/workflows/verify-bundled-files.yml +++ b/.github/workflows/verify-bundled-files.yml @@ -5,6 +5,7 @@ on: paths: &paths - '.github/scripts/download-bundled/**' - 'Zend/asm/**' + - 'ext/opcache/jit/ir/**' - 'ext/pcre/pcre2lib/**' - 'ext/uri/uriparser/**' pull_request: @@ -34,6 +35,9 @@ jobs: 'boost-context': - '.github/scripts/download-bundled/boost-context.*' - 'Zend/asm/**' + 'jit-ir': + - '.github/scripts/download-bundled/jit-ir.*' + - 'ext/opcache/jit/ir/**' pcre2: - '.github/scripts/download-bundled/pcre2.*' - 'ext/pcre/pcre2lib/**' @@ -50,6 +54,15 @@ jobs: echo "::group::Verify files" .github/scripts/test-directory-unchanged.sh Zend/asm echo "::endgroup::" + - name: 'JIT IR' + if: ${{ !cancelled() && (steps.changes.outputs.jit-ir == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }} + run: | + echo "::group::Download" + .github/scripts/download-bundled/jit-ir.sh + echo "::endgroup::" + echo "::group::Verify files" + .github/scripts/test-directory-unchanged.sh 'ext/opcache/jit/ir' + echo "::endgroup::" - name: PCRE2 if: ${{ !cancelled() && (steps.changes.outputs.pcre2 == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }} run: | From c1ef6497704c5b2abc85e0e4d7f091a7aa8dd239 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc <365207+arnaud-lb@users.noreply.github.com> Date: Tue, 29 Sep 2026 13:01:40 +0200 Subject: [PATCH 2/4] Apply batched suggestions Co-authored-by: Arnaud Le Blanc <365207+arnaud-lb@users.noreply.github.com> --- .github/scripts/download-bundled/jit-ir.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/download-bundled/jit-ir.sh b/.github/scripts/download-bundled/jit-ir.sh index 79b23d4c0258..1fe9556b8804 100755 --- a/.github/scripts/download-bundled/jit-ir.sh +++ b/.github/scripts/download-bundled/jit-ir.sh @@ -5,7 +5,7 @@ cd "$(dirname "$0")/../../.." tmp_dir=/tmp/php-src-download-bundled/jit-ir rm -rf "$tmp_dir" -revision=a098f9ed6c2f1c2852d6c0921283212aafb4afed +revision=00bec1ca490b8bc51f636a42040c5e9f64c1a91b git clone --depth 1 --revision="$revision" https://github.com/dstogov/ir.git "$tmp_dir" @@ -15,7 +15,7 @@ cp -R "$tmp_dir" ext/opcache/jit/ir cd ext/opcache/jit/ir # remove unneeded files -rm -r .git +rm -rf .git rm -r .github rm -r bench rm -r examples From d947a70ab36c80103dee89f7c902e8456988a32c Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Tue, 29 Sep 2026 13:04:57 +0200 Subject: [PATCH 3/4] WS --- .github/scripts/download-bundled/jit-ir.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/download-bundled/jit-ir.sh b/.github/scripts/download-bundled/jit-ir.sh index 1fe9556b8804..326a4a3a2fef 100755 --- a/.github/scripts/download-bundled/jit-ir.sh +++ b/.github/scripts/download-bundled/jit-ir.sh @@ -5,7 +5,7 @@ cd "$(dirname "$0")/../../.." tmp_dir=/tmp/php-src-download-bundled/jit-ir rm -rf "$tmp_dir" -revision=00bec1ca490b8bc51f636a42040c5e9f64c1a91b +revision=00bec1ca490b8bc51f636a42040c5e9f64c1a91b git clone --depth 1 --revision="$revision" https://github.com/dstogov/ir.git "$tmp_dir" From 7b24846663aa5394ffedd4880010a6dd7c888238 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Tue, 29 Sep 2026 13:05:12 +0200 Subject: [PATCH 4/4] Remove fuzz directory --- .github/scripts/download-bundled/jit-ir.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/scripts/download-bundled/jit-ir.sh b/.github/scripts/download-bundled/jit-ir.sh index 326a4a3a2fef..fed7a9938d21 100755 --- a/.github/scripts/download-bundled/jit-ir.sh +++ b/.github/scripts/download-bundled/jit-ir.sh @@ -21,6 +21,7 @@ rm -r bench rm -r examples rm -r tests rm -r tools +rm -r fuzz rm README.md rm TODO rm ir.g