Skip to content

Commit

Permalink
Merge pull request #2172 from zephir-lang/development
Browse files Browse the repository at this point in the history
Release 0.13.0
  • Loading branch information
AlexNDRmac authored Mar 25, 2021
2 parents 59017de + d89a471 commit 99c026e
Show file tree
Hide file tree
Showing 1,044 changed files with 24,824 additions and 8,749 deletions.
10 changes: 6 additions & 4 deletions .ci/install-zephir-parser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ echo "Install Zephir Parser using version: $ZEPHIR_PARSER_VERSION"

PHP_INI_DIR="$(dirname "$(php -i | grep /.+/conf.d/.+.ini -oE | head -n 1)")"

git clone -b "$ZEPHIR_PARSER_VERSION" \
--depth 1 \
-q https://github.com/phalcon/php-zephir-parser \
php-zephir-parser
if [ ! -d "php-zephir-parser" ]; then
git clone -b "$ZEPHIR_PARSER_VERSION" \
--depth 1 \
-q https://github.com/phalcon/php-zephir-parser \
php-zephir-parser
fi

cd php-zephir-parser || exit 1

Expand Down
14 changes: 3 additions & 11 deletions .ci/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,14 @@
# -u Treat unset variables as an error when substituting.
set -eu

if [ "$(php-config --vernum)" -lt "70200" ]; then
test_suite="Extension_Php70"
else
test_suite="Extension_Php72"
fi

vendor/bin/simple-phpunit --version

php \
-d extension=ext/modules/stub.so \
vendor/bin/simple-phpunit \
vendor/bin/phpunit \
--colors=always \
--bootstrap tests/ext-bootstrap.php \
--testsuite ${test_suite}
--testsuite Extension

php \
vendor/bin/simple-phpunit \
vendor/bin/phpunit \
--colors=always \
--testsuite Zephir
2 changes: 1 addition & 1 deletion .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
if: always()
run: |
php-cs-fixer --version
php-cs-fixer fix --diff --dry-run -v
php-cs-fixer fix --diff --dry-run -v || true
- name: Run Shell Check
if: always()
Expand Down
44 changes: 20 additions & 24 deletions .github/workflows/build-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- development

env:
ZEPHIR_PARSER_VERSION: v1.3.4
ZEPHIR_PARSER_VERSION: v1.3.6

jobs:
linux:
Expand All @@ -31,19 +31,8 @@ jobs:
# - macos-latest

php:
- '7.2'
- '7.3'
- '7.4'

include:
- php: '7.2'
symfony_phpunit: '7.4'

- php: '7.3'
symfony_phpunit: '7.4'

- php: '7.4'
symfony_phpunit: '7.4'
- '8.0'

steps:
- name: Setup Prerequisites
Expand All @@ -61,9 +50,9 @@ jobs:
extensions: gmp, pdo_sqlite, psr, zip
tools: phpize, php-config
coverage: xdebug
# variables_order: https://github.com/phalcon/zephir/pull/1537
# enable_dl: https://github.com/phalcon/zephir/pull/1654
# allow_url_fopen: https://github.com/phalcon/zephir/issues/1713
# variables_order: https://github.com/zephir-lang/zephir/pull/1537
# enable_dl: https://github.com/zephir-lang/zephir/pull/1654
# allow_url_fopen: https://github.com/zephir-lang/zephir/issues/1713
# error_reporting: https://github.com/zendframework/zend-code/issues/160
ini-values: >-
variables_order=EGPCS,
Expand All @@ -74,10 +63,6 @@ jobs:
date.timezone=UTC,
xdebug.max_nesting_level=256
- name: Set Environment Variables
run: |
echo "SYMFONY_PHPUNIT_VERSION=${{ matrix.symfony_phpunit }}" >> $GITHUB_ENV
- name: Checkout Code
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -146,7 +131,7 @@ jobs:
composer config github-oauth.github.com ${{ secrets.COMPOSER_TOKEN }}
fi
- name: Install Project Dependencies
- name: Install Project Dependencies for PHP
run: composer install --prefer-dist --no-interaction --no-ansi --no-progress --no-suggest

- name: Prepare Zephir Executable
Expand Down Expand Up @@ -180,13 +165,24 @@ jobs:
CXXFLAGS="-O0 -ggdb -fprofile-arcs -ftest-coverage"
# Export variables in the subshell to not shadow global variables
( export LDFLAGS CFLAGS CXXFLAGS; zephir compile ) || false
( export LDFLAGS CFLAGS CXXFLAGS; zephir fullclean && zephir generate && cd ext/ && ./install ) || false
- name: Setup Problem Matchers for PHPUnit
run: echo ::add-matcher::${{ runner.tool_cache }}/phpunit.json

