1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 11:13:36 +02:00

Migrate --repeat 2 job to GitHub actions

This commit is contained in:
Ilija Tovilo
2022-09-23 23:28:43 +02:00
parent 5c72029e60
commit 2cf7d70e53
3 changed files with 14 additions and 10 deletions
+12 -3
View File
@@ -42,7 +42,7 @@ function get_branches() {
return get_branch_matrix($changed_branches);
}
function get_asan_matrix(array $branches) {
function get_matrix_include(array $branches) {
$jobs = [];
foreach ($branches as $branch) {
$jobs[] = [
@@ -53,6 +53,15 @@ function get_asan_matrix(array $branches) {
'configuration_parameters' => "CFLAGS='-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC' LDFLAGS='-fsanitize=undefined,address'",
'run_tests_parameters' => '--asan',
];
if ($branch !== 'PHP-8.0') {
$jobs[] = [
'name' => '_REPEAT',
'branch' => $branch,
'debug' => true,
'zts' => false,
'run_tests_parameters' => '--repeat 2',
];
}
}
return $jobs;
}
@@ -65,7 +74,7 @@ if ($discard_cache) {
}
$branches = get_branches();
$asan_matrix = get_asan_matrix($branches);
$matrix_include = get_matrix_include($branches);
echo '::set-output name=branches::' . json_encode($branches, JSON_UNESCAPED_SLASHES) . "\n";
echo '::set-output name=asan-matrix::' . json_encode($asan_matrix, JSON_UNESCAPED_SLASHES) . "\n";
echo '::set-output name=matrix-include::' . json_encode($matrix_include, JSON_UNESCAPED_SLASHES) . "\n";
+2 -2
View File
@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
branches: ${{ steps.set-matrix.outputs.branches }}
asan-matrix: ${{ steps.set-matrix.outputs.asan-matrix }}
matrix-include: ${{ steps.set-matrix.outputs.matrix-include }}
steps:
- uses: actions/checkout@v2
with:
@@ -39,7 +39,7 @@ jobs:
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
debug: [true, false]
zts: [true, false]
include: ${{ fromJson(needs.GENERATE_MATRIX.outputs.asan-matrix) }}
include: ${{ fromJson(needs.GENERATE_MATRIX.outputs.matrix-include) }}
name: "${{ matrix.branch.name }}_LINUX_X64${{ matrix.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
runs-on: ubuntu-20.04
steps: