Skip to content

Commit

Permalink
Merge pull request #1 from phalcon/development
Browse files Browse the repository at this point in the history
1.0.1
  • Loading branch information
sergeyklay authored Mar 31, 2017
2 parents 409e9e5 + 0d3ed1f commit 6c5a665
Show file tree
Hide file tree
Showing 30 changed files with 792 additions and 167 deletions.
205 changes: 205 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
version: 1.0.1-{build}

build: false
environment:
matrix:
- PHP_TARGET: 5.5
PHP_VC: 11
PHP_MAJOR: 5
PHP_TYPE: "Win32"
- PHP_TARGET: 5.5
PHP_VC: 11
PHP_MAJOR: 5
PHP_TYPE: "nts-Win32"
- PHP_TARGET: 5.6
PHP_VC: 11
PHP_MAJOR: 5
PHP_TYPE: "Win32"
- PHP_TARGET: 5.6
PHP_VC: 11
PHP_MAJOR: 5
PHP_TYPE: "nts-Win32"
- PHP_TARGET: 7.0
PHP_VC: 14
PHP_MAJOR: 7
PHP_TYPE: "Win32"
- PHP_TARGET: 7.0
PHP_VC: 14
PHP_MAJOR: 7
PHP_TYPE: "nts-Win32"
- PHP_TARGET: 7.1
PHP_VC: 14
PHP_MAJOR: 7
PHP_TYPE: "Win32"
- PHP_TARGET: 7.1
PHP_VC: 14
PHP_MAJOR: 7
PHP_TYPE: "nts-Win32"
NO_INTERACTION: 1
PHP_SDK: c:\php-sdk
PHP_DEVPACK: c:\php-devpack

matrix:
fast_finish: true
allow_failures:
- platform: x64

clone_depth: 1
clone_folder: c:\projects\parser

branches:
only:
- master
- development
init:
- SET PATH=C:\Program Files (x86)\MSBuild\%PHP_VC%.0\Bin;C:\Program Files\OpenSSL;C:\php;C:\php-sdk\bin;C:\php-devpack;%PATH%
- SET PATH=C:\Program Files (x86)\Microsoft Visual Studio %PHP_VC%.0\VC;C:\Program Files (x86)\Microsoft Visual Studio %PHP_VC%.0\VC\bin;%PATH%
- SET ANSICON=121x90 (121x90)

os: Windows Server 2012 R2
platform:
- x86
- x64

