Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix config version8 #185

Merged
merged 14 commits into from
Feb 18, 2024
7 changes: 3 additions & 4 deletions .github/ngx-php/compile-ngx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
# mkdir php
# mkdir nginx

if [ ${PHP_SRC_VERSION:0:1} -ge "8" ]; then
PHP_MAJOR_VERSION=""
else
PHP_MAJOR_VERSION=${PHP_SRC_VERSION:0:1}
PHP_MAJOR_VERSION=${PHP_SRC_VERSION:0:1}
if [ $PHP_MAJOR_VERSION -ge "8" ]; then
PHP_MAJOR_VERSION=""
fi

# echo "nginx download ..."
Expand Down
8 changes: 4 additions & 4 deletions .github/ngx-php/compiler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ mkdir nginx

echo "php download ..."
wget http://php.net/distributions/php-${PHP_SRC_VERSION}.tar.gz
if [ ${PHP_SRC_VERSION:0:1} -ge "8" ]; then
PHP_MAJOR_VERSION=""
else
PHP_MAJOR_VERSION=${PHP_SRC_VERSION:0:1}

PHP_MAJOR_VERSION=${PHP_SRC_VERSION:0:1}
if [ $PHP_MAJOR_VERSION -ge "8" ]; then
PHP_MAJOR_VERSION=""
fi
echo "php download ... done"

Expand Down
4 changes: 3 additions & 1 deletion .github/ngx-php/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ${NGX_PATH}/nginx -V
export PATH=${NGX_PATH}:$PATH
NGX_MODULE_PATH=`pwd`'/nginx/modules'
if [ -d "${NGX_MODULE_PATH}" ]; then
for file in `\find ${NGX_MODULE_PATH} -name '*.so'`; do
for file in `\find ${NGX_MODULE_PATH} -name '*.so' | sort -h | xargs find`; do
TEST_NGINX_LOAD_MODULES="${TEST_NGINX_LOAD_MODULES}${file} "
done
export TEST_NGINX_LOAD_MODULES
Expand All @@ -35,4 +35,6 @@ fi
export TRAVIS_BUILD_DIR=`pwd`
echo $TRAVIS_BUILD_DIR

killall nginx

prove -r t
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ on:
- "t/**"
- "third_party/**"
- ".github/**"
- "config"
pull_request:
paths:
- "src/**"
- "t/**"
- "third_party/**"
- ".github/**"
- "config"

# later try to pass it, and not repeat it in workflows
env:
Expand All @@ -23,7 +25,7 @@ env:
jobs:
build_php_22-04:
name: Compile PHP Ubuntu 22.04
if: ${{ contains(github.event.head_commit.message, '<compile') }}
if: ${{ !contains(github.event.head_commit.message, '<compile') }}
uses: ./.github/workflows/build_22.04.yml

build_20-04:
Expand All @@ -38,6 +40,6 @@ jobs:

build_dynamic_22-04:
name: Ubuntu 22.04 dynamic
if: ${{ contains(github.event.head_commit.message, '<22') }}
if: ${{ !contains(github.event.head_commit.message, '<22') }}
uses: ./.github/workflows/build_22.04_dynamic.yml

4 changes: 2 additions & 2 deletions .github/workflows/build_20.04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
php_version: ["7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]
ngxinx_version: ["1.20.2", "1.22.1", "1.24.0", "1.25.3"] # "1.12.2" fail to compile
ngxinx_version: ["1.20.2", "1.22.1", "1.24.0", "1.25.4"] # "1.12.2" fail to compile
# Disable fail-fast to allow all failing versions to fail in a
# single build, rather than stopping when the first one fails.
fail-fast: false
Expand Down Expand Up @@ -64,5 +64,5 @@ jobs:
env:
PHP_SRC_VERSION: ${{ matrix.php_version }}
run: |
sudo sed -i "s|opcache.jit=off|opcache.jit=tracing|g" /etc/php/${PHP_SRC_VERSION}/embed/conf.d/10-opcache.ini
echo opcache.jit=tracing | sudo tee --append /etc/php/${PHP_SRC_VERSION}/embed/conf.d/10-opcache.ini
./.github/ngx-php/test.sh
2 changes: 1 addition & 1 deletion .github/workflows/build_20.04_dynamic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
php_version: ["7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]
ngxinx_version: ["1.20.2", "1.22.1", "1.24.0", "1.25.3"] # "1.12.2" fail to compile
ngxinx_version: ["1.20.2", "1.22.1", "1.24.0", "1.25.4"] # "1.12.2" fail to compile
# Disable fail-fast to allow all failing versions to fail in a
# single build, rather than stopping when the first one fails.
fail-fast: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_22.04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:

strategy:
matrix:
php_version: ["7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]
ngxinx_version: ["1.20.2", "1.22.1", "1.24.0", "1.25.3"] # "1.12.2" fail to compile
php_version: ["8.1", "8.2", "8.3"]
ngxinx_version: ["1.24.0", "1.25.4"]
# Disable fail-fast to allow all failing versions to fail in a
# single build, rather than stopping when the first one fails.
fail-fast: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_22.04_dynamic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:

strategy:
matrix:
php_version: ["7.4", "8.0", "8.1", "8.2", "8.3"] # "7.0", "7.1", "7.2", "7.3",
ngxinx_version: ["1.20.2", "1.22.1", "1.24.0", "1.25.3"] # "1.12.2" fail to compile
php_version: ["8.1", "8.2", "8.3"] # "7.0", "7.1", "7.2", "7.3",
ngxinx_version: ["1.24.0", "1.25.4"]
# Disable fail-fast to allow all failing versions to fail in a
# single build, rather than stopping when the first one fails.
fail-fast: false
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build_development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- "t/**"
- "third_party/**"
- ".github/**"
- "config"
pull_request:
branches:
- development
Expand All @@ -17,6 +18,7 @@ on:
- "t/**"
- "third_party/**"
- ".github/**"
- "config"

env:
DB_DATABASE: ngx_php
Expand All @@ -30,7 +32,7 @@ jobs:
strategy:
matrix:
php_version: ["8.3"]
ngxinx_version: ["1.25.3"] # "1.12.2" fail to compile
ngxinx_version: ["1.25.4"] # "1.12.2" fail to compile
# Disable fail-fast to allow all failing versions to fail in a
# single build, rather than stopping when the first one fails.
fail-fast: false
Expand Down
4 changes: 2 additions & 2 deletions config
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ if [ -z "$NGX_PHP_INCS" ]; then
fi

if [ -z "$NGX_PHP_LIBS" ]; then
PHP_VERSION="`$PHP_CONFIG --version`"
PHP_MAJOR_VERSION=`echo $PHP_VERSION | sed -e "s#\.[0-9]*##g"`
PHP_VERSION="`$PHP_CONFIG --vernum`"
PHP_MAJOR_VERSION=`echo $PHP_VERSION | cut -b 1`
if [ $PHP_MAJOR_VERSION -ge "8" ]; then
PHP_MAJOR_VERSION=""
fi
Expand Down
2 changes: 0 additions & 2 deletions t/025-opcache.t
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ location = /jit {
# JIT only added in PHP8
echo "JIT enabled\n";
} else {
# set at runtime, as is not enabled from php.ini
# ini_set("opcache.jit", "tracing");
echo opcache_get_status()["jit"]["enabled"] ? "JIT enabled\n" : "JIT disabled";
}
';
Expand Down
Loading