From 90f514cf213829d53a3cb8f5fad2316b29631067 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 9 Aug 2023 14:15:38 +0200 Subject: [PATCH] Add Windows build to nightly Also stop running 32-bit in push, it's really not necessary. --- .github/actions/setup-windows/action.yml | 18 ++++++++++++ .github/workflows/nightly.yml | 35 ++++++++++++++++++++++++ .github/workflows/push.yml | 33 +++++----------------- 3 files changed, 60 insertions(+), 26 deletions(-) create mode 100644 .github/actions/setup-windows/action.yml diff --git a/.github/actions/setup-windows/action.yml b/.github/actions/setup-windows/action.yml new file mode 100644 index 00000000000..4786242455a --- /dev/null +++ b/.github/actions/setup-windows/action.yml @@ -0,0 +1,18 @@ +name: Setup +runs: + using: composite + steps: + - name: Setup MySQL + shell: pwsh + run: | + choco install mysql -y --no-progress --params="/port:3306" + mysql.exe --port=3306 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH PRIVILEGES;" + - name: Setup MSSQL + shell: pwsh + run: | + choco install sql-server-express -y --no-progress --install-arguments="/SECURITYMODE=SQL /SAPWD=Password12!" + - name: Setup PostgreSQL + shell: pwsh + run: | + Set-Service -Name "postgresql-x64-14" -StartupType manual -Status Running + pwsh -Command { $env:PGPASSWORD="root"; & "$env:PGBIN\psql" -U postgres -c "ALTER USER postgres WITH PASSWORD 'Password12!';" } diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index dff19b9c46a..e098c904e3d 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -645,3 +645,38 @@ jobs: uses: ./.github/actions/notify-slack with: token: ${{ secrets.ACTION_MONITORING_SLACK }} + WINDOWS: + strategy: + fail-fast: false + matrix: + include: + - x64: true + zts: true + opcache: true + - x64: false + zts: false + opcache: false + name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}" + runs-on: windows-2019 + env: + PHP_BUILD_CACHE_BASE_DIR: C:\build-cache + PHP_BUILD_OBJ_DIR: C:\obj + PHP_BUILD_CACHE_SDK_DIR: C:\build-cache\sdk + PHP_BUILD_SDK_BRANCH: php-sdk-2.2.0 + PHP_BUILD_CRT: vs16 + PLATFORM: ${{ matrix.x64 && 'x64' || 'x86' }} + THREAD_SAFE: "${{ matrix.zts && '1' || '0' }}" + INTRINSICS: "${{ matrix.zts && 'AVX2' || '' }}" + PARALLEL: -j2 + OPCACHE: "${{ matrix.opcache && '1' || '0' }}" + steps: + - name: git config + run: git config --global core.autocrlf false && git config --global core.eol lf + - name: git checkout + uses: actions/checkout@v3 + - name: Setup + uses: ./.github/actions/setup-windows + - name: Build + run: .github/scripts/windows/build.bat + - name: Test + run: .github/scripts/windows/test.bat diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 1984814eebd..54279fb28f7 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -154,17 +154,7 @@ jobs: - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files WINDOWS: - strategy: - fail-fast: false - matrix: - include: - - x64: true - zts: false - opcache: true - - x64: false - zts: true - opcache: false - name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}" + name: WINDOWS_X64_ZTS runs-on: windows-2019 env: PHP_BUILD_CACHE_BASE_DIR: C:\build-cache @@ -172,27 +162,18 @@ jobs: PHP_BUILD_CACHE_SDK_DIR: C:\build-cache\sdk PHP_BUILD_SDK_BRANCH: php-sdk-2.2.0 PHP_BUILD_CRT: vs16 - PLATFORM: ${{ matrix.x64 && 'x64' || 'x86' }} - THREAD_SAFE: "${{ matrix.zts && '1' || '0' }}" - INTRINSICS: "${{ matrix.zts && 'AVX2' || '' }}" + PLATFORM: x64 + THREAD_SAFE: "1" + INTRINSICS: AVX2 PARALLEL: -j2 - OPCACHE: "${{ matrix.opcache && '1' || '0' }}" + OPCACHE: "1" steps: - name: git config run: git config --global core.autocrlf false && git config --global core.eol lf - name: git checkout uses: actions/checkout@v3 - - name: Setup MySQL - run: | - choco install mysql -y --no-progress --params="/port:3306" - mysql.exe --port=3306 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH PRIVILEGES;" - - name: Setup MSSQL - run: | - choco install sql-server-express -y --no-progress --install-arguments="/SECURITYMODE=SQL /SAPWD=Password12!" - - name: Setup PostgreSQL - run: | - Set-Service -Name "postgresql-x64-14" -StartupType manual -Status Running - pwsh -Command { $env:PGPASSWORD="root"; & "$env:PGBIN\psql" -U postgres -c "ALTER USER postgres WITH PASSWORD 'Password12!';" } + - name: Setup + uses: ./.github/actions/setup-windows - name: Build run: .github/scripts/windows/build.bat - name: Test