Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/scripts/download-bundled/pcre2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
set -e
cd "$(dirname "$0")/../../.."

commit=b2bd4254b379b9d7dc9a3dda060a7e27009ccdff # 10.46 release

git clone --revision=$commit https://github.com/PCRE2Project/pcre2.git /tmp/php-src-bundled/pcre2

rm -rf ext/pcre/pcre2lib
cp -R /tmp/php-src-bundled/pcre2/src ext/pcre/pcre2lib

cd ext/pcre/pcre2lib
git restore config.h
12 changes: 12 additions & 0 deletions .github/scripts/download-bundled/sljit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
set -e
cd "$(dirname "$0")/../../.."

commit=8d40e0306aacca3596f64a338b5033d2050fc20e

git clone --revision=$commit https://github.com/zherczeg/sljit.git /tmp/php-src-bundled/sljit

rm -rf ext/pcre/pcre2lib/sljit
cp -R /tmp/php-src-bundled/sljit/sljit_src ext/pcre/pcre2lib/sljit

cd ext/pcre/pcre2lib/sljit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
set -e
cd "$(dirname "$0")/../../.."

cd $1
git add . -N && git diff --cached -a --exit-code . && git diff -a --exit-code .
45 changes: 45 additions & 0 deletions .github/workflows/verify-bundled-files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Verify Bundled Files

on:
push:
pull_request:
schedule:
- cron: "0 1 * * *"
workflow_dispatch: ~

permissions:
contents: read

jobs:
VERIFY_BUNDLED_FILES:
name: Verify Bundled Files
runs-on: ubuntu-22.04
steps:
- name: git checkout
uses: actions/checkout@v5

- uses: dorny/paths-filter@v3
id: changes
with:
base: master
filters: |
pcre2:
- 'ext/pcre/pcre2lib/!(sljit/**)/**'
sljit:
- 'ext/pcre/pcre2lib/sljit/**'

- name: PCRE2 - Download
if: ${{ !cancelled() && (steps.changes.outputs.pcre2 == 'true' || (github.event_name != 'push' && github.event_name != 'pull_request')) }}
run: .github/scripts/download-bundled/pcre2.sh

- name: PCRE2 - Verify files
if: ${{ !cancelled() && (steps.changes.outputs.pcre2 == 'true' || (github.event_name != 'push' && github.event_name != 'pull_request')) }}
run: .github/scripts/download-bundled/verify-directory-unchanged.sh ext/pcre/pcre2lib

- name: SLJIT - Download
if: ${{ !cancelled() && (steps.changes.outputs.sljit == 'true' || (github.event_name != 'push' && github.event_name != 'pull_request')) }}
run: .github/scripts/download-bundled/sljit.sh

- name: SLJIT - Verify files
if: ${{ !cancelled() && (steps.changes.outputs.sljit == 'true' || (github.event_name != 'push' && github.event_name != 'pull_request')) }}
run: .github/scripts/download-bundled/verify-directory-unchanged.sh ext/pcre/pcre2lib/sljit
2 changes: 1 addition & 1 deletion ext/pcre/pcre2lib/pcre2_auto_possess.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*************************************************
/*************************************************XXX
* Perl-Compatible Regular Expressions *
*************************************************/

Expand Down
2 changes: 1 addition & 1 deletion ext/pcre/pcre2lib/sljit/sljitConfig.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*XXX
* Stack-less Just-In-Time compiler
*
* Copyright Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
Expand Down
Loading