mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
75 lines
2.4 KiB
YAML
75 lines
2.4 KiB
YAML
name: Test
|
|
on:
|
|
push:
|
|
paths-ignore: &ignore_paths
|
|
- docs/**
|
|
- NEWS
|
|
- UPGRADING
|
|
- UPGRADING.INTERNALS
|
|
- '**/README.*'
|
|
- CONTRIBUTING.md
|
|
- CODING_STANDARDS.md
|
|
- .cirrus.yml
|
|
- .circleci/**
|
|
branches:
|
|
- PHP-8.2
|
|
- PHP-8.3
|
|
- PHP-8.4
|
|
- PHP-8.5
|
|
- master
|
|
pull_request:
|
|
paths-ignore: *ignore_paths
|
|
branches:
|
|
- '**'
|
|
schedule:
|
|
- cron: "0 1 * * *"
|
|
workflow_dispatch: ~
|
|
permissions:
|
|
contents: read
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.url || github.run_id }}
|
|
cancel-in-progress: true
|
|
env:
|
|
CC: ccache gcc
|
|
CXX: ccache g++
|
|
jobs:
|
|
GENERATE_MATRIX:
|
|
name: Generate Matrix
|
|
if: github.repository == 'php/php-src' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
all_variations: ${{ steps.set-matrix.outputs.all_variations }}
|
|
branches: ${{ steps.set-matrix.outputs.branches }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
# When running nightly, set fetch-depth to 0 to clone the full
|
|
# repository including all branches. This is required to find the
|
|
# correct commit hashes.
|
|
fetch-depth: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && 0 || 1 }}
|
|
- name: Grab the commit mapping
|
|
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: branch-commit-cache.json
|
|
# The cache key needs to change every time for the
|
|
# cache to be updated after this job finishes.
|
|
key: nightly-${{ github.run_id }}-${{ github.run_attempt }}
|
|
restore-keys: |
|
|
nightly-
|
|
- name: Generate Matrix
|
|
id: set-matrix
|
|
run: php .github/matrix.php "${{ github.event_name }}" "${{ github.run_attempt }}" "${{ github.ref }}" '${{ toJSON(github.event.pull_request.labels) }}' "${{ github.repository }}"
|
|
PUSH:
|
|
needs: GENERATE_MATRIX
|
|
name: ${{ matrix.branch.name }}
|
|
uses: ./.github/workflows/test-suite.yml
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
|
|
with:
|
|
all_variations: ${{ needs.GENERATE_MATRIX.outputs.all_variations == 'true' }}
|
|
branch: ${{ toJSON(matrix.branch) }}
|
|
secrets: inherit
|