install:
# ==================================================
- echo Setting PHP version...
# ==================================================
- ps: Start-FileDownload 'http://windows.php.net/downloads/releases/sha1sum.txt'
- ps: $env:PHP_VERSION=type sha1sum.txt | where { $_ -match "php-(${env:PHP_TARGET}\.\d+)-src" } | foreach { $matches[1] }
- ps: $env:PHP_PLATFORM="${env:PHP_SDK}\phpdev\vc${env:PHP_VC}\${env:PLATFORM}"
- ps: $env:PHP_SRC="${env:PHP_PLATFORM}\php-${env:PHP_VERSION}-src"
- ps: >-
If ($env:PLATFORM -eq 'x86') {
If ($env:PHP_TYPE -Match "nts-Win32") {
$env:RELEASE_FOLDER="Release"
$env:PHP_CONFIGURE_FLAGS="--disable-all --enable-cli --enable-zephir_parser=shared --disable-zts"
} Else {
$env:RELEASE_FOLDER="Release_TS"
$env:PHP_CONFIGURE_FLAGS="--disable-all --enable-cli --enable-zephir_parser=shared"
}
} else {
If ($env:PHP_TYPE -Match "nts-Win32") {
$env:RELEASE_FOLDER="x64\Release"
$env:PHP_CONFIGURE_FLAGS="--disable-all --enable-cli --enable-zephir_parser=shared --disable-zts"
} Else {
$env:RELEASE_FOLDER="x64\Release_TS"
$env:PHP_CONFIGURE_FLAGS="--disable-all --enable-cli --enable-zephir_parser=shared"
}
}
If ($env:PHP_VC -eq '11') {
$env:VSCOMNTOOLS=$env:VS110COMNTOOLS
} elseif ($env:PHP_VC -eq '14') {
$env:VSCOMNTOOLS=$env:VS140COMNTOOLS
}
If ($env:PLATFORM -eq 'x64') {
$env:ARCH='x86_amd64'
} Else {
$env:ARCH='x86'
}
If ($env:PHP_TARGET -eq '5.5') {
$env:PHP_DEPS_URL="http://windows.php.net/downloads/php-sdk/archives/deps-${env:PHP_TARGET}-vc${env:PHP_VC}-${env:PLATFORM}.7z"
} Else {
$env:PHP_DEPS_URL="http://windows.php.net/downloads/php-sdk/deps-${env:PHP_TARGET}-vc${env:PHP_VC}-${env:PLATFORM}.7z"
}
# ==================================================
- echo Initializing Build
# ==================================================
- mkdir %PHP_SDK% && cd %PHP_SDK%
- ps: (new-object net.webclient).DownloadFile('http://windows.php.net/downloads/php-sdk/php-sdk-binary-tools-20110915.zip', 'C:\php-sdk.zip')
- 7z.exe x C:\php-sdk.zip | FIND /V "ing "
- phpsdk_buildtree phpdev
- ps: Rename-Item ${env:PHP_SDK}\phpdev\vc9 ${env:PHP_SDK}\phpdev\vc${env:PHP_VC}
- mkdir %PHP_SRC%
# ==================================================
- echo Install PHP Dev pack
# ==================================================
- cd C:\
- ps: (new-object net.webclient).DownloadFile('http://windows.php.net/downloads/releases/php-devel-pack-' + ${env:PHP_VERSION} + '-Win32-VC' + ${env:PHP_VC} + '-' + ${env:PLATFORM} + '.zip', 'C:\php-dev.zip')
- 7z.exe x php-dev.zip | FIND /V "ing "
- ps: Rename-Item "php-${env:PHP_VERSION}-devel-VC${env:PHP_VC}-${env:PLATFORM}" C:\php-devpack
# ==================================================
- echo Downloading and preparing PHP source code
# ==================================================
- git clone -b PHP-%PHP_TARGET% --depth 1 https://github.com/php/php-src %PHP_SRC%
- cd %PHP_PLATFORM%
- ps: (new-object net.webclient).DownloadFile(${env:PHP_DEPS_URL}, 'C:\php-sdk-deps.7z')
- 7z.exe x C:\php-sdk-deps.7z | FIND /V "ing "
- cd %PHP_SDK%
- phpsdk_setvars
- '"%VSCOMNTOOLS%\VsDevCmd" %PLATFORM%'
- vcvarsall %ARCH%
# ==================================================
- echo Preparing extension to build
# ==================================================
- mkdir %PHP_SRC%\ext\zephir_parser
- xcopy /s /q c:\projects\parser\*.* %PHP_SRC%\ext\zephir_parser
- cd %PHP_SRC%\ext\zephir_parser
- cmd /c build-win32-php%PHP_MAJOR%.bat
# ==================================================
- echo Build PHP with enabled Zephir Parser
# ==================================================
- cd %PHP_SRC%
- buildconf
- configure %PHP_CONFIGURE_FLAGS%
- nmake 2> compile-errors.log 1> compile.log
- echo extension=%PHP_SRC%\%RELEASE_FOLDER%\php_zephir_parser.dll >> C:\Windows\php.ini
- SET PATH=%PHP_SRC%\%RELEASE_FOLDER%;%PATH%
- php -v
- php --ri "Zephir Parser"

build_script:
# ==================================================
- echo Creating package to zip
# ==================================================
- mkdir %APPVEYOR_BUILD_FOLDER%\package
- cd %APPVEYOR_BUILD_FOLDER%\package
# dll
- cp %PHP_SRC%\%RELEASE_FOLDER%\php_zephir_parser.dll .\
# docs
- cp %APPVEYOR_BUILD_FOLDER%\LICENSE .\
- cp %APPVEYOR_BUILD_FOLDER%\CREDITS .\
- cp %APPVEYOR_BUILD_FOLDER%\VERSION .\
- cp %APPVEYOR_BUILD_FOLDER%\CHANGELOG.md .\
- cp %APPVEYOR_BUILD_FOLDER%\CONTRIBUTING.md .\
- cp %APPVEYOR_BUILD_FOLDER%\README.md .\
- cp %APPVEYOR_BUILD_FOLDER%\README.WIN32-BUILD-SYSTEM .\

after_build:
# ==================================================
- echo Collect artifacts and zip
# ==================================================
- cd %APPVEYOR_BUILD_FOLDER%\package
- ps: 7z a zephir_parser_${env:PLATFORM}_vc${env:PHP_VC}_php${env:PHP_VERSION}_${env:APPVEYOR_BUILD_VERSION}.zip *.*
- ps: mv *.zip ${env:APPVEYOR_BUILD_FOLDER}\

on_failure:
- 'dir'
- ps: >-
if (Test-Path -Path ${env:PHP_SRC}\compile-errors.log) {
type ${env:PHP_SRC}\compile-errors.log
}
if (Test-Path -Path ${env:PHP_SRC}\compile.log) {
type ${env:PHP_SRC}\compile.log
}
if (Test-Path -Path ${env:PHP_SRC}\configure.js) {
type ${env:PHP_SRC}\configure.js
}
on_success:
- 'dir'

