-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
342 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
{ | ||
"name": "colopl_timeshifter", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-vscode.cpptools", | ||
"ms-vscode.cpptools-extension-pack", | ||
"maelvalais.autoconf" | ||
] | ||
} | ||
}, | ||
"dockerComposeFile": "../compose.yaml", | ||
"service": "dev", | ||
"workspaceFolder": "/usr/src/php/ext/extension" | ||
"name": "pskel (for Codespaces)", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-vscode.cpptools", | ||
"ms-vscode.cpptools-extension-pack", | ||
"maelvalais.autoconf", | ||
"ms-azuretools.vscode-docker", | ||
"editorconfig.editorconfig" | ||
] | ||
} | ||
}, | ||
"dockerComposeFile": "./../compose.yaml", | ||
"service": "shell" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "pskel (for Local)", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-vscode.cpptools", | ||
"ms-vscode.cpptools-extension-pack", | ||
"maelvalais.autoconf", | ||
"ms-azuretools.vscode-docker", | ||
"editorconfig.editorconfig" | ||
] | ||
} | ||
}, | ||
"dockerComposeFile": "./../../compose.yaml", | ||
"service": "shell", | ||
"mounts": [ | ||
{ | ||
"type": "bind", | ||
"source": "./", | ||
"target": "/workspace/pskel" | ||
} | ||
], | ||
"workspaceFolder": "/workspace/pskel" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
.git | ||
**/.git | ||
**/README.md | ||
**/LICENSE | ||
**/.editorconfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# https://editorconfig.org/ | ||
|
||
root = true | ||
|
||
[*] | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
end_of_line = lf | ||
charset = utf-8 | ||
tab_width = 4 | ||
|
||
[{*.{awk,bat,c,cpp,d,dasc,h,l,re,skl,w32,y},Makefile*}] | ||
indent_size = 4 | ||
indent_style = tab | ||
|
||
[*.{dtd,html,inc,php,phpt,rng,wsdl,xml,xsd,xsl}] | ||
indent_size = 4 | ||
indent_style = space | ||
|
||
[*.{ac,m4,sh,yml}] | ||
indent_size = 2 | ||
indent_style = space | ||
|
||
[*.md] | ||
indent_style = space | ||
max_line_length = 80 | ||
|
||
[COMMIT_EDITMSG] | ||
indent_size = 4 | ||
indent_style = space | ||
max_line_length = 80 | ||
|
||
[*.patch] | ||
trim_trailing_whitespace = false | ||
|
||
[*.json] | ||
indent_size = 2 | ||
indent_style = space | ||
|
||
[compose.yaml] | ||
indent_size = 2 | ||
indent_style = space | ||
|
||
[Dockerfile] | ||
indent_size = 2 | ||
indent_style = space |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "Linux", | ||
"includePath": [ | ||
"${workspaceFolder}/**", | ||
"/usr/local/include/php", | ||
"/usr/local/include/php/TSRM", | ||
"/usr/local/include/php/Zend", | ||
"/usr/local/include/php/ext", | ||
"/usr/local/include/php/include", | ||
"/usr/local/include/php/main", | ||
"/usr/local/include/php/sapi" | ||
], | ||
"defines": [], | ||
"compilerPath": "/usr/bin/gcc", | ||
"cStandard": "c99" | ||
} | ||
], | ||
"version": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"files.associations": { | ||
"*.phpt": "php", | ||
"*.c": "c", | ||
"*.h": "c" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,129 +1,46 @@ | ||
ARG PLATFORM=${BUILDPLATFORM:-linux/amd64} | ||
ARG IMAGE=php | ||
ARG TAG=8.3-cli | ||
ARG TAG=8.3-zts-bookworm | ||
|
||
FROM ${IMAGE}:${TAG} | ||
FROM --platform=${PLATFORM} ${IMAGE}:${TAG} | ||
|
||
ARG PSKEL_SKIP_DEBUG="" | ||
ARG PSKEL_EXTRA_CONFIGURE_OPTIONS="" | ||
COPY ./pskel.sh /usr/local/bin/pskel | ||
|
||
ENV USE_ZEND_ALLOC=0 | ||
ENV USE_TRACKED_ALLOC=1 | ||
ENV ZEND_DONT_UNLOAD_MODULES=1 | ||
ENV PSKEL_SKIP_DEBUG=${PSKEL_SKIP_DEBUG} | ||
ENV PSKEL_EXTRA_CONFIGURE_OPTIONS=${PSKEL_EXTRA_CONFIGURE_OPTIONS} | ||
|
||
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer | ||
RUN docker-php-source extract \ | ||
&& if test -f "/etc/debian_version"; then \ | ||
echo "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm main" > "/etc/apt/sources.list.d/llvm.list" \ | ||
&& echo "deb-src http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm main" >> "/etc/apt/sources.list.d/llvm.list" \ | ||
&& curl -fsSL "https://apt.llvm.org/llvm-snapshot.gpg.key" -o "/etc/apt/trusted.gpg.d/apt.llvm.org.asc" \ | ||
&& apt-get update \ | ||
&& DEBIAN_FRONTEND="noninteractive" apt-get install -y "bison" "re2c" "zlib1g-dev" "libsqlite3-dev" "libxml2-dev" \ | ||
"autoconf" "pkg-config" "make" "gcc" "valgrind" "git" \ | ||
"clang-20" \ | ||
&& update-alternatives --install "/usr/bin/clang" clang "/usr/bin/clang-20" 100 \ | ||
&& update-alternatives --install "/usr/bin/clang++" clang++ "/usr/bin/clang++-20" 100; \ | ||
else \ | ||
apk add --no-cache "bison" "zlib-dev" "sqlite-dev" "libxml2-dev" \ | ||
"autoconf" "pkgconfig" "make" "gcc" "g++" "valgrind" "valgrind-dev" \ | ||
"musl-dev" "git"; \ | ||
fi | ||
|
||
COPY ./ext /ext | ||
|
||
# -------- | ||
|
||
RUN if test -f "/etc/debian_version"; then \ | ||
apt-get update && \ | ||
DEBIAN_FRONTEND="noninteractive" apt-get install -y \ | ||
"build-essential" "bison" "valgrind" "llvm" "clang" "zlib1g-dev" "libsqlite3-dev" "git" "unzip" && \ | ||
if test "${PSKEL_SKIP_DEBUG}" = ""; then \ | ||
docker-php-source extract && \ | ||
cd "/usr/src/php" && \ | ||
CFLAGS="-fpic -fpie -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-pie" ./configure --disable-all \ | ||
--includedir="/usr/local/include/gcc-valgrind-php" --program-prefix="gcc-valgrind-" \ | ||
--disable-cgi --disable-fpm --enable-cli \ | ||
--enable-mysqlnd --enable-pdo --with-pdo-mysql --with-pdo-sqlite \ | ||
--enable-debug --without-pcre-jit "$(php -r "echo PHP_ZTS === 1 ? '--enable-zts' : '';")" \ | ||
--with-valgrind \ | ||
${PSKEL_EXTRA_CONFIGURE_OPTIONS} \ | ||
--enable-option-checking=fatal && \ | ||
make -j$(nproc) && \ | ||
make install && \ | ||
cd - && \ | ||
docker-php-source delete && \ | ||
docker-php-source extract && \ | ||
cd "/usr/src/php" && \ | ||
CC=clang CXX=clang++ CFLAGS="-fsanitize=memory -fno-sanitize-recover -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-fsanitize=memory" ./configure \ | ||
--includedir="/usr/local/include/clang-msan-php" --program-prefix="clang-msan-" \ | ||
--disable-cgi --disable-all --disable-fpm --enable-cli \ | ||
--enable-mysqlnd --enable-pdo --with-pdo-mysql --with-pdo-sqlite \ | ||
--enable-debug --without-pcre-jit "$(php -r "echo PHP_ZTS === 1 ? '--enable-zts' : '';")" \ | ||
--enable-memory-sanitizer \ | ||
${PSKEL_EXTRA_CONFIGURE_OPTIONS} \ | ||
--enable-option-checking=fatal && \ | ||
make -j$(nproc) && \ | ||
make install && \ | ||
cd - && \ | ||
docker-php-source delete && \ | ||
docker-php-source extract && \ | ||
cd "/usr/src/php" && \ | ||
CC=clang CXX=clang++ CFLAGS="-fsanitize=address -fno-sanitize-recover -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-fsanitize=address" ./configure \ | ||
--includedir="/usr/local/include/clang-asan-php" --program-prefix="clang-asan-" \ | ||
--disable-cgi --disable-all --disable-fpm --enable-cli \ | ||
--enable-mysqlnd --enable-pdo --with-pdo-mysql --with-pdo-sqlite \ | ||
--enable-debug --without-pcre-jit "$(php -r "echo PHP_ZTS === 1 ? '--enable-zts' : '';")" \ | ||
--enable-address-sanitizer \ | ||
${PSKEL_EXTRA_CONFIGURE_OPTIONS} \ | ||
--enable-option-checking=fatal && \ | ||
make -j$(nproc) && \ | ||
make install && \ | ||
cd - && \ | ||
docker-php-source delete && \ | ||
docker-php-source extract && \ | ||
cd "/usr/src/php" && \ | ||
CC=clang CXX=clang++ CFLAGS="-fsanitize=undefined -fno-sanitize-recover -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-fsanitize=undefined" ./configure \ | ||
--includedir="/usr/local/include/clang-ubsan-php" --program-prefix="clang-ubsan-" \ | ||
--disable-cgi --disable-all --disable-fpm --enable-cli \ | ||
--enable-mysqlnd --enable-pdo --with-pdo-mysql --with-pdo-sqlite \ | ||
--enable-debug --without-pcre-jit "$(php -r "echo PHP_ZTS === 1 ? '--enable-zts' : '';")" \ | ||
--enable-undefined-sanitizer \ | ||
${PSKEL_EXTRA_CONFIGURE_OPTIONS} \ | ||
--enable-option-checking=fatal && \ | ||
make -j$(nproc) && \ | ||
make install && \ | ||
cd - && \ | ||
docker-php-source delete && \ | ||
docker-php-source extract && \ | ||
cd "/usr/src/php" && \ | ||
CFLAGS="-fpic -fpie -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-pie" ./configure --disable-all \ | ||
--includedir="/usr/local/include/debug-php" --program-prefix="debug-" \ | ||
--disable-cgi --disable-fpm --enable-cli \ | ||
--enable-mysqlnd --enable-pdo --with-pdo-mysql --with-pdo-sqlite \ | ||
--enable-debug "$(php -r "echo PHP_ZTS === 1 ? '--enable-zts' : '';")" \ | ||
${PSKEL_EXTRA_CONFIGURE_OPTIONS} \ | ||
--enable-option-checking=fatal && \ | ||
make -j$(nproc) && \ | ||
make install && \ | ||
cd - && \ | ||
docker-php-source delete; \ | ||
fi; \ | ||
elif test -f "/etc/alpine-release"; then \ | ||
apk add --no-cache ${PHPIZE_DEPS} "bison" "valgrind" "valgrind-dev" "zlib-dev" "sqlite-dev" "git" "unzip" && \ | ||
if test "${PSKEL_SKIP_DEBUG}" = ""; then \ | ||
docker-php-source extract && \ | ||
cd "/usr/src/php" && \ | ||
CFLAGS="-fpic -fpie -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-pie" ./configure --disable-all \ | ||
--includedir="/usr/local/include/gcc-valgrind-php" --program-prefix="gcc-valgrind-" \ | ||
--disable-cgi --disable-fpm --enable-cli \ | ||
--enable-mysqlnd --enable-pdo --with-pdo-mysql --with-pdo-sqlite \ | ||
--enable-debug --without-pcre-jit "$(php -r "echo PHP_ZTS === 1 ? '--enable-zts' : '';")" \ | ||
--with-valgrind \ | ||
${PSKEL_EXTRA_CONFIGURE_OPTIONS} \ | ||
--enable-option-checking=fatal && \ | ||
make -j$(nproc) && \ | ||
make install && \ | ||
cd - && \ | ||
docker-php-source delete && \ | ||
docker-php-source extract && \ | ||
cd "/usr/src/php" && \ | ||
CFLAGS="-fpic -fpie -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-pie" ./configure --disable-all \ | ||
--includedir="/usr/local/include/debug-php" --program-prefix="debug-" \ | ||
--disable-cgi --disable-fpm --enable-cli \ | ||
--enable-mysqlnd --enable-pdo --with-pdo-mysql --with-pdo-sqlite \ | ||
--enable-debug "$(php -r "echo PHP_ZTS === 1 ? '--enable-zts' : '';")" \ | ||
${PSKEL_EXTRA_CONFIGURE_OPTIONS} \ | ||
--enable-option-checking=fatal && \ | ||
make -j$(nproc) && \ | ||
make install && \ | ||
cd - && \ | ||
docker-php-source delete; \ | ||
fi; \ | ||
fi && \ | ||
docker-php-source extract | ||
apt-get update \ | ||
&& apt-get install -y "unzip"; \ | ||
else \ | ||
apk add --no-cache "unzip"; \ | ||
fi | ||
|
||
WORKDIR "/usr/src/php" | ||
ENV COMPOSER_ROOT_VERSION=9.9.9-dev | ||
COPY --from=composer:latest "/usr/bin/composer" "/usr/bin/composer" | ||
|
||
COPY ./ext /ext | ||
COPY ./ /project | ||
|
||
COPY ./ci.sh /usr/bin/ci | ||
RUN ln -s "/project/library_test.sh" "/usr/local/bin/library_test" |
Oops, something went wrong.