Repository navigation
160 lines (138 loc) · 4.36 KB
/
Copy pathwindows.yaml
File metadata and controls
160 lines (138 loc) · 4.36 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
153
154
155
156
157
158
159
160
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
set-safe-directory: true
submodules: ${{ ! matrix.library }}
token: ${{ github.token }}
- name: Set up MSVC Developer Command Prompt
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
if: ${{ matrix.vs == 'vs17' }}
with:
arch: ${{ matrix.arch }}
toolset: '14.44'
- name: Install dependency library
run: .\.github\workflows\vcpkg.ps1
shell: pwsh
env:
VCPKG_LIBRARY: zstd
if: ${{ matrix.library }}
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
set-safe-directory: true
token: ${{ github.token }}
- name: Get artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
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 }}