-
Notifications
You must be signed in to change notification settings - Fork 100
119 lines (102 loc) · 2.96 KB
/
main.yml
File metadata and controls
119 lines (102 loc) · 2.96 KB
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: CI
on:
pull_request:
push:
branches:
- "master"
workflow_dispatch:
jobs:
phpt:
name: PHPT - PHP ${{ matrix.php }} ${{ matrix.ts }} ${{ matrix.platform }} opcache=${{ matrix.opcache }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.2', '8.3', '8.4', '8.5']
platform: [debian, alpine]
ts: [nts, ts]
opcache: [0, 1]
include:
- { platform: debian, dockerfile: Dockerfile.debian }
- { platform: alpine, dockerfile: Dockerfile.alpine }
- { ts: nts, variant: cli }
- { ts: ts, variant: zts }
- { php: '8.5', tag: '8.5-rc' }
steps:
- uses: actions/checkout@v4
- name: Build
run: >
docker build
-f ${{ matrix.dockerfile }}
--build-arg PHP_VERSION=${{ matrix.tag || matrix.php }}
--build-arg PHP_VARIANT=${{ matrix.variant }}
--build-arg OPCACHE=${{ matrix.opcache }}
-t ext-ds .
- name: Test
run: docker run --rm ext-ds
phpt-arch:
name: PHPT - Arch Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: docker build -f Dockerfile.arch -t ext-ds .
- name: Test
run: docker run --rm ext-ds
phpunit:
name: PHPUnit - PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- "8.2"
- "8.3"
- "8.4"
- "8.5"
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Build and install extension
run: |
phpize
./configure --with-php-config=/usr/bin/php-config
sudo make -j$(nproc) install
- name: Install dependencies
uses: ramsey/composer-install@v3
with:
composer-options: "--prefer-dist"
- name: Run PHPUnit tests
run: composer test
windows:
name: Windows - PHP ${{ matrix.php-version }} ${{ matrix.ts }} ${{ matrix.arch }}
needs: get-windows-matrix
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.get-windows-matrix.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Build the extension
uses: php/php-windows-builder/extension@v1
with:
php-version: ${{ matrix.php-version }}
arch: ${{ matrix.arch }}
ts: ${{ matrix.ts }}
args: --enable-ds
get-windows-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.extension-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Get the extension matrix
id: extension-matrix
uses: php/php-windows-builder/extension-matrix@v1
with:
php-version-list: '8.2, 8.3, 8.4, 8.5'