- name: Unit Testing
run: .ci/run-tests.sh
- name: Unit Testing - Extension
if: always()
run: |
php \
-d extension=ext/modules/stub.so \
vendor/bin/phpunit \
--colors=always \
--bootstrap tests/ext-bootstrap.php \
--testsuite Extension
- name: Unit Testing - Zephir
if: always()
run: vendor/bin/phpunit --colors=always --testsuite Zephir

- name: Black-box Testing
if: always()
Expand Down
45 changes: 25 additions & 20 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ on:
- development

env:
PARSER_VERSION: 1.3.4
PARSER_RELEASE: 526
PARSER_VERSION: 1.3.6
PARSER_RELEASE: 559
PHP_SDK_VERSION: 2.2.0
PHP_DEVPACK: C:\tools\php-devpack
PHP_SDK_PATH: C:\tools\php-sdk
Expand All @@ -25,21 +25,26 @@ env:
jobs:
windows:
name: "Windows: PHP v${{ matrix.php }}"
runs-on: windows-latest
runs-on: windows-2016

strategy:
fail-fast: false

matrix:
php:
- '7.3'
- '7.4'
#- '8.0'

include:
- php: '7.3'
- php: '7.4'
vc_num: '15'
arch: x64
build_type: nts
symfony_phpunit: '7.4'

#- php: '8.0'
# vc_num: '15'
# arch: x64
# build_type: nts

steps:
- name: Setup PHP
Expand All @@ -48,9 +53,9 @@ jobs:
php-version: ${{ matrix.php }}
extensions: mbstring, fileinfo, gmp, sqlite, pdo_sqlite, psr, zip
coverage: none
# variables_order: https://github.com/phalcon/zephir/pull/1537
# enable_dl: https://github.com/phalcon/zephir/pull/1654
# allow_url_fopen: https://github.com/phalcon/zephir/issues/1713
# variables_order: https://github.com/zephir-lang/zephir/pull/1537
# enable_dl: https://github.com/zephir-lang/zephir/pull/1654
# allow_url_fopen: https://github.com/zephir-lang/zephir/issues/1713
# error_reporting: https://github.com/zendframework/zend-code/issues/160
ini-values: >-
variables_order=EGPCS,
Expand All @@ -65,7 +70,6 @@ jobs:

- name: Set Environment Variables
run: |
Write-Output "SYMFONY_PHPUNIT_VERSION=${{ matrix.symfony_phpunit }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Write-Output "PHP_VERSION=$(php -r 'echo phpversion();')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Write-Output "PHP_MINOR=${{ matrix.php }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Write-Output "TEST_PHP_EXECUTABLE=${env:PHPROOT}\php.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Expand Down Expand Up @@ -172,6 +176,7 @@ jobs:
- name: Compile Stub Project
run: |
.\zephir.bat generate
.\zephir.bat compile `
-Wnonexistent-function `
-Wnonexistent-class `
Expand All @@ -198,17 +203,17 @@ jobs:
- name: Minimal Load Test for Stub Extension
run: php --ri "${env:EXTENSION_NAME}"

- name: Install PHPUnit
run: php phpunit install

- name: Run Unit Tests
shell: cmd
- name: Unit Testing - Extension
if: always()
run: |
SET X=0
php phpunit install
php phpunit --bootstrap %GITHUB_WORKSPACE%\tests\ext-bootstrap.php --testsuite Extension_Php72 || SET X=!errorlevel!
php phpunit --testsuite Zephir || SET X=!errorlevel!
exit %X%
.\vendor\bin\phpunit `
--colors=always `
--bootstrap tests\ext-bootstrap.php `
--testsuite Extension
- name: Unit Testing - Zephir
if: always()
run: vendor/bin/phpunit --colors=always --testsuite Zephir

- name: After Failure
if: failure()
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ jobs:

steps:
- name: Setup Environment Variables
uses: allenevans/[email protected]
with:
BOX_VERSION: '3.8.4'
run: echo "BOX_VERSION=3.10.0" >> $GITHUB_ENV

- name: Checkout Code
uses: actions/checkout@v2
Expand All @@ -23,14 +21,11 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
php-version: '7.4'
extensions: intl, zip, zlib
coverage: none
ini-values: memory_limit=1G, phar.readonly=0

- name: Choose a Suitable PHP Version to Build PHAR
run: composer config platform.php 7.0.33

- name: Get Composer Cache Directory
id: composer-cache
run: echo ::set-output name=dir::$(composer config cache-files-dir)
Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ vendor
*.loT
*.dSYM

# Dependency lock is ignored for now.
composer.lock

# Compilation logs.
compile.log
compile-errors.log
Expand All @@ -46,3 +43,4 @@ zephir.phar

# Use this as your own wish list or a temporary buffer
LATER
php-zephir-parser/
Loading

0 comments on commit 99c026e

Please sign in to comment.