Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .github/scripts/download-bundled/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!*.patch
41 changes: 41 additions & 0 deletions .github/scripts/download-bundled/boost-context.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/sh
set -ex
cd "$(dirname "$0")/../../.."

tmp_dir=/tmp/php-src-download-bundled/boost-context
rm -rf "$tmp_dir"

revision=refs/tags/boost-1.86.0

git clone --depth 1 --revision="$revision" https://github.com/boostorg/context.git "$tmp_dir"

rm -rf Zend/asm
cp -R "$tmp_dir"/src/asm Zend/asm

cd Zend/asm

# remove unneeded files
rm jump_arm_aapcs_pe_armasm.asm
rm jump_i386_ms_pe_clang_gas.S
rm jump_i386_ms_pe_gas.asm
rm jump_i386_x86_64_sysv_macho_gas.S
rm jump_ppc32_ppc64_sysv_macho_gas.S
rm jump_x86_64_ms_pe_clang_gas.S
rm make_arm_aapcs_pe_armasm.asm
rm make_i386_ms_pe_clang_gas.S
rm make_i386_ms_pe_gas.asm
rm make_i386_x86_64_sysv_macho_gas.S
rm make_ppc32_ppc64_sysv_macho_gas.S
rm make_x86_64_ms_pe_clang_gas.S
rm ontop_*.S
rm ontop_*.asm
rm tail_ontop_ppc32_sysv.cpp

# move renamed files
# GH-13896 introduced these 2 files named as .S but since https://github.com/boostorg/context/pull/265 they are named as .asm
mv jump_x86_64_ms_pe_gas.asm jump_x86_64_ms_pe_gas.S
mv make_x86_64_ms_pe_gas.asm make_x86_64_ms_pe_gas.S

# add extra files
git restore LICENSE
git restore save_xmm_x86_64_ms_masm.asm # added in GH-18352, not an upstream boost.context file
7 changes: 5 additions & 2 deletions .github/scripts/download-bundled/pcre2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
set -ex
cd "$(dirname "$0")/../../.."

tmp_dir=/tmp/php-src-download-bundled/pcre2
rm -rf "$tmp_dir"

revision=refs/tags/pcre2-10.44

git clone --depth 1 --recurse-submodules --revision="$revision" https://github.com/PCRE2Project/pcre2.git /tmp/php-src-bundled/pcre2
git clone --depth 1 --recurse-submodules --revision="$revision" https://github.com/PCRE2Project/pcre2.git "$tmp_dir"

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

cd ext/pcre/pcre2lib

Expand Down
14 changes: 14 additions & 0 deletions .github/scripts/download-bundled/uriparser.config.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/ext/uri/uriparser/src/UriConfig.h b/ext/uri/uriparser/src/UriConfig.h
index b9a85a8..ab78b96 100644
--- a/ext/uri/uriparser/src/UriConfig.h
+++ b/ext/uri/uriparser/src/UriConfig.h
@@ -41,7 +41,9 @@

# define PACKAGE_VERSION "@PROJECT_VERSION@"

+/*
#cmakedefine HAVE_WPRINTF
#cmakedefine HAVE_REALLOCARRAY
+*/

#endif /* !defined(URI_CONFIG_H) */
24 changes: 24 additions & 0 deletions .github/scripts/download-bundled/uriparser.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh
set -ex
cd "$(dirname "$0")/../../.."

tmp_dir=/tmp/php-src-download-bundled/uriparser
rm -rf "$tmp_dir"

revision=c3b49569f1f25550a16d9a18207e498d77458b27 # refs/tags/uriparser-0.9.9 with https://github.com/uriparser/uriparser/pull/276

git clone --depth 1 --revision="$revision" https://github.com/uriparser/uriparser.git "$tmp_dir"

rm -rf ext/uri/uriparser
mkdir ext/uri/uriparser
cp -R "$tmp_dir"/src ext/uri/uriparser
cp -R "$tmp_dir"/include ext/uri/uriparser
cp "$tmp_dir"/COPYING.BSD-3-Clause ext/uri/uriparser

cd ext/uri/uriparser

# move renamed files
mv src/UriConfig.h.in src/UriConfig.h

# patch customized files
git apply -v ../../../.github/scripts/download-bundled/uriparser.config.patch
11 changes: 7 additions & 4 deletions .github/scripts/test-directory-unchanged.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#!/bin/sh
set -ex

cd "$(dirname "$0")/../../$1"
# use the repo root directory as "--git-dir"
cd "$(dirname "$0")/../.."

dir="$1"

# notify git about untracked (except ignored) files
git add -N .
git add -N "$dir"

# display overview of changed files
git status .
git status "$dir"

# display diff of working directory vs HEAD commit and set exit code
git diff -a --exit-code HEAD .
git diff -a --exit-code HEAD "$dir"
32 changes: 29 additions & 3 deletions .github/workflows/verify-bundled-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ name: Verify Bundled Files
on:
push:
paths: &paths
- '.github/scripts/download-bundled/pcre2.sh'
- '.github/scripts/download-bundled/**'
- 'Zend/asm/**'
- 'ext/pcre/pcre2lib/**'
- 'ext/uri/uriparser/**'
pull_request:
paths: *paths
schedule:
Expand All @@ -23,15 +25,30 @@ jobs:
uses: actions/checkout@v5

- name: Detect changed files
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
uses: dorny/paths-filter@v3
id: changes
with:
base: master
filters: |
'boost-context':
- '.github/scripts/download-bundled/boost-context.*'
- 'Zend/asm/**'
pcre2:
- '.github/scripts/download-bundled/pcre2.sh'
- '.github/scripts/download-bundled/pcre2.*'
- 'ext/pcre/pcre2lib/**'
uriparser:
- '.github/scripts/download-bundled/uriparser.*'
- 'ext/uri/uriparser/**'

- name: 'boost.context'
if: ${{ !cancelled() && (steps.changes.outputs.boost-context == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}
run: |
echo "::group::Download"
.github/scripts/download-bundled/boost-context.sh
echo "::endgroup::"
echo "::group::Verify files"
.github/scripts/test-directory-unchanged.sh Zend/asm
echo "::endgroup::"
- name: PCRE2
if: ${{ !cancelled() && (steps.changes.outputs.pcre2 == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}
run: |
Expand All @@ -41,3 +58,12 @@ jobs:
echo "::group::Verify files"
.github/scripts/test-directory-unchanged.sh ext/pcre/pcre2lib
echo "::endgroup::"
- name: uriparser
if: ${{ !cancelled() && (steps.changes.outputs.uriparser == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}
run: |
echo "::group::Download"
.github/scripts/download-bundled/uriparser.sh
echo "::endgroup::"
echo "::group::Verify files"
.github/scripts/test-directory-unchanged.sh ext/uri/uriparser
echo "::endgroup::"
4 changes: 2 additions & 2 deletions ext/uri/uriparser/src/UriConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
# define PACKAGE_VERSION "@PROJECT_VERSION@"

/*
#define HAVE_WPRINTF
#define HAVE_REALLOCARRAY
#cmakedefine HAVE_WPRINTF
#cmakedefine HAVE_REALLOCARRAY
*/

#endif /* !defined(URI_CONFIG_H) */
47 changes: 0 additions & 47 deletions ext/uri/uriparser/src/UriConfig.h.in

This file was deleted.