Skip to content

Commit

Permalink
Merge pull request #15651 from phalcon/5.0.x
Browse files Browse the repository at this point in the history
Release v5.0.0alpha5
  • Loading branch information
niden authored Sep 9, 2021
2 parents c518024 + c06c943 commit 74298eb
Show file tree
Hide file tree
Showing 138 changed files with 150,862 additions and 650,721 deletions.
67 changes: 38 additions & 29 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ jobs:
- name: Create Pecl Package (PHP 8)
id: pecl_create
run: |
cp build/phalcon/safe/config.w32 config.w32
cp build/phalcon/safe/phalcon.zep.c phalcon.zep.c
cp build/phalcon/safe/config.m4 config.m4
cp build/phalcon/safe/php_phalcon.h php_phalcon.h
cp build/phalcon/safe/phalcon.zep.h phalcon.zep.h
cp build/phalcon/config.w32 config.w32
cp build/phalcon/phalcon.zep.c phalcon.zep.c
cp build/phalcon/config.m4 config.m4
cp build/phalcon/php_phalcon.h php_phalcon.h
cp build/phalcon/phalcon.zep.h phalcon.zep.h
pecl package
phalcon_package="`ls | grep phalcon-*tgz`"
mv $phalcon_package phalcon-pecl.tgz
Expand All @@ -92,7 +92,8 @@ jobs:
build-and-test-linux:
# To prevent build a particular commit use
# git commit -m "......... [ci skip]"
if: "!contains(github.event.head_commit.message, 'ci skip')"
# git commit -m "......... [linux skip] - to skip only linux builds"
if: "!contains(github.event.head_commit.message, '[linux skip]') || !contains(github.event.head_commit.message, 'ci skip')"

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

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

name: PHP ${{ matrix.php-versions }} (${{ matrix.arch }}-${{ matrix.ts }}) Test on ${{ matrix.operating-system }}
needs: generate
Expand Down Expand Up @@ -415,7 +418,7 @@ jobs:
Write-Output "PACKAGE_PREFIX=phalcon" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Write-Output "EXTENSION_NAME=phalcon" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Write-Output "EXTENSION_FILE=php_phalcon.dll" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Write-Output "PHALCON_VERSION=5.0.0alpha4" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Write-Output "PHALCON_VERSION=5.0.0alpha5" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Write-Output "PHPTS=${{ matrix.ts }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
If ("${{ matrix.ts }}" -eq "nts") {
Write-Output "BUILD_TYPE=nts-${{ matrix.build_type }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Expand Down Expand Up @@ -539,22 +542,22 @@ jobs:
run: |
Get-PhpExtension "${env:RELEASE_DLL_PATH}"
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.RELEASE_ZIPBALL }}.zip
path: ${{ env.RELEASE_DLL_PATH }}
- name: Prepare Build Artifact
run: |
$Destination = ".\build-artifacts"
if (-not (Test-Path -Path $Destination -PathType Container)) {
New-Item $Destination -ItemType Directory | Out-Null
}
Copy-Item -Path "${env:RELEASE_DLL_PATH}" -Destination $Destination
Copy-Item -Path ".\3rdparty\licenses\*.txt" -Destination $Destination
Set-Location $Destination
& 7z a "${{ env.RELEASE_ZIPBALL }}.zip" *
- name: Upload Licenses
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.RELEASE_ZIPBALL }}.zip
path: |
${{ github.workspace }}\3rdparty\licenses\LICENSE-ATLAS.txt
${{ github.workspace }}\3rdparty\licenses\LICENSE-AURA.txt
${{ github.workspace }}\3rdparty\licenses\LICENSE-DIACTOROS.txt
${{ github.workspace }}\3rdparty\licenses\LICENSE-PHP.txt
${{ github.workspace }}\3rdparty\licenses\LICENSE-ZEND.txt
path: .\build-artifacts\phalcon*.zip

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

needs: [generate, build-and-test-linux, build-and-test-macos, build-and-test-windows]
name: Create release
name: Create Release
runs-on: ubuntu-20.04

steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: actions/checkout@v2

