-
Notifications
You must be signed in to change notification settings - Fork 56
83 lines (70 loc) · 2.46 KB
/
build_development.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Build Nightly PHP
on:
push:
branches:
- development
paths:
- "src/**"
- "t/**"
- "third_party/**"
- ".github/**"
pull_request:
branches:
- development
paths:
- "src/**"
- "t/**"
- "third_party/**"
- ".github/**"
env:
DB_DATABASE: ngx_php
DB_USER: ngx_php
DB_PASSWORD: ngx_php
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
php_version: ["8.3"]
ngxinx_version: ["1.25.3"] # "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
name: PHP-${{ matrix.php_version }} Nginx ${{ matrix.ngxinx_version }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get install -yqq cpanminus libxml2-dev systemtap-sdt-dev zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev libkrb5-dev
- name: Setup PHP-${{ matrix.php_version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
extensions: dev, embed, opcache, mysql
ini-values: opcache.enable=1, opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=128M,error_reporting=E_ALL
coverage: none
- name: Download Nginx v${{ matrix.ngxinx_version }}
run: |
wget http://nginx.org/download/nginx-${{ matrix.ngxinx_version }}.tar.gz
tar -zxf nginx-${{ matrix.ngxinx_version }}.tar.gz
- name: Compile Ngx-php
env:
PHP_SRC_VERSION: ${{ matrix.php_version }}
NGINX_SRC_VERSION: ${{ matrix.ngxinx_version }}
run: ./.github/ngx-php/compile-ngx.sh
- name: MySQL Start and create table
run: |
sudo systemctl start mysql.service
mysql -uroot -proot -e 'CREATE DATABASE ${{ env.DB_DATABASE }};'
mysql -uroot -proot < .github/ngx-php/world.sql
- name: Install Redis & Memcached
run: |
sudo apt-get install -y redis-server redis-tools memcached
sudo redis-server /etc/redis/redis.conf
- name: Perl packages
run: sudo cpanm -n Test::Nginx
- name: Test
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
./.github/ngx-php/test.sh