-
Notifications
You must be signed in to change notification settings - Fork 2
130 lines (122 loc) · 3.58 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
name: CI
on:
push:
branches: [master]
paths-ignore:
- 'docs/**'
- '.editorconfig'
- '.gitignore'
- 'CHANGELOG.md'
- 'README.md'
pull_request:
branches: [master]
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
generator:
- Unix Makefiles
php:
- 8.5-dev
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
CMAKE_BUILD_TYPE: ${{ matrix.build_type }}
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 \
libssl-dev \
libpcre2-dev \
libsqlite3-dev \
libbz2-dev \
libcurl4-openssl-dev \
libdb5.3++-dev \
libenchant-2-dev \
libpng-dev \
libgmp-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;
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Build and install
run: |
cmake --preset all-enabled
cmake --build --preset all-enabled -j
- name: Setup SNMP agents
run: |
cd php-build/all-enabled/php-src
sudo cp ext/snmp/tests/{snmpd.conf,bigtest} /etc/snmp
sudo systemctl restart snmpd
- name: Run tests
run: ctest --preset all-enabled
- name: Install PHP
run: cmake --install php-build/all-enabled