Skip to content

Commit 74298eb

Browse files
authored
Merge pull request #15651 from phalcon/5.0.x
Release v5.0.0alpha5
2 parents c518024 + c06c943 commit 74298eb

File tree

138 files changed

+150862
-650721
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+150862
-650721
lines changed

.github/workflows/build-and-test.yml

Lines changed: 38 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ jobs:
7171
- name: Create Pecl Package (PHP 8)
7272
id: pecl_create
7373
run: |
74-
cp build/phalcon/safe/config.w32 config.w32
75-
cp build/phalcon/safe/phalcon.zep.c phalcon.zep.c
76-
cp build/phalcon/safe/config.m4 config.m4
77-
cp build/phalcon/safe/php_phalcon.h php_phalcon.h
78-
cp build/phalcon/safe/phalcon.zep.h phalcon.zep.h
74+
cp build/phalcon/config.w32 config.w32
75+
cp build/phalcon/phalcon.zep.c phalcon.zep.c
76+
cp build/phalcon/config.m4 config.m4
77+
cp build/phalcon/php_phalcon.h php_phalcon.h
78+
cp build/phalcon/phalcon.zep.h phalcon.zep.h
7979
pecl package
8080
phalcon_package="`ls | grep phalcon-*tgz`"
8181
mv $phalcon_package phalcon-pecl.tgz
@@ -92,7 +92,8 @@ jobs:
9292
build-and-test-linux:
9393
# To prevent build a particular commit use
9494
# git commit -m "......... [ci skip]"
95-
if: "!contains(github.event.head_commit.message, 'ci skip')"
95+
# git commit -m "......... [linux skip] - to skip only linux builds"
96+
if: "!contains(github.event.head_commit.message, '[linux skip]') || !contains(github.event.head_commit.message, 'ci skip')"
9697

9798
needs: generate
9899
services:
@@ -256,7 +257,8 @@ jobs:
256257
build-and-test-macos:
257258
# To prevent build a particular commit use
258259
# git commit -m "......... [ci skip]"
259-
if: "!contains(github.event.head_commit.message, 'ci skip')"
260+
# git commit -m "......... [mac skip] - to skip only macOS builds"
261+
if: "!contains(github.event.head_commit.message, '[mac skip]') || !contains(github.event.head_commit.message, 'ci skip')"
260262

261263
needs: generate
262264
runs-on: ${{ matrix.operating-system }}
@@ -345,7 +347,8 @@ jobs:
345347
build-and-test-windows:
346348
# To prevent build a particular commit use
347349
# git commit -m "......... [ci skip]"
348-
if: "!contains(github.event.head_commit.message, 'ci skip')"
350+
# git commit -m "......... [win skip] - to skip only Windows builds"
351+
if: "!contains(github.event.head_commit.message, '[win skip]') || !contains(github.event.head_commit.message, 'ci skip')"
349352

