|
7 | 7 | branches: [main] |
8 | 8 |
|
9 | 9 | jobs: |
10 | | - build: |
11 | | - strategy: |
12 | | - fail-fast: false |
13 | | - matrix: |
14 | | - os: [ubuntu-latest, windows-latest, macos-latest] |
15 | | - include: |
16 | | - - os: ubuntu-latest |
17 | | - platform: linux |
18 | | - - os: windows-latest |
19 | | - platform: windows |
20 | | - - os: macos-latest |
21 | | - platform: macos |
| 10 | + build-ubuntu: |
| 11 | + runs-on: ubuntu-latest |
22 | 12 |
|
23 | | - runs-on: ${{ matrix.os }} |
24 | | - |
25 | 13 | services: |
26 | 14 | mysql: |
27 | 15 | image: mysql:8.3 |
|
63 | 51 | mkdir -p php-src/ext/async |
64 | 52 | cp -r async/* php-src/ext/async/ |
65 | 53 |
|
66 | | - - name: Install build dependencies (Ubuntu) |
67 | | - if: matrix.os == 'ubuntu-latest' |
| 54 | + - name: Install build dependencies |
68 | 55 | run: | |
69 | 56 | sudo apt-get update |
70 | 57 | sudo apt-get install -y \ |
|
76 | 63 | firebird-dev \ |
77 | 64 | libuv1-dev |
78 | 65 |
|
79 | | - - name: Install build dependencies (Windows) |
80 | | - if: matrix.os == 'windows-latest' |
81 | | - run: | |
82 | | - choco install -y visualstudio2022buildtools |
83 | | - choco install -y git |
84 | | - choco install -y cmake |
85 | | - choco install -y vcpkg |
86 | | - vcpkg install libuv:x64-windows |
87 | | - vcpkg install openssl:x64-windows |
88 | | - vcpkg install zlib:x64-windows |
89 | | - vcpkg integrate install |
90 | | - shell: cmd |
91 | | - |
92 | | - - name: Install build dependencies (macOS) |
93 | | - if: matrix.os == 'macos-latest' |
94 | | - run: | |
95 | | - brew install autoconf bison re2c |
96 | | - brew install gmp icu4c tidyhtml5 |
97 | | - brew install libzip bzip2 sqlite oniguruma curl |
98 | | - brew install libxml2 libxslt postgresql readline ldns libsodium |
99 | | - brew install argon2 libuv openssl@3 |
100 | | - echo "PKG_CONFIG_PATH=$(brew --prefix openssl@3)/lib/pkgconfig:$(brew --prefix icu4c)/lib/pkgconfig:$(brew --prefix libxml2)/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV |
101 | | - echo "PATH=$(brew --prefix bison)/bin:$PATH" >> $GITHUB_ENV |
102 | | -
|
103 | | - - name: Configure PHP (Ubuntu) |
104 | | - if: matrix.os == 'ubuntu-latest' |
| 66 | + - name: Configure PHP |
105 | 67 | working-directory: php-src |
106 | 68 | run: | |
107 | 69 | ./buildconf -f |
@@ -155,6 +117,91 @@ jobs: |
155 | 117 | --with-pdo-firebird \ |
156 | 118 | --enable-async |
157 | 119 |
|
| 120 | + - name: Build PHP |
| 121 | + working-directory: php-src |
| 122 | + run: | |
| 123 | + make -j"$(nproc)" |
| 124 | + sudo make install |
| 125 | + sudo mkdir -p /etc/php.d |
| 126 | + sudo chmod 777 /etc/php.d |
| 127 | + { |
| 128 | + echo "opcache.enable_cli=1" |
| 129 | + echo "opcache.protect_memory=1" |
| 130 | + } > /etc/php.d/opcache.ini |
| 131 | +
|
| 132 | + - name: Run tests |
| 133 | + working-directory: php-src/ext/async |
| 134 | + run: | |
| 135 | + /usr/local/bin/php -v |
| 136 | + /usr/local/bin/php ../../run-tests.php \ |
| 137 | + -d zend_extension=opcache.so \ |
| 138 | + -d opcache.enable_cli=1 \ |
| 139 | + -d opcache.jit_buffer_size=64M \ |
| 140 | + -d opcache.jit=tracing \ |
| 141 | + -d zend_test.observer.enabled=1 \ |
| 142 | + -d zend_test.observer.show_output=0 \ |
| 143 | + -P -q -x -j2 \ |
| 144 | + -g FAIL,BORK,LEAK,XLEAK \ |
| 145 | + --no-progress \ |
| 146 | + --offline \ |
| 147 | + --show-diff \ |
| 148 | + --show-slow 1000 \ |
| 149 | + --set-timeout 120 \ |
| 150 | + --repeat 2 |
| 151 | + |
| 152 | + build-cross-platform: |
| 153 | + strategy: |
| 154 | + fail-fast: false |
| 155 | + matrix: |
| 156 | + os: [windows-latest, macos-latest] |
| 157 | + include: |
| 158 | + - os: windows-latest |
| 159 | + platform: windows |
| 160 | + - os: macos-latest |
| 161 | + platform: macos |
| 162 | + |
| 163 | + runs-on: ${{ matrix.os }} |
| 164 | + |
| 165 | + steps: |
| 166 | + - name: Checkout php-async repo |
| 167 | + uses: actions/checkout@v4 |
| 168 | + with: |
| 169 | + path: async |
| 170 | + |
| 171 | + - name: Clone php-src (true-async-stable) |
| 172 | + run: | |
| 173 | + git clone --depth=1 --branch=true-async-stable https://github.com/true-async/php-src php-src |
| 174 | +
|
| 175 | + - name: Copy php-async extension into php-src |
| 176 | + run: | |
| 177 | + mkdir -p php-src/ext/async |
| 178 | + cp -r async/* php-src/ext/async/ |
| 179 | +
|
| 180 | + - name: Install build dependencies (Windows) |
| 181 | + if: matrix.os == 'windows-latest' |
| 182 | + run: | |
| 183 | + choco install -y visualstudio2022buildtools |
| 184 | + choco install -y git |
| 185 | + choco install -y cmake |
| 186 | + choco install -y vcpkg |
| 187 | + vcpkg install libuv:x64-windows |
| 188 | + vcpkg install openssl:x64-windows |
| 189 | + vcpkg install zlib:x64-windows |
| 190 | + vcpkg integrate install |
| 191 | + shell: cmd |
| 192 | + |
| 193 | + - name: Install build dependencies (macOS) |
| 194 | + if: matrix.os == 'macos-latest' |
| 195 | + run: | |
| 196 | + brew install autoconf bison re2c |
| 197 | + brew install gmp icu4c tidyhtml5 |
| 198 | + brew install libzip bzip2 sqlite oniguruma curl |
| 199 | + brew install libxml2 libxslt postgresql readline ldns libsodium |
| 200 | + brew install argon2 libuv openssl@3 |
| 201 | + echo "PKG_CONFIG_PATH=$(brew --prefix openssl@3)/lib/pkgconfig:$(brew --prefix icu4c)/lib/pkgconfig:$(brew --prefix libxml2)/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV |
| 202 | + echo "PATH=$(brew --prefix bison)/bin:$PATH" >> $GITHUB_ENV |
| 203 | +
|
| 204 | +
|
158 | 205 | - name: Configure PHP (Windows) |
159 | 206 | if: matrix.os == 'windows-latest' |
160 | 207 | working-directory: php-src |
@@ -234,39 +281,6 @@ jobs: |
234 | 281 | echo "opcache.protect_memory=1" |
235 | 282 | } > /usr/local/etc/php.d/opcache.ini |
236 | 283 |
|
237 | | - - name: Build PHP (Ubuntu) |
238 | | - if: matrix.os == 'ubuntu-latest' |
239 | | - working-directory: php-src |
240 | | - run: | |
241 | | - make -j"$(nproc)" |
242 | | - sudo make install |
243 | | - sudo mkdir -p /etc/php.d |
244 | | - sudo chmod 777 /etc/php.d |
245 | | - { |
246 | | - echo "opcache.enable_cli=1" |
247 | | - echo "opcache.protect_memory=1" |
248 | | - } > /etc/php.d/opcache.ini |
249 | | -
|
250 | | - - name: Run tests (Ubuntu) |
251 | | - if: matrix.os == 'ubuntu-latest' |
252 | | - working-directory: php-src/ext/async |
253 | | - run: | |
254 | | - /usr/local/bin/php -v |
255 | | - /usr/local/bin/php ../../run-tests.php \ |
256 | | - -d zend_extension=opcache.so \ |
257 | | - -d opcache.enable_cli=1 \ |
258 | | - -d opcache.jit_buffer_size=64M \ |
259 | | - -d opcache.jit=tracing \ |
260 | | - -d zend_test.observer.enabled=1 \ |
261 | | - -d zend_test.observer.show_output=0 \ |
262 | | - -P -q -x -j2 \ |
263 | | - -g FAIL,BORK,LEAK,XLEAK \ |
264 | | - --no-progress \ |
265 | | - --offline \ |
266 | | - --show-diff \ |
267 | | - --show-slow 1000 \ |
268 | | - --set-timeout 120 \ |
269 | | - --repeat 2 |
270 | 284 |
|
271 | 285 | - name: Run tests (Windows) |
272 | 286 | if: matrix.os == 'windows-latest' |
|
0 commit comments