artifacts:
- path: '.\*.zip'
type: zip
name: ZephirParser

notifications:
- provider: Email
to:
- [email protected]
subject: "Build Zephir Parser [{{status}}]"
on_build_status_changed: true

9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,12 @@ indent_style = space

[*.md]
indent_style = space

[*.xml]
indent_style = space

[*.json]
indent_style = space

[*.w32]
indent_style = space
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.c linguist-language=C
*.h linguist-language=C
*.w32 linguist-language=JavaScript
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
> Questions should go to https://forum.zephir-lang.com
> Documentation issues should go to https://github.com/phalcon/zephir-docs
### Expected and Actual Behavior

> **Describe what you are trying to achieve and what goes wrong.**
> Provide output if related. Provide coredump if any. Use https://github.com/phalcon/cphalcon/wiki/Generating-a-backtrace as reference
```php
// paste output here
```
> Provide minimal script to reproduce the issue
```php
// paste code
```
### Details

* Zephir Parser version: (`php --ri "Zephir Parser""`)
* PHP Version: (`php -v`)
* Operating System:
* Installation type: Compiling from source || installing via package manager
* Compiller version (if any):
* Zephir version (if any):
* Other related info:
14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Hello!

* Type: bug fix | new feature | code quality | documentation
* Link to issue:

**In raising this pull request, I confirm the following (please check boxes):**

- [ ] I have read and understood the [Contributing Guidelines](https://github.com/phalcon/php-zephir-parser/blob/master/CONTRIBUTING.md)?
- [ ] I have checked that another pull request for this purpose does not exist.
- [ ] I wrote some tests for this PR.

Small description of change:

Thanks
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,6 @@ parser/parser.php5.out
parser/parser.php7.c
parser/parser.php7.h
parser/parser.php7.out

vendor
composer.lock
11 changes: 6 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ dist: trusty
sudo: false

php:
- 5.4
- 5.5
- 5.6
- 7.0
Expand All @@ -23,18 +22,18 @@ env:
- LIBRARY_PATH="$TRAVIS_BUILD_DIR/build/lib":$LIBRARY_PATH
- C_INCLUDE_PATH="$TRAVIS_BUILD_DIR/build/include"
matrix:
- CC="ccache gcc" CFLAGS="-g3 -O0 -fno-delete-null-pointer-checks -Wall -fvisibility=hidden"
- CC="ccache clang" CFLAGS="-g3 -O0 -fcolor-diagnostics"
- CC="ccache gcc" CFLAGS="-g3 -O0 -fno-delete-null-pointer-checks -Wall -std=gnu90 -fvisibility=hidden"
- CC="ccache clang" CFLAGS="-g3 -O0 -fcolor-diagnostics -Wall -std=gnu90"

matrix:
fast_finish: true
allow_failures:
- php: nightly
include:
- env: CC="ccache gcc" CFLAGS="-g3 -O0 -fno-delete-null-pointer-checks -Wall -fvisibility=hidden"
- env: CC="ccache gcc" CFLAGS="-g3 -O0 -fno-delete-null-pointer-checks -Wall -std=gnu90 -fvisibility=hidden"
php: nightly
compiler: gcc
- env: CC="ccache clang" CFLAGS="-g3 -O0 -fcolor-diagnostics"
- env: CC="ccache clang" CFLAGS="-g3 -O0 -fcolor-diagnostics -Wall -std=gnu90"
php: nightly
compiler: clang

Expand All @@ -49,12 +48,14 @@ cache:

install:
- bash ./tests/ci/install-travis
- composer --prefer-source install

before_install:
- if [[ ! -z "${GH_TOKEN}" ]]; then composer config github-oauth.github.com ${GH_TOKEN}; echo "Configured Github token"; fi;

script:
- php --ri "Zephir Parser"
- valgrind --read-var-info=yes --error-exitcode=1 --fullpath-after= --track-origins=yes --leak-check=full ./vendor/bin/phpunit -c phpunit.xml.dist --debug tests/

notifications:
email:
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## 1.0.1 - 2017-03-31
### Added
- Added script to build development version (Linux)
- Added ability to compile extension for PHP 7 (Windows)
- Added Windows manual (Windows)

### Changed
- Optimize build to produce smaller module
- Improved Win32 build by providing separated `bat` file (Windows)
- Improved build and tests on Appveyor (Windows)

### Fixed
- Fixed compiler warnings on build lemon
- Removing unused structures
- Removing unused variables

## 1.0.0 - 2017-03-26
### Added
- Initial stable release
Loading

0 comments on commit 6c5a665

Please sign in to comment.