Build PHP Extension #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build PHP Extension | |
on: | |
workflow_dispatch: | |
inputs: | |
extension-url: | |
description: 'Extension URL' | |
required: true | |
extension-ref: | |
description: 'Extension ref' | |
required: true | |
run-tests: | |
description: 'Run tests after building the extension' | |
required: false | |
default: 'false' | |
test-runner: | |
description: 'Test runner to use' | |
required: false | |
default: 'run-tests.php' | |
artifact-naming-scheme: | |
description: 'Naming schema for the artifacts, pie or pecl' | |
required: false | |
default: 'pie' | |
jobs: | |
get-extension-matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.extension-matrix.outputs.matrix }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get the extension matrix | |
id: extension-matrix | |
uses: ./extension-matrix | |
with: | |
extension-url: ${{ inputs.extension-url }} | |
extension-ref: ${{ inputs.extension-ref }} | |
arch-list: 'x64, x86' | |
ts-list: 'nts, ts' | |
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@v4 | |
- name: Build the extension | |
uses: ./extension | |
with: | |
artifact-naming-scheme: ${{ inputs.artifact-naming-scheme }} | |
extension-url: ${{ inputs.extension-url }} | |
extension-ref: ${{ inputs.extension-ref }} | |
php-version: ${{ matrix.php-version }} | |
arch: ${{ matrix.arch }} | |
ts: ${{ matrix.ts }} | |
run-tests: ${{ inputs.run-tests }} | |
test-runner: ${{ inputs.test-runner }} | |
artifacts: | |
runs-on: ubuntu-latest | |
needs: extension | |
steps: | |
- name: Upload artifacts | |
uses: actions/upload-artifact/merge@v4 | |
with: | |
name: artifacts | |
delete-merged: true |