update #815
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-php-cli-windows-vs2019 | |
on: | |
push: | |
pull_request: | |
env: | |
BUILD_PHP_VERSION: 8.2.13 | |
jobs: | |
windows-native: | |
if: 0 | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
php-version: | |
# - "8.2.13" | |
# - "8.1.27" | |
- "8.3.7" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ilammy/[email protected] | |
with: | |
arch: amd64 | |
- name: show environment info | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
env | |
ipconfig | |
uname -a | |
pwd | |
ipconfig /all | |
# 显示逻辑cpu 个数 | |
wmic cpu get NumberOfLogicalProcessors /value | |
# echo %NUMBER_OF_PROCESSORS% | |
Write-Output $env:NUMBER_OF_PROCESSORS | |
systeminfo | |
echo "BUILD_PHP_VERSION=${{ matrix.php-version }}" >> $Env:GITHUB_ENV | |
- uses: msys2/setup-msys2@v2 | |
- name: prepare build environment and download source code | |
shell: msys2 {0} | |
run: | | |
CURRENT_DIR=$(pwd) | |
echo $CURRENT_DIR | |
- name: Install Soft | |
shell: cmd | |
run: | | |
sapi\quickstart\windows\native-build\install-deps-soft.bat | |
- name: Set Github ENV variables | |
run: | | |
$CURRENT_DIR = Get-Location | |
echo "PHP_SDK_ARCH=x64" >> $Env:GITHUB_ENV | |
echo "PHP_SDK_BIN_PATH=${CURRENT_DIR}\php-sdk-binary-tools\bin" >> $Env:GITHUB_ENV | |
echo "PHP_SDK_MSYS2_PATH=${CURRENT_DIR}\php-sdk-binary-tools\msys2\usr\bin" >> $Env:GITHUB_ENV | |
echo "PHP_SDK_OS_ARCH=x64" >> $Env:GITHUB_ENV | |
echo "PHP_SDK_PHP_CMD=${CURRENT_DIR}\php-sdk-binary-tools\bin\php\do_php.bat" >> $Env:GITHUB_ENV | |
echo "PHP_SDK_ROOT_PATH=${CURRENT_DIR}\php-sdk-binary-tools" >> $Env:GITHUB_ENV | |
echo "PHP_SDK_VC_DIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC" >> $Env:GITHUB_ENV | |
echo "PHP_SDK_VC_TOOLSET_VER=$env:VCToolsVersion" >> $Env:GITHUB_ENV | |
echo "PHP_SDK_VS=vs16" >> $Env:GITHUB_ENV | |
echo "PHP_SDK_VS_NUM=16" >> $Env:GITHUB_ENV | |
echo "PHP_SDK_VS_SHELL_CMD=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat amd64" >> $Env:GITHUB_ENV | |
$X_PATH = "${CURRENT_DIR}\php-sdk-binary-tools\bin;${CURRENT_DIR}\php-sdk-binary-tools\msys2\usr\bin;${CURRENT_DIR}\nasm\;$env:PATH" | |
echo $X_PATH | |
echo "PATH=$X_PATH" >> $Env:GITHUB_ENV | |
- name: build all library | |
run: | | |
$CURRENT_DIR = Get-Location | |
where perl | |
php -v | |
perl -v | |
nasm -v | |
- name: build php | |
run: | | |
$CURRENT_DIR = Get-Location |