-
Notifications
You must be signed in to change notification settings - Fork 2
152 lines (144 loc) · 4.29 KB
/
ci.yaml
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: CI
on:
push:
branches: [PHP-8.3]
paths-ignore:
- 'docs/**'
- '.editorconfig'
- '.gitignore'
- 'CHANGELOG.md'
- 'README.md'
pull_request:
branches: [PHP-8.3]
paths-ignore:
- 'docs/**'
- '.editorconfig'
- '.gitignore'
- 'CHANGELOG.md'
- 'README.md'
jobs:
linux:
name: Linux.${{ matrix.os.label }}.${{ matrix.compiler.name }}.${{ matrix.generator }}
runs-on: ${{ matrix.os.label }}
strategy:
fail-fast: false
matrix:
os:
- { label: ubuntu-latest }
compiler:
- { name: GNU13, CC: gcc-13, CXX: g++-13, packages: gcc-13 g++-13 }
- { name: LLVM15, CC: clang-15, CXX: clang++-15, packages: clang-15 libomp-15-dev llvm-15-dev libc++-15-dev libc++abi1-15 lld-15 clang-tools-15 mlir-15-tools libmlir-15-dev }
build_type:
- Release
target:
- build
generator:
- Unix Makefiles
php:
- 8.3-dev
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
SRC_DIR: ${{ github.workspace }}/php-src
BINARY_DIR: ${{ github.workspace }}/php-src
INSTALL_PREFIX: ${{ github.workspace }}/php-src/install
CMAKE_BUILD_TYPE: ${{ matrix.build_type }}
GENERATOR: ${{ matrix.generator }}
TARGET: ${{ matrix.target }}
steps:
- name: Install compiler ${{ matrix.compiler.name }}
run: |
# Remove azure mirror because it is unreliable and sometimes unpredictably leads to failed CI
sudo sed -i 's/azure\.//' /etc/apt/sources.list
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo add-apt-repository -y universe
sudo add-apt-repository -y multiverse
sudo apt-get update
sudo apt-get -y install \
${{ matrix.compiler.packages }}
- name: Install base dependencies
run: |
sudo apt-get -y install \
build-essential \
bison \
libssl-dev \
libpcre2-dev \
libsqlite3-dev \
libbz2-dev \
libcurl4-openssl-dev \
libdb5.3++-dev \
libenchant-2-dev \
libpng-dev \
libgmp-dev \
libc-client-dev \
libkrb5-dev \
libjpeg-dev \
libxpm-dev \
libfreetype-dev \
libldap2-dev \
unixodbc-dev \
freetds-dev \
libsnmp-dev \
snmp \
apache2-dev \
firebird-dev \
libsodium-dev \
libicu-dev \
libzip-dev \
libaspell-dev \
libavif-dev \
libwebp-dev \
libxpm-dev \
libonig-dev \
libtidy-dev \
libargon2-dev \
libxslt1-dev \
libcapstone-dev \
libedit-dev \
libcdb-dev \
liblmdb-dev \
libqdbm-dev \
libtokyocabinet-dev \
libsnmp-dev \
snmpd \
snmp-mibs-downloader \
libexpat1-dev \
libacl1-dev \
libapparmor-dev \
libselinux1-dev \
libsystemd-dev \
libldap2-dev \
libsasl2-dev \
libpq-dev \
libmm-dev \
zlib1g-dev \
libdmalloc-dev \
dovecot-core \
dovecot-pop3d \
dovecot-imapd \
sendmail;
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Build and install
run: |
./bin/php.cmake ${{ matrix.php }}
cd php-${{ matrix.php }}
cmake --preset all-enabled
cmake --build --preset all-enabled -j
- name: Setup SNMP agents
run: |
cd php-${{ matrix.php }}
sudo cp ext/snmp/tests/snmpd.conf /etc/snmp
sudo cp ext/snmp/tests/bigtest /etc/snmp
sudo systemctl restart snmpd
- name: Setup Dovecot for testing imap extension
run: |
cd php-${{ matrix.php }}
sudo sh ext/imap/tests/setup/setup.sh
sudo systemctl restart dovecot
- name: Run tests
run: |
cd php-${{ matrix.php }}
ctest --preset all-enabled