diff --git a/.appveyor.yml b/.appveyor.yml index 5243ddb..68e42bb 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -32,42 +32,52 @@ environment: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 ARCH: x86 VC: vs16 - PHP_VER: 8.1.0 + PHP_VER: 8.2.0RC4 TS: 1 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 ARCH: x64 VC: vs16 - PHP_VER: 8.1.0 + PHP_VER: 8.2.0RC4 + TS: 0 + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + ARCH: x86 + VC: vs16 + PHP_VER: 8.1.11 + TS: 1 + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + ARCH: x64 + VC: vs16 + PHP_VER: 8.1.11 TS: 1 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 ARCH: x86 VC: vs16 - PHP_VER: 8.1.0 + PHP_VER: 8.1.11 TS: 0 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 ARCH: x64 VC: vs16 - PHP_VER: 8.1.0 + PHP_VER: 8.1.11 TS: 0 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 ARCH: x86 VC: vs16 - PHP_VER: 8.0.13 + PHP_VER: 8.0.24 TS: 1 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 ARCH: x64 VC: vs16 - PHP_VER: 8.0.13 + PHP_VER: 8.0.24 TS: 1 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 ARCH: x86 VC: vs16 - PHP_VER: 8.0.13 + PHP_VER: 8.0.24 TS: 0 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 ARCH: x64 VC: vs16 - PHP_VER: 8.0.13 + PHP_VER: 8.0.24 TS: 0 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 ARCH: x64 @@ -112,22 +122,22 @@ environment: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 ARCH: x64 VC: vc15 - PHP_VER: 7.4.26 + PHP_VER: 7.4.32 TS: 0 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 ARCH: x64 VC: vc15 - PHP_VER: 7.4.26 + PHP_VER: 7.4.32 TS: 1 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 ARCH: x86 VC: vc15 - PHP_VER: 7.4.26 + PHP_VER: 7.4.32 TS: 0 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 ARCH: x86 VC: vc15 - PHP_VER: 7.4.26 + PHP_VER: 7.4.32 TS: 1 build_script: diff --git a/.github/workflows/build_dlls.yml b/.github/workflows/build_dlls.yml new file mode 100644 index 0000000..3e8316d --- /dev/null +++ b/.github/workflows/build_dlls.yml @@ -0,0 +1,62 @@ +name: Build DLLs +# Based on https://github.com/TysonAndre/var_representation/blob/main/.github/workflows/build_dlls.yml +# which is based on https://github.com/krakjoe/apcu/blob/master/.github/workflows/config.yml +# Builds DLLs for 64-bit php. +# See https://windows.php.net/ - At this time, the windows PHP team no longer has access to the machine used to build dlls. + +on: + # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release + release: + types: [published] + +jobs: + windows: + defaults: + run: + shell: cmd + strategy: + matrix: + version: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2"] + arch: [x64] + ts: [nts, ts] + runs-on: windows-latest + steps: + - name: Checkout ast + uses: actions/checkout@v2 + - name: Setup PHP + id: setup-php + uses: cmb69/setup-php-sdk@v0.6 + with: + version: ${{matrix.version}} + arch: ${{matrix.arch}} + ts: ${{matrix.ts}} + - name: Enable Developer Command Prompt + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{matrix.arch}} + toolset: ${{steps.setup-php.outputs.toolset}} + - name: phpize + run: phpize + - name: configure + run: configure --enable-ast --enable-debug-pack --with-prefix=${{steps.setup-php.outputs.prefix}} + - name: make + run: nmake + # Run tests, failing if they fail. REPORT_EXIT_STATUS=1 is the default for tests in php 7.2+ + - name: test + run: nmake test TESTS="--show-diff tests" + - name: package + run: | + md .install + copy LICENSE README.md .install + if exist x64 ( + if exist x64\Release (set prefix=x64\Release) else set prefix=x64\Release_TS + ) else ( + if exist Release (set prefix=Release) else set prefix=Release_TS + ) + copy %prefix%\php_ast.dll .install + copy %prefix%\php_ast.pdb .install + - name: Upload artifacts + uses: actions/upload-artifact@v3.1.0 + with: + name: ast-${{github.ref_name}}-Windows-php-${{matrix.version}}-${{matrix.arch}}-${{matrix.ts}} + path: .install diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 226abac..a663694 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,7 @@ jobs: - PHP_VERSION: '7.4' - PHP_VERSION: '8.0' - PHP_VERSION: '8.1' - - PHP_VERSION: '8.2.0beta2' + - PHP_VERSION: '8.2.0RC4' # Steps represent a sequence of tasks that will be executed as part of the job steps: diff --git a/RELEASE_CHECKLIST b/RELEASE_CHECKLIST index f5d5807..12b7181 100644 --- a/RELEASE_CHECKLIST +++ b/RELEASE_CHECKLIST @@ -4,7 +4,8 @@ * Run `pecl package package.xml`. * Run `pecl install ast-XXX.tgz`. * Commit. -* Create a tag. +* Create a release on github. +* Attach Windows artifacts from GitHub Actions to the release. * Bump version in php_ast.h and add dev suffix. * Copy release in package.xml into changelog. * Clear current changelog, bump versions and add dev suffix. diff --git a/package.xml b/package.xml index 86385fb..7e7b7d5 100644 --- a/package.xml +++ b/package.xml @@ -2,8 +2,8 @@ ast pecl.php.net - Extension exposing PHP 7 abstract syntax tree - php-ast exports the AST internally used by PHP 7. + Extension exposing PHP 7+ abstract syntax tree + php-ast exports the AST internally used by PHP 7+. php-ast is significantly faster than PHP-Parser, because the AST construction is implemented in C. However, php-ast may only parse code that is syntactically valid on the version of PHP it runs on. @@ -18,10 +18,10 @@ tandre@php.net yes - 2022-08-09 + 2022-10-18 - 1.1.1dev - 1.1.1dev + 1.1.1 + 1.1.1 stable @@ -29,7 +29,9 @@ BSD-3-Clause -- TBD +- Set up actions to generate DLLs for Windows in CI on https://github.com/nikic/php-ast + + NOTE: The PHP for Windows team is working on getting dlls built again for pecl extensions. Those should be used instead on Windows once they are available. See https://windows.php.net/ diff --git a/php_ast.h b/php_ast.h index 88d91cc..6a03961 100644 --- a/php_ast.h +++ b/php_ast.h @@ -7,7 +7,7 @@ extern zend_module_entry ast_module_entry; #define phpext_ast_ptr &ast_module_entry -#define PHP_AST_VERSION "1.1.1-dev" +#define PHP_AST_VERSION "1.1.1" #ifdef PHP_WIN32 # define PHP_AST_API __declspec(dllexport)