-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathaction.yml
55 lines (55 loc) · 1.69 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: 'Setup PHP-SDK Action'
description: "Setup Windows build environment for PHP extensions"
inputs:
version:
description: "PHP version to build for"
required: true
arch:
description: "The architecture to build for (x64 or x86)"
required: true
ts:
description: "Thread-safety (nts or ts)"
required: true
deps:
description: "List of dependency libraries"
required: false
default: '@()'
cache:
description: "Whether the PHP-SDK should be cached"
type: boolean
required: false
default: false
outputs:
toolset:
description: "The required toolset version"
value: ${{steps.setup.outputs.toolset}}
prefix:
description: "The prefix of the PHP installation"
value: ${{steps.setup.outputs.prefix}}
vs:
description: "The Visual Studio version"
value: ${{steps.setup.outputs.vs}}
runs:
using: "composite"
steps:
- name: Determine current PHP revision
id: revision
run: ${{github.action_path}}/determine-revision -version ${{inputs.version}}
shell: powershell
- name: Cache PHP SDK
if: ${{inputs.cache == 'true'}}
uses: actions/cache@v4
with:
path: php-sdk
key: php-sdk-2.3.0
- name: Cache PHP
if: ${{inputs.cache == 'true'}}
uses: actions/cache@v4
with:
path: |
php-bin
php-dev
key: php-${{steps.revision.outputs.version}}-${{inputs.arch}}-${{inputs.ts}}
- id: setup
run: ${{github.action_path}}/run -version ${{inputs.version}} -revision ${{steps.revision.outputs.version}} -baseurl ${{steps.revision.outputs.baseurl}} -arch ${{inputs.arch}} -ts ${{inputs.ts}} -deps ${{inputs.deps}}
shell: powershell