@@ -36,47 +36,25 @@ jobs:
36
36
fetch-depth : 2
37
37
submodules : true
38
38
39
- - name : Setup PHP SDK
40
- id : setup-php
41
-
39
+ - name : Prepare build environment
40
+ id : prepare-build
41
+ uses : ./.github/workflows/windows/prepare-build
42
42
with :
43
43
version : ${{ matrix.php }}
44
44
arch : ${{ matrix.arch }}
45
45
ts : ${{ matrix.ts }}
46
- deps : openssl
47
46
48
- - name : Enable Developer Command Prompt
49
- uses : ilammy/msvc-dev-cmd@v1
50
- with :
51
- arch : ${{ matrix.arch }}
52
- toolset : ${{ steps.setup-php.outputs.toolset }}
53
-
54
- - name : phpize
55
- run : phpize
56
-
57
- - name : configure
58
- run : configure --enable-mongodb --with-mongodb-sasl=yes --with-mongodb-client-side-encryption=yes --enable-debug-pack --with-prefix=${{ steps.setup-php.outputs.prefix }}
59
-
60
- - name : nmake
47
+ - name : Build driver
61
48
run : nmake /nologo
62
49
63
- - name : Get build directory
64
- id : get-build-dir
65
- run : |
66
- cp .github/workflows/get-build-dir.bat .
67
- for /F "usebackq tokens=*" %%i in (`get-build-dir.bat`) do set BUILD_DIR=%%i
68
- echo BUILD_DIR=%BUILD_DIR%
69
- @chcp 65001>nul
70
- echo build_dir=%BUILD_DIR%>> %GITHUB_OUTPUT%
71
-
72
50
- name : Cache build artifacts for subsequent builds
73
51
id : cache-build-artifacts
74
52
uses : actions/cache/save@v3
75
53
with :
76
54
key : ${{ github.sha }}-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.arch }}
77
55
path : |
78
- ${{ steps.get -build-dir .outputs.build_dir }}\php_mongodb.dll
79
- ${{ steps.get -build-dir .outputs.build_dir }}\php_mongodb.pdb
56
+ ${{ steps.prepare -build.outputs.build-dir }}\php_mongodb.dll
57
+ ${{ steps.prepare -build.outputs.build-dir }}\php_mongodb.pdb
80
58
81
59
test :
82
60
name : " Windows Tests"
@@ -101,35 +79,13 @@ jobs:
101
79
fetch-depth : 2
102
80
submodules : true
103
81
104
- - name : Setup PHP SDK
105
- id : setup-php
106
-
82
+ - name : Prepare build environment
83
+ id : prepare-build
84
+ uses : ./.github/workflows/windows/prepare-build
107
85
with :
108
86
version : ${{ matrix.php }}
109
87
arch : ${{ matrix.arch }}
110
88
ts : ${{ matrix.ts }}
111
- deps : openssl
112
-
113
- - name : Enable Developer Command Prompt
114
- uses : ilammy/msvc-dev-cmd@v1
115
- with :
116
- arch : ${{ matrix.arch }}
117
- toolset : ${{ steps.setup-php.outputs.toolset }}
118
-
119
- - name : phpize
120
- run : phpize
121
-
122
- - name : configure
123
- run : configure --enable-mongodb --with-mongodb-sasl=yes --with-mongodb-client-side-encryption=yes --enable-debug-pack --with-prefix=${{ steps.setup-php.outputs.prefix }}
124
-
125
- - name : Get build directory
126
- id : get-build-dir
127
- run : |
128
- cp .github/workflows/get-build-dir.bat .
129
- for /F "usebackq tokens=*" %%i in (`get-build-dir.bat`) do set BUILD_DIR=%%i
130
- echo BUILD_DIR=%BUILD_DIR%
131
- @chcp 65001>nul
132
- echo build_dir=%BUILD_DIR%>> %GITHUB_OUTPUT%
133
89
134
90
- name : Restore cached build artifacts
135
91
id : cache-build-artifacts
138
94
fail-on-cache-miss : true
139
95
key : ${{ github.sha }}-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.arch }}
140
96
path : |
141
- ${{ steps.get -build-dir .outputs.build_dir }}\php_mongodb.dll
142
- ${{ steps.get -build-dir .outputs.build_dir }}\php_mongodb.pdb
97
+ ${{ steps.prepare -build.outputs.build-dir }}\php_mongodb.dll
98
+ ${{ steps.prepare -build.outputs.build-dir }}\php_mongodb.pdb
143
99
144
100
- name : Start MongoDB
145
101
run : |
0 commit comments