-
Notifications
You must be signed in to change notification settings - Fork 22
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
24 changed files
with
303 additions
and
132 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 |
---|---|---|
@@ -0,0 +1,153 @@ | ||
version: '{branch}.{build}' | ||
branches: | ||
only: | ||
- master | ||
- appveyor | ||
- w32 | ||
- windows | ||
|
||
image: Visual Studio 2017 | ||
|
||
environment: | ||
PHP_SDK_BINARY_TOOLS_VER: php-sdk-2.0.9 | ||
matrix: | ||
- PHP_VER: 7.2 | ||
VC_VER: vc15 | ||
ARCH: x86 | ||
- PHP_VER: 7.2 | ||
VC_VER: vc15 | ||
ARCH: x64 | ||
|
||
install: | ||
- cmd: cinst wget | ||
- cmd: >- | ||
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %ARCH% | ||
build_script: | ||
# json-c | ||
- cmd: >- | ||
cd C:\projects | ||
git clone -b windows https://github.com/jbboehr/json-c.git | ||
cd json-c | ||
mkdir build | ||
cd build | ||
cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=\projects\output -DCMAKE_BUILD_TYPE=Release .. | ||
nmake | ||
nmake install | ||
# libyaml | ||
- cmd: >- | ||
cd C:\projects | ||
git clone https://github.com/yaml/libyaml | ||
cd libyaml | ||
mkdir build | ||
cd build | ||
cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=\projects\output -DCMAKE_BUILD_TYPE=Release .. | ||
nmake | ||
copy /Y *.lib \projects\output\lib\ | ||
copy /Y ..\include\yaml.h \projects\output\include\ | ||
# getopt.h | ||
- cmd: >- | ||
cd C:\projects | ||
git clone https://github.com/jbboehr/Getopt-for-Visual-Studio.git | ||
copy /Y Getopt-for-Visual-Studio\getopt.h output\include\ | ||
# dirent.h | ||
- cmd: >- | ||
cd C:\projects | ||
git clone https://github.com/jbboehr/dirent.git | ||
copy /Y dirent\include\dirent.h output\include | ||
# libmustache | ||
- cmd: >- | ||
cd C:\projects\ | ||
git clone https://github.com/jbboehr/libmustache.git | ||
cd C:\projects\libmustache | ||
git submodule update --init | ||
mkdir build | ||
cd build | ||
SET LIBYAML_PATH=\projects\output | ||
SET LIBJSON_PATH=\projects\output | ||
cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=\projects\output -DCMAKE_BUILD_TYPE=Release .. | ||
nmake | ||
nmake install | ||
- cmd: >- | ||
cd C:\projects\php-mustache | ||
wget https://github.com/OSTC/php-sdk-binary-tools/archive/%PHP_SDK_BINARY_TOOLS_VER%.zip --no-check-certificate -q -O php-sdk-binary-tools-%PHP_SDK_BINARY_TOOLS_VER%.zip | ||
7z x -y php-sdk-binary-tools-%PHP_SDK_BINARY_TOOLS_VER%.zip -oC:\projects | ||
move C:\projects\php-sdk-binary-tools-%PHP_SDK_BINARY_TOOLS_VER% C:\projects\php-sdk | ||
C:\projects\php-sdk\bin\phpsdk_setvars.bat | ||
git clone https://github.com/php/php-src C:\projects\php-src -b PHP-%PHP_VER% --depth=1 | ||
mkdir C:\projects\php-src\ext\mustache | ||
xcopy C:\projects\php-mustache C:\projects\php-src\ext\mustache /s /e /y /q | ||
REM FIXME no PHP 7.2 deps downloads available yet - wget http://windows.php.net/downloads/php-sdk/deps-%PHP_VER%-%VC_VER%-%ARCH%.7z -q | ||
wget http://windows.php.net/downloads/php-sdk/deps-master-%VC_VER%-%ARCH%.7z -q | ||
REM FIXME no PHP 7.2 deps downloads available yet - 7z x -y deps-%PHP_VER%-%VC_VER%-%ARCH%.7z -oC:\projects\php-src | ||
7z x -y deps-master-%VC_VER%-%ARCH%.7z -oC:\projects\php-src | ||
cd C:\projects\php-src | ||
buildconf.bat | ||
configure.bat --disable-all --enable-cli --enable-cgi --enable-zts --enable-json --enable-mustache=shared --with-libmustache=\projects\output --with-prefix=C:\projects\php-mustache\bin --with-php-build=deps | ||
nmake | ||
nmake install | ||
cd C:\projects\php-mustache\bin | ||
echo [PHP] > php.ini | ||
echo extension_dir = "ext" >> php.ini | ||
echo extension=php_mustache.dll >> php.ini | ||
set TEST_PHP_EXECUTABLE=%cd%\php.exe | ||
php -v | ||
php -m | ||
test_script: | ||
- cmd: php.exe /projects/php-src/run-tests.php /projects/php-src/ext/mustache -q --show-diff | ||
artifacts: | ||
- path: bin | ||
name: master | ||
type: zip |
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,30 +1,13 @@ | ||
|
||
ARG_ENABLE("mustache", "Mustache", "no"); | ||
ARG_WITH("libmustache", "libmustache location", "no"); | ||
|
||
if( PHP_MUSTACHE != "no" ) { | ||
EXTENSION('mustache', "\ | ||
php_mustache.cpp \ | ||
mustache_ast.cpp \ | ||
mustache_code.cpp \ | ||
mustache_mustache.cpp \ | ||
mustache_exceptions.cpp \ | ||
mustache_data.cpp \ | ||
mustache_template.cpp \ | ||
mustache_lambda.cpp \ | ||
mustache_lambda_helper.cpp \ | ||
mustache_class_method_lambda.cpp \ | ||
mustache_zend_closure_lambda.cpp", | ||
PHP_MUSTACHE_SHARED, | ||
"-I" + configure_module_dirname + "/mustache/src"); | ||
ADD_SOURCES(configure_module_dirname + "/mustache/src", "\ | ||
mustache.cpp \ | ||
compiler.cpp \ | ||
data.cpp \ | ||
lambda.cpp \ | ||
node.cpp \ | ||
renderer.cpp \ | ||
tokenizer.cpp \ | ||
utils.cpp \ | ||
vm.cpp", "mustache"); | ||
AC_DEFINE('HAVE_MUSTACHE', 1); | ||
if (CHECK_LIB("mustache_static.lib", "mustache", PHP_LIBMUSTACHE + "\\lib") && | ||
CHECK_HEADER_ADD_INCLUDE("mustache_config.h", "CFLAGS_MUSTACHE", PHP_LIBMUSTACHE + "\\include\\mustache" + ";" + PHP_PHP_BUILD + "\\include")) { | ||
EXTENSION('mustache', "php_mustache.cpp mustache_ast.cpp mustache_code.cpp mustache_mustache.cpp mustache_exceptions.cpp mustache_data.cpp mustache_template.cpp mustache_lambda.cpp mustache_lambda_helper.cpp mustache_class_method_lambda.cpp mustache_zend_closure_lambda.cpp", PHP_MUSTACHE_SHARED, "/EHsc /I \"" + PHP_LIBMUSTACHE + "\\include\\mustache" + "\"" + " " + "/I \"" + PHP_LIBMUSTACHE + "\\include" + "\""); | ||
AC_DEFINE('HAVE_MUSTACHE', 1); | ||
} else { | ||
WARNING("mustache not enabled; libraries and headers not found"); | ||
} | ||
} |
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
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
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
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
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
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
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
Oops, something went wrong.