Skip to content

Commit d3e6151

Browse files
committed
Verify bundled JIT IR using CI
1 parent 5330e7f commit d3e6151

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/sh
2+
set -ex
3+
cd "$(dirname "$0")/../../.."
4+
5+
tmp_dir=/tmp/php-src-download-bundled/jit-ir
6+
rm -rf "$tmp_dir"
7+
8+
revision=a098f9ed6c2f1c2852d6c0921283212aafb4afed
9+
10+
git clone --depth 1 --revision="$revision" https://github.com/dstogov/ir.git "$tmp_dir"
11+
12+
rm -rf ext/opcache/jit/ir
13+
cp -R "$tmp_dir" ext/opcache/jit/ir
14+
15+
cd ext/opcache/jit/ir
16+
17+
# remove unneeded files
18+
rm -r .git
19+
rm -r .github
20+
rm -r bench
21+
rm -r examples
22+
rm -r tests
23+
rm -r tools
24+
rm README.md
25+
rm TODO
26+
rm ir.g
27+
rm ir_cpuinfo.c
28+
rm ir_emit_c.c
29+
rm ir_emit_llvm.c
30+
rm ir_load.c
31+
rm ir_load_llvm.c
32+
rm ir_main.c
33+
rm ir_mem2ssa.c
34+
35+
# add extra files
36+
git restore README

.github/workflows/verify-bundled-files.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
paths: &paths
66
- '.github/scripts/download-bundled/**'
77
- 'Zend/asm/**'
8+
- 'ext/opcache/jit/ir/**'
89
- 'ext/pcre/pcre2lib/**'
910
- 'ext/uri/uriparser/**'
1011
pull_request:
@@ -34,6 +35,9 @@ jobs:
3435
'boost-context':
3536
- '.github/scripts/download-bundled/boost-context.*'
3637
- 'Zend/asm/**'
38+
'jit-ir':
39+
- '.github/scripts/download-bundled/jit-ir.*'
40+
- 'ext/opcache/jit/ir/**'
3741
pcre2:
3842
- '.github/scripts/download-bundled/pcre2.*'
3943
- 'ext/pcre/pcre2lib/**'
@@ -50,6 +54,15 @@ jobs:
5054
echo "::group::Verify files"
5155
.github/scripts/test-directory-unchanged.sh Zend/asm
5256
echo "::endgroup::"
57+
- name: 'JIT IR'
58+
if: ${{ !cancelled() && (steps.changes.outputs.jit-ir == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}
59+
run: |
60+
echo "::group::Download"
61+
.github/scripts/download-bundled/jit-ir.sh
62+
echo "::endgroup::"
63+
echo "::group::Verify files"
64+
.github/scripts/test-directory-unchanged.sh 'ext/opcache/jit/ir'
65+
echo "::endgroup::"
5366
- name: PCRE2
5467
if: ${{ !cancelled() && (steps.changes.outputs.pcre2 == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}
5568
run: |

0 commit comments

Comments
 (0)