forked from udan11/php-xz
-
-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (53 loc) · 1.66 KB
/
windows-php8.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
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
# https://github.com/krakjoe/apcu/blob/5015af484a3f48289442cf1aff6a89f0f5aa3769/.github/workflows/config.yml
on:
- pull_request
- push
name: "Windows-PHP8"
jobs:
windows-php8:
name: "Build and Tests (Windows, PHP8)"
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
php: ["8.3", "8.2", "8.1", "8.0"]
arch: ["x64"] #, "x86"
ts: ["ts", "nts"]
runs-on: windows-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: "Install PHP SDK ${{matrix.php}}"
uses: codemasher/setup-php-sdk@no-toolkit
id: sdk
with:
version: ${{matrix.php}}
arch: ${{matrix.arch}}
ts: ${{matrix.ts}}
deps: liblzma
- name: "phpize"
run: phpize
- name: "configure build"
run: configure --enable-xz --with-prefix=${{steps.sdk.outputs.prefix}}
- name: "make"
run: nmake
- name: "test"
run: nmake test
- name: "Package"
run: |
md .artifact
copy ${{steps.sdk.outputs.buildpath}}\php_xz.dll .artifact\php_xz-${{steps.sdk.outputs.file_tag}}.dll
- name: "Upload artifacts"
uses: actions/upload-artifact@v3
if: contains(github.ref_type, 'branch')
with:
name: php_xz-php8-${{github.sha}}
path: .artifact
- name: "Attach file to release"
uses: softprops/action-gh-release@v1
if: contains(github.ref_type, 'tag')
with:
files: .artifact\php_xz-${{steps.sdk.outputs.file_tag}}.dll