Skip to content

Commit 23e8a8c

Browse files
committed
simplify, scripts are for CI only
1 parent f09be7e commit 23e8a8c

File tree

4 files changed

+51
-35
lines changed

4 files changed

+51
-35
lines changed

.github/scripts/windows/build.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
@echo on
22

3+
if /i "%APPVEYOR%%GITHUB_ACTIONS%" neq "True" (
4+
echo for CI only
5+
exit /b 3
6+
)
7+
38
set SDK_REMOTE=https://github.com/php/php-sdk-binary-tools.git
49
set SDK_BRANCH=%PHP_BUILD_SDK_BRANCH%
510
set SDK_RUNNER=%PHP_BUILD_CACHE_SDK_DIR%\phpsdk-%PHP_BUILD_CRT%-%PLATFORM%.bat

.github/scripts/windows/build_task.bat

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,46 @@
11
@echo on
22

3-
if /i "%APPVEYOR%%GITHUB_ACTIONS%" equ "True" (
4-
rem rmdir takes several minutes for large directories, rename instead
5-
if /i "%APPVEYOR%" equ "True" (
6-
rmdir /s /q C:\cygwin >NUL 2>NUL
7-
if %errorlevel% neq 0 exit /b 3
8-
rmdir /s /q C:\cygwin64 >NUL 2>NUL
9-
if %errorlevel% neq 0 exit /b 3
10-
rmdir /s /q C:\mingw >NUL 2>NUL
11-
if %errorlevel% neq 0 exit /b 3
12-
rmdir /s /q C:\mingw-w64 >NUL 2>NUL
13-
if %errorlevel% neq 0 exit /b 3
14-
rmdir /s /q C:\msys64 >NUL 2>NUL
15-
if %errorlevel% neq 0 exit /b 3
16-
) else (
17-
rename C:\cygwin C:\trash-cygwin
18-
if %errorlevel% neq 0 exit /b 3
19-
rename C:\cygwin64 C:\trash-cygwin64
20-
if %errorlevel% neq 0 exit /b 3
21-
rename C:\mingw C:\trash-mingw
22-
if %errorlevel% neq 0 exit /b 3
23-
rename C:\mingw-w64 C:\trash-mingw-w64
24-
if %errorlevel% neq 0 exit /b 3
25-
rename C:\msys64 C:\trash-msys64
26-
if %errorlevel% neq 0 exit /b 3
27-
)
28-
rmdir /s /q c:\OpenSSL-Win32 >NUL 2>NUL
3+
if /i "%APPVEYOR%%GITHUB_ACTIONS%" neq "True" (
4+
echo for CI only
5+
exit /b 3
6+
)
7+
8+
rem rmdir takes several minutes for large directories, rename instead
9+
if /i "%APPVEYOR%" equ "True" (
10+
rmdir /s /q C:\cygwin >NUL 2>NUL
11+
if %errorlevel% neq 0 exit /b 3
12+
rmdir /s /q C:\cygwin64 >NUL 2>NUL
13+
if %errorlevel% neq 0 exit /b 3
14+
rmdir /s /q C:\mingw >NUL 2>NUL
2915
if %errorlevel% neq 0 exit /b 3
30-
rmdir /s /q c:\OpenSSL-Win64 >NUL 2>NUL
16+
rmdir /s /q C:\mingw-w64 >NUL 2>NUL
17+
if %errorlevel% neq 0 exit /b 3
18+
rmdir /s /q C:\msys64 >NUL 2>NUL
19+
if %errorlevel% neq 0 exit /b 3
20+
) else (
21+
rename C:\cygwin C:\trash-cygwin
3122
if %errorlevel% neq 0 exit /b 3
32-
rmdir /s /q c:\OpenSSL-v11-Win32 >NUL 2>NUL
23+
rename C:\cygwin64 C:\trash-cygwin64
3324
if %errorlevel% neq 0 exit /b 3
34-
rmdir /s /q c:\OpenSSL-v11-Win64 >NUL 2>NUL
25+
rename C:\mingw C:\trash-mingw
3526
if %errorlevel% neq 0 exit /b 3
36-
del /f /q C:\Windows\System32\libcrypto-1_1-x64.dll >NUL 2>NUL
27+
rename C:\mingw-w64 C:\trash-mingw-w64
3728
if %errorlevel% neq 0 exit /b 3
38-
del /f /q C:\Windows\System32\libssl-1_1-x64.dll >NUL 2>NUL
29+
rename C:\msys64 C:\trash-msys64
3930
if %errorlevel% neq 0 exit /b 3
4031
)
32+
rmdir /s /q c:\OpenSSL-Win32 >NUL 2>NUL
33+
if %errorlevel% neq 0 exit /b 3
34+
rmdir /s /q c:\OpenSSL-Win64 >NUL 2>NUL
35+
if %errorlevel% neq 0 exit /b 3
36+
rmdir /s /q c:\OpenSSL-v11-Win32 >NUL 2>NUL
37+
if %errorlevel% neq 0 exit /b 3
38+
rmdir /s /q c:\OpenSSL-v11-Win64 >NUL 2>NUL
39+
if %errorlevel% neq 0 exit /b 3
40+
del /f /q C:\Windows\System32\libcrypto-1_1-x64.dll >NUL 2>NUL
41+
if %errorlevel% neq 0 exit /b 3
42+
del /f /q C:\Windows\System32\libssl-1_1-x64.dll >NUL 2>NUL
43+
if %errorlevel% neq 0 exit /b 3
4144

4245
if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" (
4346
set BRANCH=%APPVEYOR_REPO_BRANCH:~4,3%

.github/scripts/windows/test.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
@echo on
22

3+
if /i "%APPVEYOR%%GITHUB_ACTIONS%" neq "True" (
4+
echo for CI only
5+
exit /b 3
6+
)
7+
38
set SDK_RUNNER=%PHP_BUILD_CACHE_SDK_DIR%\phpsdk-%PHP_BUILD_CRT%-%PLATFORM%.bat
49
if not exist "%SDK_RUNNER%" (
510
echo "%SDK_RUNNER%" doesn't exist

.github/scripts/windows/test_task.bat

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
@echo on
22

3+
if /i "%APPVEYOR%%GITHUB_ACTIONS%" neq "True" (
4+
echo for CI only
5+
exit /b 3
6+
)
7+
38
set NO_INTERACTION=1
49
set REPORT_EXIT_STATUS=1
510
set SKIP_IO_CAPTURE_TESTS=1
@@ -49,10 +54,8 @@ if /i "%APPVEYOR%" equ "True" (
4954
)
5055

5156
rem prepare for ext/openssl
52-
if /i "%APPVEYOR%%GITHUB_ACTIONS%" equ "True" (
53-
rmdir /s /q C:\OpenSSL-Win32 >NUL 2>NUL
54-
rmdir /s /q C:\OpenSSL-Win64 >NUL 2>NUL
55-
)
57+
rmdir /s /q C:\OpenSSL-Win32 >NUL 2>NUL
58+
rmdir /s /q C:\OpenSSL-Win64 >NUL 2>NUL
5659
if "%PLATFORM%" == "x86" (
5760
set OPENSSLDIR="C:\Program Files (x86)\Common Files\SSL"
5861
) else (

0 commit comments

Comments
 (0)