-
-
Notifications
You must be signed in to change notification settings - Fork 49
91 lines (91 loc) · 2.99 KB
/
ci.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
84
85
86
87
88
89
90
91
name: Build and Test
on: [push, pull_request, workflow_dispatch]
jobs:
ubuntu:
strategy:
fail-fast: false
matrix:
version: ["PHP-8.0", "PHP-8.1", "PHP-8.2", "PHP-8.3", "master"]
opcache: ["opcache.enable_cli=0", "opcache.enable_cli=1"]
debug: ["enable-debug", "disable-debug"]
runs-on: ubuntu-latest
steps:
- name: Setup Ubuntu
run: sudo apt-get install lcov re2c bison
- name: Install PHP
run: |
sudo mkdir /opt/src
sudo chmod 777 /opt/src
cd /opt/src
git clone --depth=1 --branch ${{matrix.version}} https://github.com/php/php-src
cd php-src
./buildconf --force
./configure --disable-all \
--enable-gcov \
--enable-opcache \
--disable-opcache-jit \
--prefix=/opt \
--with-config-file-path=/opt/etc \
--${{matrix.debug}}
make -j$(nproc)
sudo make install
- name: Checkout
uses: actions/checkout@v4
- name: Generate Build Files
run: /opt/bin/phpize
- name: Configure Build
run: ./configure --enable-uopz --with-php-config=/opt/bin/php-config
- name: Build
run: EXTRA_CFLAGS="-fprofile-arcs -ftest-coverage" make
- name: Install
run: sudo make install
- name: Configure Installation
run: |
sudo mkdir /opt/etc
sudo chmod 777 /opt/etc
echo "zend_extension=opcache.so" > /opt/etc/php.ini
echo ${{matrix.opcache}} >> /opt/etc/php.ini
- name: Run Tests
run: /opt/bin/php run-tests.php -q -g FAIL,XFAIL,XLEAK,SKIP,BORK,WARN -P --show-diff
- name: Generate Test Coverage
run: lcov -c --directory ./src/.libs --exclude *Zend* --exclude */usr/include* --output-file coverage.info
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.info
windows:
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
version: ["8.0", "8.1", "8.2", "8.3", "8.4"]
arch: [x64, x86]
ts: [nts, ts]
runs-on: windows-2022
steps:
- name: Checkout uopz
uses: actions/checkout@v4
- name: Setup PHP
id: setup-php
uses: php/[email protected]
with:
version: ${{matrix.version}}
arch: ${{matrix.arch}}
ts: ${{matrix.ts}}
cache: true
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.arch}}
toolset: ${{steps.setup-php.outputs.toolset}}
- name: Generate Build Files
run: phpize
- name: Configure Build
run: configure --enable-uopz --with-prefix=${{steps.setup-php.outputs.prefix}}
- name: Build
run: nmake
- name: Run Tests
run: nmake test TESTS="--show-diff tests"