Skip to content

Commit 4702575

Browse files
committed
.github: Add windows target for github workflows
1 parent 755fb1a commit 4702575

File tree

1 file changed

+58
-5
lines changed

1 file changed

+58
-5
lines changed

.github/workflows/main.yml

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,13 @@ on:
1111

1212
jobs:
1313
ubuntu:
14-
name: Test on Ubuntu
14+
name: Ubuntu
1515
runs-on: ubuntu-latest
1616

1717
strategy:
1818
fail-fast: false
1919
matrix:
2020
php-version:
21-
- "7.1"
22-
- "7.2"
23-
- "7.3"
24-
- "7.4"
2521
- "8.0"
2622
- "8.1"
2723
- "8.2"
@@ -60,3 +56,60 @@ jobs:
6056
-d extension=yaml.so
6157
--show-diff
6258
tests
59+
60+
windows:
61+
name: Windows
62+
runs-on: windows-2019
63+
64+
defaults:
65+
run:
66+
shell: cmd
67+
68+
strategy:
69+
fail-fast: false
70+
matrix:
71+
php-version:
72+
- "8.0"
73+
- "8.1"
74+
- "8.2"
75+
arch:
76+
- "x64"
77+
ts:
78+
- nts
79+
- ts
80+
vsversion:
81+
- "16.0"
82+
libyaml:
83+
- libyaml-0.1.7-vs16
84+
85+
steps:
86+
- name: Configure git
87+
run: git config --system core.autocrlf false
88+
- name: Checkout repo
89+
uses: actions/checkout@v3
90+
- name: Setup PHP
91+
id: setup-php
92+
uses: cmb69/[email protected]
93+
with:
94+
version: "${{ matrix.php-version }}"
95+
arch: "${{ matrix.arch }}"
96+
ts: "${{ matrix.ts }}"
97+
- name: Download deps
98+
run: |
99+
curl -LO https://windows.php.net/downloads/pecl/deps/${{ matrix.libyaml }}-${{ matrix.arch }}.zip
100+
7z x ${{ matrix.libyaml }}-${{ matrix.arch }}.zip -o..\deps
101+
dir ..\deps
102+
- name: Enable developer cli
103+
uses: ilammy/msvc-dev-cmd@v1
104+
with:
105+
arch: "${{ matrix.arch }}"
106+
toolset: "${{ steps.setup-php.outputs.toolset }}"
107+
vsversion: "${{ matrix.vsversion }}"
108+
- name: Generate build files
109+
run: phpize
110+
- name: Configure build
111+
run: configure --with-yaml --with-php-build=..\deps --with-prefix=${{ steps.setup-php.outputs.prefix }}
112+
- name: Build
113+
run: nmake /D /P
114+
- name: Run tests
115+
run: nmake test TESTS="-n --show-diff tests"

0 commit comments

Comments
 (0)