mirror of
https://github.com/php/php-windows-builder.git
synced 2026-03-24 07:32:19 +01:00
104 lines
3.1 KiB
YAML
104 lines
3.1 KiB
YAML
# Caution: This workflow is internal to the php-windows-builder repository.
|
|
# Do not copy this workflow to your repository.
|
|
# Instead, refer to the workflows in the examples/ directory.
|
|
|
|
name: Build PHP Extension
|
|
run-name: Build PHP Extension ${{ inputs.extension-url }}, ${{ inputs.extension-ref }}
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
extension-url:
|
|
description: 'Extension URL'
|
|
required: true
|
|
extension-ref:
|
|
description: 'Extension ref'
|
|
required: true
|
|
php-version-list:
|
|
description: 'PHP versions to build'
|
|
required: false
|
|
arch-list:
|
|
type: choice
|
|
options: ['x64', 'x86', 'x64,x86']
|
|
description: 'Architectures to build'
|
|
required: false
|
|
default: 'x64,x86'
|
|
ts-list:
|
|
type: choice
|
|
options: ['nts', 'ts', 'nts,ts']
|
|
description: 'Thread safety to build'
|
|
required: false
|
|
default: 'nts,ts'
|
|
args:
|
|
description: 'Configure arguments'
|
|
required: false
|
|
libs:
|
|
description: 'Libraries'
|
|
required: false
|
|
run-tests:
|
|
type: choice
|
|
options: ['true', 'false']
|
|
description: 'Run tests after building the extension'
|
|
required: false
|
|
default: 'false'
|
|
test-runner:
|
|
description: 'Test runner to use'
|
|
required: false
|
|
default: 'run-tests.php'
|
|
test-opcache-mode:
|
|
type: choice
|
|
options: ['on', 'off', 'both']
|
|
description: 'Test opcache mode'
|
|
required: false
|
|
default: 'off'
|
|
jobs:
|
|
get-extension-matrix:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
matrix: ${{ steps.extension-matrix.outputs.matrix }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
- name: Get the extension matrix
|
|
id: extension-matrix
|
|
uses: ./extension-matrix
|
|
with:
|
|
extension-url: ${{ inputs.extension-url }}
|
|
extension-ref: ${{ inputs.extension-ref }}
|
|
php-version-list: ${{ inputs.php-version-list }}
|
|
arch-list: ${{ inputs.arch-list }}
|
|
ts-list: ${{ inputs.ts-list }}
|
|
|
|
extension:
|
|
needs: get-extension-matrix
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix: ${{fromJson(needs.get-extension-matrix.outputs.matrix)}}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
- name: Build the extension
|
|
uses: ./extension
|
|
with:
|
|
extension-url: ${{ inputs.extension-url }}
|
|
extension-ref: ${{ inputs.extension-ref }}
|
|
php-version: ${{ matrix.php-version }}
|
|
arch: ${{ matrix.arch }}
|
|
ts: ${{ matrix.ts }}
|
|
args: ${{ inputs.args }}
|
|
libs: ${{ inputs.libs }}
|
|
run-tests: ${{ inputs.run-tests }}
|
|
test-runner: ${{ inputs.test-runner }}
|
|
test-opcache-mode: ${{ inputs.test-opcache-mode }}
|
|
build-directory: C:\build
|
|
|
|
artifacts:
|
|
runs-on: ubuntu-latest
|
|
needs: extension
|
|
steps:
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact/merge@v7
|
|
with:
|
|
name: artifacts
|
|
delete-merged: true
|