Skip to content

Commit 8092407

Browse files
iluuu1994ju1ius
authored andcommitted
Add Windows build to nightly
Also stop running 32-bit in push, it's really not necessary.
1 parent c72f7bd commit 8092407

File tree

3 files changed

+57
-131
lines changed

3 files changed

+57
-131
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Setup
2+
runs:
3+
using: composite
4+
steps:
5+
- name: Setup MySQL
6+
shell: pwsh
7+
run: |
8+
choco install mysql -y --no-progress --params="/port:3306"
9+
mysql.exe --port=3306 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH PRIVILEGES;"
10+
- name: Setup MSSQL
11+
shell: pwsh
12+
run: |
13+
choco install sql-server-express -y --no-progress --install-arguments="/SECURITYMODE=SQL /SAPWD=Password12!"
14+
- name: Setup PostgreSQL
15+
shell: pwsh
16+
run: |
17+
Set-Service -Name "postgresql-x64-14" -StartupType manual -Status Running
18+
pwsh -Command { $env:PGPASSWORD="root"; & "$env:PGBIN\psql" -U postgres -c "ALTER USER postgres WITH PASSWORD 'Password12!';" }

.github/workflows/nightly.yml

Lines changed: 32 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -728,111 +728,38 @@ jobs:
728728
uses: ./.github/actions/notify-slack
729729
with:
730730
token: ${{ secrets.ACTION_MONITORING_SLACK }}
731-
PECL:
732-
if: github.repository_owner == 'php' || github.event_name == 'workflow_dispatch'
733-
runs-on: ubuntu-22.04
731+
WINDOWS:
732+
strategy:
733+
fail-fast: false
734+
matrix:
735+
include:
736+
- x64: true
737+
zts: true
738+
opcache: true
739+
- x64: false
740+
zts: false
741+
opcache: false
742+
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
743+
runs-on: windows-2019
734744
env:
735-
CC: ccache gcc
736-
CXX: ccache g++
745+
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
746+
PHP_BUILD_OBJ_DIR: C:\obj
747+
PHP_BUILD_CACHE_SDK_DIR: C:\build-cache\sdk
748+
PHP_BUILD_SDK_BRANCH: php-sdk-2.2.0
749+
PHP_BUILD_CRT: vs16
750+
PLATFORM: ${{ matrix.x64 && 'x64' || 'x86' }}
751+
THREAD_SAFE: "${{ matrix.zts && '1' || '0' }}"
752+
INTRINSICS: "${{ matrix.zts && 'AVX2' || '' }}"
753+
PARALLEL: -j2
754+
OPCACHE: "${{ matrix.opcache && '1' || '0' }}"
737755
steps:
738-
- name: git checkout PHP
739-
uses: actions/checkout@v3
740-
with:
741-
path: php
742-
- name: git checkout apcu
743-
uses: actions/checkout@v3
744-
with:
745-
repository: krakjoe/apcu
746-
path: apcu
747-
- name: git checkout imagick
748-
uses: actions/checkout@v3
749-
with:
750-
repository: Imagick/imagick
751-
path: imagick
752-
- name: git checkout memcached
753-
uses: actions/checkout@v3
754-
with:
755-
repository: php-memcached-dev/php-memcached
756-
path: memcached
757-
- name: git checkout redis
758-
uses: actions/checkout@v3
759-
with:
760-
repository: phpredis/phpredis
761-
path: redis
762-
- name: git checkout xdebug
763-
uses: actions/checkout@v3
764-
with:
765-
repository: xdebug/xdebug
766-
path: xdebug
767-
- name: git checkout yaml
756+
- name: git config
757+
run: git config --global core.autocrlf false && git config --global core.eol lf
758+
- name: git checkout
768759
uses: actions/checkout@v3
769-
with:
770-
repository: php/pecl-file_formats-yaml
771-
path: yaml
772-
- name: apt
773-
run: |
774-
sudo apt-get update
775-
sudo apt-get install -y --no-install-recommends \
776-
ccache \
777-
libmemcached-dev \
778-
bison \
779-
re2c
780-
- name: ccache
781-
uses: hendrikmuhs/ccache-action@v1.2
782-
with:
783-
key: "${{github.job}}-${{hashFiles('php/main/php_version.h')}}"
784-
append-timestamp: false
785-
- name: build PHP
786-
run: |
787-
cd php
788-
./buildconf --force
789-
./configure \
790-
--enable-option-checking=fatal \
791-
--prefix=/opt/php \
792-
--enable-cli \
793-
--disable-all \
794-
--enable-session \
795-
--enable-werror
796-
make -j$(/usr/bin/nproc)
797-
sudo make install
798-
- name: build apcu
799-
run: |
800-
cd apcu
801-
/opt/php/bin/phpize
802-
./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config
803-
make -j$(/usr/bin/nproc)
804-
- name: build imagick
805-
run: |
806-
cd imagick
807-
/opt/php/bin/phpize
808-
./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config
809-
make -j$(/usr/bin/nproc)
810-
- name: build memcached
811-
run: |
812-
cd memcached
813-
/opt/php/bin/phpize
814-
./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config
815-
make -j$(/usr/bin/nproc)
816-
- name: build redis
817-
run: |
818-
cd redis
819-
/opt/php/bin/phpize
820-
./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config
821-
make -j$(/usr/bin/nproc)
822-
- name: build xdebug
823-
run: |
824-
cd xdebug
825-
/opt/php/bin/phpize
826-
./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config
827-
make -j$(/usr/bin/nproc)
828-
- name: build yaml
829-
run: |
830-
cd yaml
831-
/opt/php/bin/phpize
832-
./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config
833-
make -j$(/usr/bin/nproc)
834-
- name: Notify Slack
835-
if: failure()
836-
uses: ./.github/actions/notify-slack
837-
with:
838-
token: ${{ secrets.ACTION_MONITORING_SLACK }}
760+
- name: Setup
761+
uses: ./.github/actions/setup-windows
762+
- name: Build
763+
run: .github/scripts/windows/build.bat
764+
- name: Test
765+
run: .github/scripts/windows/test.bat

