-
Notifications
You must be signed in to change notification settings - Fork 29
152 lines (131 loc) · 3.83 KB
/
windows.yaml
File metadata and controls
152 lines (131 loc) · 3.83 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: Windows
on:
push:
release:
types: [published]
env:
PHP_EXT: zstd
PHP_EXT_VERSION: ${{ github.event.release.tag_name }}
BIN_SDK_VER: 2.5.0
jobs:
ci:
permissions:
contents: read
strategy:
matrix:
php:
- '8.5'
- '8.4'
- '8.3'
- '8.2'
- '8.1'
arch:
- x64
- x86
ts:
- 'nts'
- 'ts'
vs:
- vs16
- vs17
library:
- false
- true
apcu:
- ''
- 'apcu'
exclude:
- php: '8.5'
vs: vs16
- php: '8.5'
vs: vs17
apcu: 'apcu'
- php: '8.4'
vs: vs16
- php: '8.4'
vs: vs17
apcu: 'apcu' # Doesn't exist
- php: '8.3'
vs: vs17
- php: '8.2'
vs: vs17
- php: '8.1'
vs: vs17
runs-on: windows-latest
env:
PHP_VER: ${{ matrix.php }}
PECL_APCU: ${{ matrix.apcu }}
VS: ${{ matrix.vs }}
ARCH: ${{ matrix.arch }}
TS: ${{ matrix.ts }}
if: contains(github.event.head_commit.message, 'ci skip') == false
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Checkout submodule
run: .\.github\workflows\submodule.ps1
shell: pwsh
if: ${{ ! matrix.library }}
- name: Install dependency library
run: .\.github\workflows\vcpkg.ps1
shell: pwsh
env:
VCPKG_LIBRARY: zstd
if: ${{ matrix.library }}
- uses: actions/cache@v4
with:
path: |
C:\php\php-*.zip
key: ${{ runner.os }}-php-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.vs }}-${{ matrix.arch }}
restore-keys: |
${{ runner.os }}-php-
- name: Install build command
run: .\.github\workflows\install.ps1
shell: pwsh
- name: Build
run: .\.github\workflows\build.ps1
shell: pwsh
- name: Test
run: .\.github\workflows\test.ps1
shell: pwsh
env:
REPORT_EXIT_STATUS: 1
NO_INTERACTION: 1
- if: ${{ github.event_name == 'release' && matrix.library == false && matrix.apcu == '' }}
name: Archive DLL
run: |-
Copy-Item .\php_${{ env.PHP_EXT }}.dll .\$env:EXT_NAME.dll
Compress-Archive -Path .\$env:EXT_NAME.dll -Destination .\$env:EXT_NAME.zip
shell: pwsh
env:
EXT_NAME: php_${{ env.PHP_EXT }}-${{ env.PHP_EXT_VERSION }}-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.vs }}-${{ matrix.arch == 'x64' && 'x86_64' || matrix.arch }}
- if: ${{ github.event_name == 'release' && matrix.library == false && matrix.apcu == '' }}
name: Store archive DLL
uses: actions/upload-artifact@v4
with:
name: ${{ env.PHP_EXT_VERSION }}-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.vs }}-${{ matrix.arch == 'x64' && 'x86_64' || matrix.arch }}
path: .\php_${{ env.PHP_EXT }}-${{ env.PHP_EXT_VERSION }}-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.vs }}-${{ matrix.arch == 'x64' && 'x86_64' || matrix.arch }}.zip
overwrite: true
release:
permissions:
contents: write
needs: ci
runs-on: ubuntu-latest
if: ${{ github.event_name == 'release' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Get artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Upload artifacts
run: gh release upload ${{ env.PHP_EXT_VERSION }} artifacts/php* --clobber
shell: bash
env:
GH_TOKEN: ${{ github.token }}