-
-
Notifications
You must be signed in to change notification settings - Fork 2
148 lines (146 loc) · 4.45 KB
/
build.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
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
name: 'Build'
on:
push:
workflow_dispatch:
schedule:
- cron: '30 0 * * *'
jobs:
vs16:
name: build
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
php: ['8.0', '8.1', '8.2', '8.3']
extensions: [pcov, xdebug, sqlsrv, pdo_sqlsrv]
sdk_version: [master]
vs: [vs16]
ts: [ts, nts]
arch: [x64, x86]
include:
- extensions: pcov
repo: krakjoe/pcov
branch: issue-php84
dev_branch: issue-php84
args: enable-pcov
- extensions: xdebug
repo: shivammathur/xdebug
branch: master
dev_branch: master
args: with-xdebug
- extensions: sqlsrv
repo: https://pecl.php.net/package/sqlsrv
branch: latest
dev_branch: latest
args: enable-sqlsrv
- extensions: pdo_sqlsrv
repo: https://pecl.php.net/package/pdo_sqlsrv
branch: latest
dev_branch: latest
args: with-pdo-sqlsrv
- extensions: sqlsrv
php: '8.0'
repo: https://pecl.php.net/package/sqlsrv
branch: '5.11.0'
dev_branch: '5.11.0'
args: enable-sqlsrv
- extensions: pdo_sqlsrv
php: '8.0'
repo: https://pecl.php.net/package/pdo_sqlsrv
branch: '5.11.0'
dev_branch: '5.11.0'
args: with-pdo-sqlsrv
exclude:
- extensions: sqlsrv
php: '8.4'
- extensions: pdo_sqlsrv
php: '8.4'
steps:
- uses: actions/checkout@v4
- name: build
run: |
pwsh scripts/builder.ps1 ${{ matrix.extensions }} ${{ matrix.repo }} ${{ matrix.branch }} ${{ matrix.dev_branch }} ${{ matrix.args }} ${{ matrix.sdk_version }} ${{ matrix.vs }} ${{ matrix.arch }} ${{ matrix.ts }} ${{ matrix.php }}
$exit_code = $?
if(-not($exit_code)) {
exit $exit_code
}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.extensions }}_${{ matrix.php }}_${{ matrix.ts }}_${{ matrix.arch }}
path: ${{ matrix.extensions }}
vs17:
name: build
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
php: ['8.4', '8.5']
extensions: [pcov, xdebug, sqlsrv, pdo_sqlsrv]
sdk_version: [master]
vs: [vs17]
ts: [ts, nts]
arch: [x64, x86]
include:
- extensions: pcov
repo: krakjoe/pcov
branch: issue-php84
dev_branch: issue-php84
args: enable-pcov
- extensions: xdebug
repo: shivammathur/xdebug
branch: master
dev_branch: master
args: with-xdebug
- extensions: sqlsrv
repo: https://pecl.php.net/package/sqlsrv
branch: latest
dev_branch: latest
args: enable-sqlsrv
- extensions: pdo_sqlsrv
repo: https://pecl.php.net/package/pdo_sqlsrv
branch: latest
dev_branch: latest
args: with-pdo-sqlsrv
exclude:
- extensions: sqlsrv
php: '8.4'
- extensions: pdo_sqlsrv
php: '8.4'
steps:
- uses: actions/checkout@v4
- name: build
run: |
pwsh scripts/builder.ps1 ${{ matrix.extensions }} ${{ matrix.repo }} ${{ matrix.branch }} ${{ matrix.dev_branch }} ${{ matrix.args }} ${{ matrix.sdk_version }} ${{ matrix.vs }} ${{ matrix.arch }} ${{ matrix.ts }} ${{ matrix.php }}
$exit_code = $?
if(-not($exit_code)) {
exit $exit_code
}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.extensions }}_${{ matrix.php }}_${{ matrix.ts }}_${{ matrix.arch }}
path: ${{ matrix.extensions }}
release:
runs-on: ubuntu-latest
needs: [vs16, vs17]
steps:
- uses: actions/checkout@v4
- run: mkdir ext
- uses: actions/download-artifact@v4
with:
path: ext
- name: Release
run: |
set -x
assets=()
for asset in ./ext/*/*.dll; do
assets+=("$asset")
done
if ! gh release view builds; then
gh release create "builds" "${assets[@]}" -t "builds" -n "builds"
else
gh release upload "builds" "${assets[@]}" --clobber
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}