.github/workflows/push.yml

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -184,45 +184,26 @@ jobs:
184184
- name: Verify generated files are up to date
185185
uses: ./.github/actions/verify-generated-files
186186
WINDOWS:
187-
strategy:
188-
fail-fast: false
189-
matrix:
190-
include:
191-
- x64: true
192-
zts: false
193-
opcache: true
194-
- x64: false
195-
zts: true
196-
opcache: false
197-
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
187+
name: WINDOWS_X64_ZTS
198188
runs-on: windows-2019
199189
env:
200190
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
201191
PHP_BUILD_OBJ_DIR: C:\obj
202192
PHP_BUILD_CACHE_SDK_DIR: C:\build-cache\sdk
203193
PHP_BUILD_SDK_BRANCH: php-sdk-2.2.0
204194
PHP_BUILD_CRT: vs16
205-
PLATFORM: ${{ matrix.x64 && 'x64' || 'x86' }}
206-
THREAD_SAFE: "${{ matrix.zts && '1' || '0' }}"
207-
INTRINSICS: "${{ matrix.zts && 'AVX2' || '' }}"
195+
PLATFORM: x64
196+
THREAD_SAFE: "1"
197+
INTRINSICS: AVX2
208198
PARALLEL: -j2
209-
OPCACHE: "${{ matrix.opcache && '1' || '0' }}"
199+
OPCACHE: "1"
210200
steps:
211201
- name: git config
212202
run: git config --global core.autocrlf false && git config --global core.eol lf
213203
- name: git checkout
214204
uses: actions/checkout@v3
215-
- name: Setup MySQL
216-
run: |
217-
choco install mysql -y --no-progress --params="/port:3306"
218-
mysql.exe --port=3306 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH PRIVILEGES;"
219-
- name: Setup MSSQL
220-
run: |
221-
choco install sql-server-express -y --no-progress --install-arguments="/SECURITYMODE=SQL /SAPWD=Password12!"
222-
- name: Setup PostgreSQL
223-
run: |
224-
Set-Service -Name "postgresql-x64-14" -StartupType manual -Status Running
225-
pwsh -Command { $env:PGPASSWORD="root"; & "$env:PGBIN\psql" -U postgres -c "ALTER USER postgres WITH PASSWORD 'Password12!';" }
205+
- name: Setup
206+
uses: ./.github/actions/setup-windows
226207
- name: Build
227208
run: .github/scripts/windows/build.bat
228209
- name: Test

0 commit comments

Comments
 (0)