Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5e68a4d

Browse files
authored
GHA Windows: Explicitly use cmd shell, as GH changed the defaul… (#4168)
GHA Windows: Explicitly use cmd shell, as GH changed the default to powershell
2 parents 84fed4d + 3443c36 commit 5e68a4d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/test-windows.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858
run: |
5959
"%pythonLocation%\python.exe" -m pip install wheel pytest pytest-cov
6060
pip install codecov
61+
shell: cmd
6162

6263
- name: Fetch dependencies
6364
run: |
@@ -96,6 +97,7 @@ jobs:
9697
copy /Y /B j*.h %INCLIB%
9798
copy /Y /B *.lib %INCLIB%
9899
copy /Y /B *.exe %INCLIB%
100+
shell: cmd
99101

100102
- name: Build dependencies / libjpeg-turbo
101103
run: |
@@ -114,6 +116,7 @@ jobs:
114116
copy /Y /B jpeg-static.lib %INCLIB%\libjpeg.lib
115117
copy /Y /B cjpeg-static.exe %INCLIB%\cjpeg.exe
116118
copy /Y /B djpeg-static.exe %INCLIB%\djpeg.exe
119+
shell: cmd
117120

118121
- name: Build dependencies / zlib
119122
run: |
@@ -128,6 +131,7 @@ jobs:
128131
copy /Y /B z*.h %INCLIB%
129132
copy /Y /B *.lib %INCLIB%
130133
copy /Y /B zlib.lib %INCLIB%\z.lib
134+
shell: cmd
131135

132136
- name: Build dependencies / LibTIFF
133137
run: |
@@ -143,6 +147,7 @@ jobs:
143147
copy /Y /B libtiff\tiff*.h %INCLIB%
144148
copy /Y /B libtiff\*.dll %INCLIB%
145149
copy /Y /B libtiff\*.lib %INCLIB%
150+
shell: cmd
146151

147152
- name: Build dependencies / WebP
148153
run: |
@@ -157,6 +162,7 @@ jobs:
157162
mkdir %INCLIB%\webp
158163
copy /Y /B src\webp\*.h %INCLIB%\webp
159164
copy /Y /B output\release-static\${{ matrix.architecture }}\lib\* %INCLIB%
165+
shell: cmd
160166

161167
- name: Build dependencies / FreeType
162168
run: |
@@ -176,6 +182,7 @@ jobs:
176182
%MSBUILD% builds\windows\vc2010\freetype.sln /t:Build /p:Configuration="Release Static" /p:Platform=${{ matrix.platform-msbuild }} /m
177183
xcopy /Y /E /Q include %INCLIB%
178184
copy /Y /B "objs\${{ matrix.platform-msbuild }}\Release Static\freetype.lib" %INCLIB%
185+
shell: cmd
179186

180187
- name: Build dependencies / LCMS2
181188
run: |
@@ -193,6 +200,7 @@ jobs:
193200
%MSBUILD% Projects\VC2015\lcms2.sln /t:Clean;lcms2_static /p:Configuration="Release" /p:Platform=${{ matrix.platform-msbuild }} /m
194201
xcopy /Y /E /Q include %INCLIB%
195202
copy /Y /B Lib\MS\*.lib %INCLIB%
203+
shell: cmd
196204

197205
- name: Build dependencies / OpenJPEG
198206
run: |
@@ -211,6 +219,7 @@ jobs:
211219
mkdir %INCLIB%\openjpeg-2.3.1
212220
copy /Y /B src\lib\openjp2\*.h %INCLIB%\openjpeg-2.3.1
213221
copy /Y /B bin\*.lib %INCLIB%
222+
shell: cmd
214223

215224
# GPL licensed; skip if building wheels
216225
- name: Build dependencies / libimagequant
@@ -233,6 +242,7 @@ jobs:
233242
nmake -nologo -f Makefile
234243
copy /Y /B *.h %INCLIB%
235244
copy /Y /B *.lib %INCLIB%
245+
shell: cmd
236246

237247
# for Raqm
238248
- name: Build dependencies / HarfBuzz
@@ -253,6 +263,7 @@ jobs:
253263
nmake -nologo -f Makefile harfbuzz
254264
copy /Y /B src\*.h %INCLIB%
255265
copy /Y /B *.lib %INCLIB%
266+
shell: cmd
256267

257268
# for Raqm
258269
- name: Build dependencies / FriBidi
@@ -272,6 +283,7 @@ jobs:
272283
nmake -nologo -f Makefile fribidi
273284
copy /Y /B lib\*.h %INCLIB%
274285
copy /Y /B *.lib %INCLIB%
286+
shell: cmd
275287

276288
# failing with PyPy3
277289
- name: Build dependencies / Raqm
@@ -293,6 +305,7 @@ jobs:
293305
nmake -nologo -f Makefile libraqm
294306
copy /Y /B src\*.h %INCLIB%
295307
copy /Y /B libraqm.dll %INCLIB%
308+
shell: cmd
296309

297310
- name: Build dependencies / ghostscript
298311
run: |
@@ -308,6 +321,7 @@ jobs:
308321
nmake -nologo -f psi\msvc.mak
309322
rem Add bin to PATH variable: Copy to INCLIB, then add INCLIB to PATH in Test step.
310323
copy /Y /B bin\* %INCLIB%
324+
shell: cmd
311325

312326
- name: Build Pillow
313327
run: |
@@ -323,6 +337,7 @@ jobs:
323337
rem Add GhostScript and Raqm binaries (copied to INCLIB) to PATH.
324338
path %INCLIB%;%PATH%
325339
%PYTHON%\python.exe selftest.py --installed
340+
shell: cmd
326341

327342
- name: Test Pillow
328343
run: |
@@ -332,9 +347,11 @@ jobs:
332347
path %INCLIB%;%PATH%
333348
cd /D %GITHUB_WORKSPACE%
334349
%PYTHON%\python.exe -m pytest -vx --cov PIL --cov-report term --cov-report xml Tests
350+
shell: cmd
335351

336352
- name: Upload coverage
337353
run: 'codecov --file "%GITHUB_WORKSPACE%\coverage.xml" --name "%pythonLocation%"'
354+
shell: cmd
338355

339356
- name: Build wheel
340357
id: wheel
@@ -351,6 +368,7 @@ jobs:
351368
set INCLUDE=%INCLIB%;%GITHUB_WORKSPACE%\depends\tcl86\include;%INCLUDE%
352369
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" ${{ matrix.platform-vcvars }} 8.1
353370
%PYTHON%\python.exe setup.py bdist_wheel
371+
shell: cmd
354372

355373
- uses: actions/upload-artifact@v1
356374
if: "github.event_name == 'push' && !contains(matrix.python-version, 'pypy')"

0 commit comments

Comments
 (0)