350353
name: PHP ${{ matrix.php-versions }} (${{ matrix.arch }}-${{ matrix.ts }}) Test on ${{ matrix.operating-system }}
351354
needs: generate
@@ -415,7 +418,7 @@ jobs:
415418
Write-Output "PACKAGE_PREFIX=phalcon" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
416419
Write-Output "EXTENSION_NAME=phalcon" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
417420
Write-Output "EXTENSION_FILE=php_phalcon.dll" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
418-
Write-Output "PHALCON_VERSION=5.0.0alpha4" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
421+
Write-Output "PHALCON_VERSION=5.0.0alpha5" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
419422
Write-Output "PHPTS=${{ matrix.ts }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
420423
If ("${{ matrix.ts }}" -eq "nts") {
421424
Write-Output "BUILD_TYPE=nts-${{ matrix.build_type }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
@@ -539,22 +542,22 @@ jobs:
539542
run: |
540543
Get-PhpExtension "${env:RELEASE_DLL_PATH}"
541544
542-
- name: Upload Artifact
543-
uses: actions/upload-artifact@v2
544-
with:
545-
name: ${{ env.RELEASE_ZIPBALL }}.zip
546-
path: ${{ env.RELEASE_DLL_PATH }}
545+
- name: Prepare Build Artifact
546+
run: |
547+
$Destination = ".\build-artifacts"
548+
if (-not (Test-Path -Path $Destination -PathType Container)) {
549+
New-Item $Destination -ItemType Directory | Out-Null
550+
}
551+
Copy-Item -Path "${env:RELEASE_DLL_PATH}" -Destination $Destination
552+
Copy-Item -Path ".\3rdparty\licenses\*.txt" -Destination $Destination
553+
Set-Location $Destination
554+
& 7z a "${{ env.RELEASE_ZIPBALL }}.zip" *
547555
548-
- name: Upload Licenses
556+
- name: Upload Artifact
549557
uses: actions/upload-artifact@v2
550558
with:
551559
name: ${{ env.RELEASE_ZIPBALL }}.zip
552-
path: |
553-
${{ github.workspace }}\3rdparty\licenses\LICENSE-ATLAS.txt
554-
${{ github.workspace }}\3rdparty\licenses\LICENSE-AURA.txt
555-
${{ github.workspace }}\3rdparty\licenses\LICENSE-DIACTOROS.txt
556-
${{ github.workspace }}\3rdparty\licenses\LICENSE-PHP.txt
557-
${{ github.workspace }}\3rdparty\licenses\LICENSE-ZEND.txt
560+
path: .\build-artifacts\phalcon*.zip
558561

559562
- name: Enable Extensions
560563
run: |
@@ -605,32 +608,38 @@ jobs:
605608
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
606609

607610
needs: [generate, build-and-test-linux, build-and-test-macos, build-and-test-windows]
608-
name: Create release
611+
name: Create Release
609612
runs-on: ubuntu-20.04
610613

611614
steps:
612-
- name: Checkout Code
613-
uses: actions/checkout@v2
614-
with:
615-
fetch-depth: 1
615+
- uses: actions/checkout@v2
616616

617617
- name: Get the release version
618618
id: get-version
619619
run: |
620620
echo ::set-output name=version::${GITHUB_REF#refs/tags/}
621-
echo ::set-output name=release_body::$(.ci/release-notes.sh CHANGELOG-5.0.md)
622621
623622
- name: Download Phalcon build artifacts
624623
id: download
625624
uses: actions/download-artifact@v2
625+
with:
626+
path: ./build-artifacts
627+
628+
- name: Prepare Release assets
629+
run: |
630+
mkdir -p ./build-artifacts/release
631+
find ./build-artifacts -type f -name phalcon*.zip -exec cp {} ./build-artifacts/release/ ";"
632+
find ./build-artifacts -type f -name phalcon*.tgz -exec cp {} ./build-artifacts/release/ ";"
633+
echo "-- Creating Release Notes"
634+
GITHUB_ACTIONS=false ./.ci/release-notes.sh ./CHANGELOG-5.0.md > ./build-artifacts/release/release-notes.md
626635
627636
- name: Create Release
628637
uses: ncipollo/release-action@v1
629638
with:
630639
token: ${{ secrets.GITHUB_TOKEN }}
631640
name: ${{ steps.get-version.outputs.version }}
632641
tag: ${{ steps.get-version.outputs.version }}
633-
body: ${{ steps.get-version.outputs.release_body }}
642+
bodyFile: "./build-artifacts/release/release-notes.md"
634643
allowUpdates: true
635-
artifacts: "${{steps.download.outputs.download-path}}/phalcon_*.zip,${{steps.download.outputs.download-path}}/phalcon-pecl/*"
644+
artifacts: "./build-artifacts/release/*.zip,./build-artifacts/release/*.tgz"
636645
artifactContentType: application/octet-stream
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Install Phalcon
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
if: "!contains(github.event.head_commit.message, 'ci skip')"
10+
runs-on: ubuntu-20.04
11+
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
php-versions: ['7.4', '8.0']
16+
17+
name: Install with PHP ${{ matrix.php-versions }}
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- name: Setup PHP
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: ${{ matrix.php-versions }}
25+
extensions: mbstring, intl, json, psr
26+
tools: pecl
27+
28+
- name: Install from build/ directory
29+
run: |
30+
cd build/
31+
php gen-build.php
32+
sudo ./install
33+
34+
- name: Validate extension
35+
if: success()
36+
run: php -d extension=phalcon -r 'echo (new Phalcon\Support\Version())->get();' || exit 1

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
#
66
# https://help.github.com/articles/ignoring-files/#create-a-global-gitignore
77

8+
# After ./install files
9+
build/phalcon/build
10+
build/phalcon/include
11+
build/phalcon/config.h
12+
build/phalcon/config.nice
13+
build/phalcon/config.status
14+
815
ext/ltmain.sh
916
ext/Makefile
1017
ext/Makefile.fragments

BACKERS.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ Thanks for the support
102102
<a href="https://github.com/RayHughes"><img src="https://avatars3.githubusercontent.com/u/4381883?s=460&u=16dbf2e3fbfae0892a858d6d4cc8869bfde6dd74&v=4" title="Ray Hughes" width="60" height="60"></a>
103103
<a href="https://github.com/borisdelev"><img src="https://avatars.githubusercontent.com/u/4441663?s=460&u=be604c39153e26326f2123c6e1bfe880d5ec0947&v=4" title="Boris Delev" width="60" height="60"></a>
104104
<a href="https://github.com/educury"><img src="https://avatars2.githubusercontent.com/u/5339278?s=460&v=4" title="educury" width="60" height="60"></a>
105-
<a href="https://github.com/emagus"><img src="https://avatars3.githubusercontent.com/u/5857789?s=460&v=4" title="emagus" width="60" height="60"></a>
106105
<a href="https://github.com/tztztztz"><img src="https://avatars.githubusercontent.com/u/7032308?v=4" title="Tomasz Zadora" width="60" height="60"></a>
107106
<a href="https://github.com/ruudboon"><img src="https://avatars3.githubusercontent.com/u/7444246?s=460&v=4" title="Ruud Boon" width="60" height="60"></a>
108107
<a href="https://github.com/sitchi"><img src="https://avatars.githubusercontent.com/u/11546683?v=4" title="Nikoloz Sitchinava" width="60" height="60"></a>

CHANGELOG-5.0.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
# [5.0.0alpha5](https://github.com/phalcon/cphalcon/releases/tag/v5.0.0alpha5) (xxx-xx-xx)
1+
# [5.0.0alpha6](https://github.com/phalcon/cphalcon/releases/tag/v5.0.0alpha6) (xxx-xx-xx)
2+
3+
# [5.0.0alpha5](https://github.com/phalcon/cphalcon/releases/tag/v5.0.0alpha5) (2021-09-09)
4+
## Changed
5+
- Merged all architectures (`build/phalcon/32bits`, `build/phalcon/64bits` and `build/phalcon/safe`) into single universal inside `build/phalcon` [#15647](https://github.com/phalcon/cphalcon/issues/15647)
6+
7+
## Fixed
8+
- Fixed C code in `build/` directory [#15647](https://github.com/phalcon/cphalcon/issues/15647)
29

310
# [5.0.0alpha4](https://github.com/phalcon/cphalcon/releases/tag/v5.0.0alpha4) (2021-09-05)
411

build/config/phalcon_c_header.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?php
2-
// This is the header, which will be added to the start of generated phalcon.c file
2+
3+
/**
4+
* This is the header, which will be added to the start of generated phalcon.c file
5+
*/
36

47
return <<<HEADER
58
#include <stdio.h>

build/install

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@
88
# file that was distributed with this source code.
99
#
1010
# Available params:
11-
# --arch
1211
# --phpize
1312
# --php-config
1413
#
1514
# Example:
16-
# ./install --phpize /usr/bin/phpize7.4 --php-config /usr/bin/php-config7.4 --arch 64bits
15+
# ./install --phpize /usr/bin/phpize7.4 --php-config /usr/bin/php-config7.4
1716

1817
# Check best compilation flags for GCC
1918
# By default we compile to be as compatible as possible with all processors.
@@ -32,15 +31,13 @@ fi
3231
export CPPFLAGS="-DPHALCON_RELEASE"
3332

3433
# Set defaults
35-
ARCH=
3634
PHPIZE_BIN=$(command -v phpize 2>/dev/null)
3735
PHPCONFIG_BIN=$(command -v php-config 2>/dev/null)
3836

3937
# Translate long options to short
4038
for arg in "$@"; do
4139
shift
4240
case "$arg" in
43-
"--arch") set -- "$@" "-a" ;;
4441
"--phpize") set -- "$@" "-i" ;;
4542
"--php-config") set -- "$@" "-c" ;;
4643
*) set -- "$@" "$arg"
@@ -50,7 +47,6 @@ done
5047
# Options switcher
5148
while getopts a:i:c: opts; do
5249
case ${opts} in
53-
a) ARCH=${OPTARG} ;;
5450
i) PHPIZE_BIN=${OPTARG} ;;
5551
c) PHPCONFIG_BIN=${OPTARG} ;;
5652
esac
@@ -63,7 +59,7 @@ if [ $? != 0 ]; then
6359
exit 1
6460
fi
6561

