Skip to content

Commit 0141faf

Browse files
committed
try build php ext and lib
1 parent 9806562 commit 0141faf

2 files changed

Lines changed: 55 additions & 16 deletions

File tree

.github/workflows/windows.yml

Lines changed: 53 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Publish Windows Releases
22
on:
3+
workflow_dispatch: ~
34
release:
45
types: [created]
56
push:
@@ -14,7 +15,8 @@ jobs:
1415
strategy:
1516
fail-fast: true
1617
matrix:
17-
arch: [x64, x86]
18+
# arch: [x64, x86]
19+
arch: [x64]
1820
steps:
1921
- name: Checkout
2022
uses: actions/checkout@v5
@@ -29,19 +31,17 @@ jobs:
2931
cd tcl
3032
Invoke-WebRequest -Uri https://github.com/tcltk/tcl/releases/download/core-9-0-3/tcl9.0.3-src.tar.gz -outFile tcl.tar.gz
3133
7z x tcl.tar.gz -so | 7z x -aoa -si -ttar -o"."
32-
dir
33-
dir tcl9.0.3
3434
cd tcl9.0.3\win
3535
mkdir install
3636
nmake -f Makefile.vc all INSTALLDIR=.\install
3737
nmake -f Makefile.vc install INSTALLDIR=.\install
38-
dir
39-
dir install
38+
7z a tcl.zip .\install
4039
- name: Upload TCL library
4140
uses: actions/upload-artifact@v5
4241
with:
43-
name: tcl-${{ matrix.php }}-${{ matrix.arch }}
44-
path: win\install
42+
name: tcl-${{ matrix.arch }}
43+
path: tcl\tcl9.0.3\win\tcl.zip
44+
if-no-files-found: error
4545

4646
get-extension-matrix:
4747
runs-on: ubuntu-latest
@@ -55,31 +55,68 @@ jobs:
5555
uses: php/php-windows-builder/extension-matrix@v1
5656
with:
5757
arch-list: x64
58-
php-version-list: 8.0
58+
php-version-list: "8.0"
5959
ts-list: nts
6060

6161
build:
6262
needs: [get-extension-matrix, build-lib]
63-
runs-on: ${{ matrix.os }}
63+
runs-on: windows-2022
6464
continue-on-error: false
6565
strategy:
6666
fail-fast: true
6767
matrix: ${{fromJson(needs.get-extension-matrix.outputs.matrix)}}
6868
steps:
6969
- name: Checkout
7070
uses: actions/checkout@v5
71-
71+
- name: prepare
72+
run: |
73+
mkdir ..\tcl
7274
- name: Download native lib
7375
uses: actions/download-artifact@v5
7476
with:
7577
name: tcl-${{ matrix.arch }}
76-
- name: Build the extension
77-
uses: php/php-windows-builder/extension@v1
78+
79+
- name: Extract native lib
80+
run: |
81+
dir
82+
7z x tcl.zip -o"..\tcl"
83+
dir ..
84+
85+
- name: Setup PHP SDK
86+
id: setup-php-windows
87+
uses: php/setup-php-sdk@v0.12
7888
with:
79-
php-version: ${{ matrix.php-version }}
80-
arch: ${{ matrix.arch }}
81-
ts: ${{ matrix.ts }}
82-
args: '--with-expect'
89+
version: ${{ matrix.php-rel }}
90+
arch: ${{ matrix.platform }}
91+
ts: ${{ matrix.ts-state }}
92+
deps: ${{ env.PHP_SDK_DEPS }}
93+
94+
- name: Enable Developer Command Prompt
95+
uses: ilammy/msvc-dev-cmd@v1
96+
with:
97+
arch: ${{ matrix.platform }}
98+
toolset: ${{ steps.setup-php-windows.outputs.toolset }}
99+
100+
- run: phpize
101+
- run: configure --with-expect --with-extra-includes="..\tcl\include" --with-extra-libs="..\tcl\lib" --with-prefix=${{steps.setup-php-sdk.outputs.prefix}}
102+
- run: nmake
103+
- run: nmake test TESTS=tests
104+
105+
106+
# - name: Upload TCL library
107+
# uses: actions/upload-artifact@v5
108+
# with:
109+
# name: tcl-${{ matrix.php }}-${{ matrix.arch }}
110+
# path: |
111+
# win\install\
112+
113+
# - name: Build the extension
114+
# uses: php/php-windows-builder/extension@v1
115+
# with:
116+
# php-version: ${{ matrix.php-version }}
117+
# arch: ${{ matrix.arch }}
118+
# ts: ${{ matrix.ts }}
119+
# args: '--with-expect'
83120
release:
84121
runs-on: ubuntu-latest
85122
needs: build

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ PHP extension for expect library
33

44
This extension allows to interact with processes through PTY, using expect library.
55

6+
This extension uses a Tcl/Expect library: https://www.tcl-lang.org/.
7+
68
Original author: Michael Spector
79

810
Maintained branches:

0 commit comments

Comments
 (0)