- name: Get the release version
id: get-version
run: |
echo ::set-output name=version::${GITHUB_REF#refs/tags/}
echo ::set-output name=release_body::$(.ci/release-notes.sh CHANGELOG-5.0.md)
- name: Download Phalcon build artifacts
id: download
uses: actions/download-artifact@v2
with:
path: ./build-artifacts

- name: Prepare Release assets
run: |
mkdir -p ./build-artifacts/release
find ./build-artifacts -type f -name phalcon*.zip -exec cp {} ./build-artifacts/release/ ";"
find ./build-artifacts -type f -name phalcon*.tgz -exec cp {} ./build-artifacts/release/ ";"
echo "-- Creating Release Notes"
GITHUB_ACTIONS=false ./.ci/release-notes.sh ./CHANGELOG-5.0.md > ./build-artifacts/release/release-notes.md
- name: Create Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.get-version.outputs.version }}
tag: ${{ steps.get-version.outputs.version }}
body: ${{ steps.get-version.outputs.release_body }}
bodyFile: "./build-artifacts/release/release-notes.md"
allowUpdates: true
artifacts: "${{steps.download.outputs.download-path}}/phalcon_*.zip,${{steps.download.outputs.download-path}}/phalcon-pecl/*"
artifacts: "./build-artifacts/release/*.zip,./build-artifacts/release/*.tgz"
artifactContentType: application/octet-stream
36 changes: 36 additions & 0 deletions .github/workflows/install-phalcon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Install Phalcon

on:
push:
pull_request:

jobs:
build:
if: "!contains(github.event.head_commit.message, 'ci skip')"
runs-on: ubuntu-20.04

strategy:
fail-fast: false
matrix:
php-versions: ['7.4', '8.0']

name: Install with PHP ${{ matrix.php-versions }}
steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, json, psr
tools: pecl

- name: Install from build/ directory
run: |
cd build/
php gen-build.php
sudo ./install
- name: Validate extension
if: success()
run: php -d extension=phalcon -r 'echo (new Phalcon\Support\Version())->get();' || exit 1
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
#
# https://help.github.com/articles/ignoring-files/#create-a-global-gitignore

# After ./install files
build/phalcon/build
build/phalcon/include
build/phalcon/config.h
build/phalcon/config.nice
build/phalcon/config.status

ext/ltmain.sh
ext/Makefile
ext/Makefile.fragments
Expand Down
1 change: 0 additions & 1 deletion BACKERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ Thanks for the support
<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>
<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>
<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>
<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>
<a href="https://github.com/tztztztz"><img src="https://avatars.githubusercontent.com/u/7032308?v=4" title="Tomasz Zadora" width="60" height="60"></a>
<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>
<a href="https://github.com/sitchi"><img src="https://avatars.githubusercontent.com/u/11546683?v=4" title="Nikoloz Sitchinava" width="60" height="60"></a>
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG-5.0.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# [5.0.0alpha5](https://github.com/phalcon/cphalcon/releases/tag/v5.0.0alpha5) (xxx-xx-xx)
# [5.0.0alpha6](https://github.com/phalcon/cphalcon/releases/tag/v5.0.0alpha6) (xxx-xx-xx)

# [5.0.0alpha5](https://github.com/phalcon/cphalcon/releases/tag/v5.0.0alpha5) (2021-09-09)
## Changed
- 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)

## Fixed
- Fixed C code in `build/` directory [#15647](https://github.com/phalcon/cphalcon/issues/15647)

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

Expand Down
5 changes: 4 additions & 1 deletion build/config/phalcon_c_header.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?php
// This is the header, which will be added to the start of generated phalcon.c file

/**
* This is the header, which will be added to the start of generated phalcon.c file
*/

return <<<HEADER
#include <stdio.h>
Expand Down
25 changes: 3 additions & 22 deletions build/install
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
# file that was distributed with this source code.
#
# Available params:
# --arch
# --phpize
# --php-config
#
# Example:
# ./install --phpize /usr/bin/phpize7.4 --php-config /usr/bin/php-config7.4 --arch 64bits
# ./install --phpize /usr/bin/phpize7.4 --php-config /usr/bin/php-config7.4

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

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

# Translate long options to short
for arg in "$@"; do
shift
case "$arg" in
"--arch") set -- "$@" "-a" ;;
"--phpize") set -- "$@" "-i" ;;
"--php-config") set -- "$@" "-c" ;;
*) set -- "$@" "$arg"
Expand All @@ -50,7 +47,6 @@ done
# Options switcher
while getopts a:i:c: opts; do
case ${opts} in
a) ARCH=${OPTARG} ;;
i) PHPIZE_BIN=${OPTARG} ;;
c) PHPCONFIG_BIN=${OPTARG} ;;
esac
Expand All @@ -63,7 +59,7 @@ if [ $? != 0 ]; then
exit 1
fi

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

# Check processor architecture
if [ -z ${ARCH} ]; then
DIR="32bits"
gcc gccarch.c -o gccarch
if [ -f gccarch ]; then
P64BITS=`./gccarch`
if [ "$P64BITS" == "1" ]; then
DIR="64bits"
fi
fi
else
DIR=${ARCH}
fi

# Move to specified architecture
cd "phalcon/$DIR"
cd "phalcon/"

# Clean current compilation
if [ -f Makefile ]; then
Expand Down
Loading

0 comments on commit 74298eb

Please sign in to comment.