mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-03 09:54:27 +02:00
revise CI/CD workflows, bypass packagist for lexer
This commit is contained in:
60
.github/workflows/cd.yml
vendored
Normal file
60
.github/workflows/cd.yml
vendored
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
name: CD
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
if: ${{ startsWith(github.ref_name, '5.') }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
env:
|
||||||
|
PHP_EXTENSIONS: dom, json, libxml, mbstring, pdo_sqlite, soap, xml, xmlwriter
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install PHP with extensions
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: 8.1
|
||||||
|
extensions: ${{ env.PHP_EXTENSIONS }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
uses: php-actions/composer@v6
|
||||||
|
|
||||||
|
- name: Run make
|
||||||
|
run: make
|
||||||
|
|
||||||
|
- name: create release assets
|
||||||
|
run: |
|
||||||
|
mkdir release
|
||||||
|
git archive release
|
||||||
|
cd release
|
||||||
|
make
|
||||||
|
cd ..
|
||||||
|
tar -cvzf release.tar.gz release
|
||||||
|
|
||||||
|
- name: create release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
id: create_release
|
||||||
|
with:
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
release_name: ${{ steps.version.outputs.version }}
|
||||||
|
tag_name: ${{ github.ref }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
|
||||||
|
- name: upload artifacts
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./release.tar.gz
|
||||||
|
asset_name: release.tar.gz
|
||||||
|
asset_content_type: application/gzip
|
13
.github/workflows/ci.yml
vendored
13
.github/workflows/ci.yml
vendored
@@ -48,7 +48,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Override PHP ini values for JIT compiler
|
- name: Override PHP ini values for JIT compiler
|
||||||
if: matrix.compiler == 'jit'
|
if: matrix.compiler == 'jit'
|
||||||
@@ -62,21 +62,18 @@ jobs:
|
|||||||
extensions: ${{ env.PHP_EXTENSIONS }}
|
extensions: ${{ env.PHP_EXTENSIONS }}
|
||||||
ini-values: ${{ env.PHP_INI_VALUES }}
|
ini-values: ${{ env.PHP_INI_VALUES }}
|
||||||
|
|
||||||
- name: Validate composer.json and composer.lock
|
|
||||||
run: composer validate
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: composer install
|
|
||||||
|
|
||||||
- name: Cache Composer packages
|
- name: Cache Composer packages
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: vendor
|
path: vendor
|
||||||
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-php-${{ matrix.php-version }}-
|
${{ runner.os }}-php-${{ matrix.php-version }}-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
uses: php-actions/composer@v6
|
||||||
|
|
||||||
- name: Run make
|
- name: Run make
|
||||||
run: make
|
run: make
|
||||||
|
|
||||||
|
3
TODO.txt
3
TODO.txt
@@ -5,6 +5,9 @@
|
|||||||
- review ->(step|total|first|last|do_else|key|show|iteration|index)
|
- review ->(step|total|first|last|do_else|key|show|iteration|index)
|
||||||
- review ->tpl_vars, ->config_vars, ->value
|
- review ->tpl_vars, ->config_vars, ->value
|
||||||
|
|
||||||
|
## Build
|
||||||
|
- add compiled lexers and parsers to Release assets automatically
|
||||||
|
|
||||||
## Block / inheritance
|
## Block / inheritance
|
||||||
- Consider phasing out $smarty.block.child as this reverses the inheritance hierarchy and might cause infinite loops
|
- Consider phasing out $smarty.block.child as this reverses the inheritance hierarchy and might cause infinite loops
|
||||||
when combined with $smarty.block.parent
|
when combined with $smarty.block.parent
|
||||||
|
@@ -48,6 +48,12 @@
|
|||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^8.5 || ^7.5",
|
"phpunit/phpunit": "^8.5 || ^7.5",
|
||||||
"smarty/smarty-lexer": "^4.0"
|
"smarty/smarty-lexer": "dev-master"
|
||||||
|
},
|
||||||
|
"repositories": [
|
||||||
|
{
|
||||||
|
"type": "vcs",
|
||||||
|
"url": "https://github.com/smarty-php/smarty-lexer"
|
||||||
}
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user