mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
Add macos-14 to the push and nightly workflows (#13299)
* Add macos-14 to the push workflow * Remove hardcoded brew path in configure-macos action * Include architecture in macos job name * Add os to ccache-action in macos job * Add libsodium in brew action Since we build with the configuration option --with-sodium, adding libsodium to make sure it is installed * Add fail-fast to macos matrix * Add macos-14 to the nightly workflow * Fix adding bison to PATH in workflows * Fix architecture * Use version to compare in nightly_matrix.php * Make sure test-macos artifacts have unique name * Update .github/nightly_matrix.php Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com> --------- Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
This commit is contained in:
1
.github/actions/brew/action.yml
vendored
1
.github/actions/brew/action.yml
vendored
@@ -31,6 +31,7 @@ runs:
|
||||
tidy-html5 \
|
||||
libxml2 \
|
||||
libjpeg \
|
||||
libsodium \
|
||||
libxslt \
|
||||
postgresql
|
||||
brew link icu4c gettext --force
|
||||
|
||||
35
.github/actions/configure-macos/action.yml
vendored
35
.github/actions/configure-macos/action.yml
vendored
@@ -9,15 +9,16 @@ runs:
|
||||
- shell: bash
|
||||
run: |
|
||||
set -x
|
||||
export PATH="/usr/local/opt/bison/bin:$PATH"
|
||||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl@1.1/lib/pkgconfig"
|
||||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/curl/lib/pkgconfig"
|
||||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/krb5/lib/pkgconfig"
|
||||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libffi/lib/pkgconfig"
|
||||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libxml2/lib/pkgconfig"
|
||||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libxslt/lib/pkgconfig"
|
||||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/zlib/lib/pkgconfig"
|
||||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/icu4c/lib/pkgconfig"
|
||||
BREW_OPT="$(brew --prefix)"/opt
|
||||
export PATH="$BREW_OPT/bison/bin:$PATH"
|
||||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/openssl@1.1/lib/pkgconfig"
|
||||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/curl/lib/pkgconfig"
|
||||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/krb5/lib/pkgconfig"
|
||||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/libffi/lib/pkgconfig"
|
||||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/libxml2/lib/pkgconfig"
|
||||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/libxslt/lib/pkgconfig"
|
||||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/zlib/lib/pkgconfig"
|
||||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/icu4c/lib/pkgconfig"
|
||||
./buildconf --force
|
||||
./configure \
|
||||
--enable-option-checking=fatal \
|
||||
@@ -25,8 +26,8 @@ runs:
|
||||
--enable-fpm \
|
||||
--with-pdo-mysql=mysqlnd \
|
||||
--with-mysqli=mysqlnd \
|
||||
--with-pgsql=/usr/local/opt/libpq \
|
||||
--with-pdo-pgsql=/usr/local/opt/libpq \
|
||||
--with-pgsql="$BREW_OPT"/libpq \
|
||||
--with-pdo-pgsql="$BREW_OPT"/libpq \
|
||||
--with-pdo-sqlite \
|
||||
--without-pear \
|
||||
--enable-gd \
|
||||
@@ -39,21 +40,21 @@ runs:
|
||||
--enable-soap \
|
||||
--enable-xmlreader \
|
||||
--with-xsl \
|
||||
--with-tidy=/usr/local/opt/tidy-html5 \
|
||||
--with-tidy="$BREW_OPT"/tidy-html5 \
|
||||
--with-libxml \
|
||||
--enable-sysvsem \
|
||||
--enable-sysvshm \
|
||||
--enable-shmop \
|
||||
--enable-pcntl \
|
||||
--with-readline=/usr/local/opt/readline \
|
||||
--with-readline="$BREW_OPT"/readline \
|
||||
--enable-mbstring \
|
||||
--with-curl \
|
||||
--with-gettext=/usr/local/opt/gettext \
|
||||
--with-gettext="$BREW_OPT"/gettext \
|
||||
--enable-sockets \
|
||||
--with-bz2=/usr/local/opt/bzip2 \
|
||||
--with-bz2="$BREW_OPT"/bzip2 \
|
||||
--with-openssl \
|
||||
--with-gmp=/usr/local/opt/gmp \
|
||||
--with-iconv=/usr/local/opt/libiconv \
|
||||
--with-gmp="$BREW_OPT"/gmp \
|
||||
--with-iconv="$BREW_OPT"/libiconv \
|
||||
--enable-bcmath \
|
||||
--enable-calendar \
|
||||
--enable-ftp \
|
||||
|
||||
@@ -5,7 +5,7 @@ runs:
|
||||
- shell: bash
|
||||
run: |
|
||||
set -x
|
||||
[[ "$OSTYPE" == "darwin"* ]] && export PATH="/usr/local/opt/bison/bin:$PATH"
|
||||
[[ "$OSTYPE" == "darwin"* ]] && export PATH="$(brew --prefix)/opt/bison/bin:$PATH"
|
||||
scripts/dev/credits
|
||||
scripts/dev/genfiles
|
||||
Zend/zend_vm_gen.php
|
||||
|
||||
29
.github/nightly_matrix.php
vendored
29
.github/nightly_matrix.php
vendored
@@ -91,6 +91,33 @@ function get_windows_matrix_include(array $branches) {
|
||||
return $jobs;
|
||||
}
|
||||
|
||||
function get_macos_matrix_include(array $branches) {
|
||||
$jobs = [];
|
||||
foreach ($branches as $branch) {
|
||||
foreach([true, false] as $debug) {
|
||||
foreach([true, false] as $zts) {
|
||||
$jobs[] = [
|
||||
'branch' => $branch,
|
||||
'debug' => $debug,
|
||||
'zts' => $zts,
|
||||
'os' => $branch === 'master' ? '13' : '12',
|
||||
'arch' => 'X64',
|
||||
];
|
||||
if ($branch['version']['minor'] >= 4 || $branch['version']['major'] >= 9) {
|
||||
$jobs[] = [
|
||||
'branch' => $branch,
|
||||
'debug' => $debug,
|
||||
'zts' => $zts,
|
||||
'os' => '14',
|
||||
'arch' => 'ARM64',
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $jobs;
|
||||
}
|
||||
|
||||
function get_current_version(): array {
|
||||
$file = dirname(__DIR__) . '/main/php_version.h';
|
||||
$content = file_get_contents($file);
|
||||
@@ -114,9 +141,11 @@ $branches = $branch === 'master'
|
||||
: [['name' => strtoupper($branch), 'ref' => $branch, 'version' => get_current_version()]];
|
||||
$matrix_include = get_matrix_include($branches);
|
||||
$windows_matrix_include = get_windows_matrix_include($branches);
|
||||
$macos_matrix_include = get_macos_matrix_include($branches);
|
||||
|
||||
$f = fopen(getenv('GITHUB_OUTPUT'), 'a');
|
||||
fwrite($f, 'branches=' . json_encode($branches, JSON_UNESCAPED_SLASHES) . "\n");
|
||||
fwrite($f, 'matrix-include=' . json_encode($matrix_include, JSON_UNESCAPED_SLASHES) . "\n");
|
||||
fwrite($f, 'windows-matrix-include=' . json_encode($windows_matrix_include, JSON_UNESCAPED_SLASHES) . "\n");
|
||||
fwrite($f, 'macos-matrix-include=' . json_encode($macos_matrix_include, JSON_UNESCAPED_SLASHES) . "\n");
|
||||
fclose($f);
|
||||
|
||||
19
.github/workflows/nightly.yml
vendored
19
.github/workflows/nightly.yml
vendored
@@ -14,6 +14,7 @@ jobs:
|
||||
branches: ${{ steps.set-matrix.outputs.branches }}
|
||||
matrix-include: ${{ steps.set-matrix.outputs.matrix-include }}
|
||||
windows-matrix-include: ${{ steps.set-matrix.outputs.windows-matrix-include }}
|
||||
macos-matrix-include: ${{ steps.set-matrix.outputs.macos-matrix-include }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -230,11 +231,9 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
|
||||
debug: [true, false]
|
||||
zts: [true, false]
|
||||
name: "${{ matrix.branch.name }}_MACOS_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
|
||||
runs-on: macos-${{ matrix.branch.version.minor >= 4 && '13' || '12' }}
|
||||
include: ${{ fromJson(needs.GENERATE_MATRIX.outputs.macos-matrix-include) }}
|
||||
name: "${{ matrix.branch.name }}_MACOS_${{ matrix.arch }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
|
||||
runs-on: macos-${{ matrix.os }}
|
||||
steps:
|
||||
- name: git checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -250,18 +249,18 @@ jobs:
|
||||
--${{ matrix.zts && 'enable' || 'disable' }}-zts
|
||||
- name: make
|
||||
run: |-
|
||||
export PATH="/usr/local/opt/bison/bin:$PATH"
|
||||
export PATH="$(brew --prefix)/opt/bison/bin:$PATH"
|
||||
make -j$(sysctl -n hw.logicalcpu) >/dev/null
|
||||
- name: make install
|
||||
run: sudo make install
|
||||
- name: Test
|
||||
uses: ./.github/actions/test-macos
|
||||
with:
|
||||
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}
|
||||
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.arch }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}
|
||||
- name: Test Tracing JIT
|
||||
uses: ./.github/actions/test-macos
|
||||
with:
|
||||
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Tracing JIT
|
||||
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.arch }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Tracing JIT
|
||||
jitType: tracing
|
||||
runTestsParameters: >-
|
||||
-d zend_extension=opcache.so
|
||||
@@ -269,14 +268,14 @@ jobs:
|
||||
- name: Test OpCache
|
||||
uses: ./.github/actions/test-macos
|
||||
with:
|
||||
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} OpCache
|
||||
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.arch }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} OpCache
|
||||
runTestsParameters: >-
|
||||
-d zend_extension=opcache.so
|
||||
-d opcache.enable_cli=1
|
||||
- name: Test Function JIT
|
||||
uses: ./.github/actions/test-macos
|
||||
with:
|
||||
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Function JIT
|
||||
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.arch }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Function JIT
|
||||
jitType: function
|
||||
runTestsParameters: >-
|
||||
-d zend_extension=opcache.so
|
||||
|
||||
17
.github/workflows/push.yml
vendored
17
.github/workflows/push.yml
vendored
@@ -148,7 +148,16 @@ jobs:
|
||||
if: ${{ !matrix.asan }}
|
||||
uses: ./.github/actions/verify-generated-files
|
||||
MACOS_DEBUG_NTS:
|
||||
runs-on: macos-13
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: 13
|
||||
arch: X64
|
||||
- os: 14
|
||||
arch: ARM64
|
||||
name: MACOS_${{ matrix.arch }}_DEBUG_NTS
|
||||
runs-on: macos-${{ matrix.os }}
|
||||
steps:
|
||||
- name: git checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -157,7 +166,7 @@ jobs:
|
||||
- name: ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: "${{github.job}}-${{hashFiles('main/php_version.h')}}"
|
||||
key: "${{github.job}}-${{matrix.os}}-${{hashFiles('main/php_version.h')}}"
|
||||
append-timestamp: false
|
||||
- name: ./configure
|
||||
uses: ./.github/actions/configure-macos
|
||||
@@ -165,14 +174,14 @@ jobs:
|
||||
configurationParameters: --enable-debug --disable-zts
|
||||
- name: make
|
||||
run: |-
|
||||
export PATH="/usr/local/opt/bison/bin:$PATH"
|
||||
export PATH="$(brew --prefix)/opt/bison/bin:$PATH"
|
||||
make -j$(sysctl -n hw.logicalcpu) >/dev/null
|
||||
- name: make install
|
||||
run: sudo make install
|
||||
- name: Test Tracing JIT
|
||||
uses: ./.github/actions/test-macos
|
||||
with:
|
||||
testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Tracing JIT
|
||||
testArtifacts: ${{ matrix.arch }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Tracing JIT
|
||||
jitType: tracing
|
||||
runTestsParameters: >-
|
||||
-d zend_extension=opcache.so
|
||||
|
||||
Reference in New Issue
Block a user