66-
if [ "${PHP_FULL_VERSION:0:1}" == "7" && ${PHP_FULL_VERSION:2:1} < 4 ]; then
62+
if [[ "${PHP_FULL_VERSION:0:1}" == "7" && ${PHP_FULL_VERSION:2:1} < 4 ]]; then
6763
echo "PHP <= 7.4 is no longer supported"
6864
exit 1
6965
fi
@@ -89,22 +85,7 @@ fi
8985
# gcc $CFLAGS -flto t.c -o t 2> t.t && { export CFLAGS="$CFLAGS -flto"; export LDFLAGS="$LDFLAGS $CFLAGS"; }
9086
rm -f t.t t.c t
9187

92-
# Check processor architecture
93-
if [ -z ${ARCH} ]; then
94-
DIR="32bits"
95-
gcc gccarch.c -o gccarch
96-
if [ -f gccarch ]; then
97-
P64BITS=`./gccarch`
98-
if [ "$P64BITS" == "1" ]; then
99-
DIR="64bits"
100-
fi
101-
fi
102-
else
103-
DIR=${ARCH}
104-
fi
105-
106-
# Move to specified architecture
107-
cd "phalcon/$DIR"
88+
cd "phalcon/"
10889

10990
# Clean current compilation
11091
if [ -f Makefile ]; then

0 commit comments

Comments
 (0)