Skip to content

Commit 331e4ba

Browse files
committed
Compile without macOS & Android for now
1 parent e43ddcc commit 331e4ba

File tree

2 files changed

+3
-152
lines changed

2 files changed

+3
-152
lines changed

.github/workflows/main-pm-matrix.yml

Lines changed: 0 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -24,89 +24,6 @@ env:
2424
MUSL_CROSS_MAKE_VERSION: 43fcb1e63786b96add78f89d7454709ae0159fa0
2525

2626
jobs:
27-
android:
28-
name: Android arm64
29-
runs-on: ubuntu-22.04
30-
31-
steps:
32-
- uses: actions/checkout@v5
33-
34-
- name: Install tools and dependencies
35-
run: |
36-
sudo apt-get update
37-
sudo apt-get install make autoconf automake libtool libtool-bin m4 wget libc-bin gzip bzip2 bison g++ git re2c
38-
39-
- name: Prepare compile.sh download cache
40-
id: download-cache
41-
uses: actions/cache@v4
42-
with:
43-
path: ./download_cache
44-
key: compile-sh-cache-ssl-https-${{ hashFiles('./compile.sh') }}
45-
restore-keys: compile-sh-cache-ssl-https-
46-
47-
- name: Fetch compiler cache
48-
id: compiler-cache
49-
uses: actions/cache@v4
50-
with:
51-
path: ${{ github.workspace }}/compiler
52-
key: musl-cross-make-${{ env.MUSL_CROSS_MAKE_VERSION }}
53-
54-
- name: Checkout musl-cross-make
55-
if: steps.compiler-cache.outputs.cache-hit != 'true'
56-
uses: actions/checkout@v5
57-
with:
58-
repository: pmmp/musl-cross-make
59-
path: musl-cross-make
60-
ref: ${{ env.MUSL_CROSS_MAKE_VERSION }}
61-
62-
- name: Build compiler
63-
if: steps.compiler-cache.outputs.cache-hit != 'true'
64-
working-directory: musl-cross-make
65-
run: |
66-
echo "TARGET = aarch64-linux-musl" > config.mak
67-
make -j$(nproc)
68-
make install
69-
mv ./output "${{ github.workspace }}/compiler"
70-
71-
- name: Compile PHP
72-
run: |
73-
export PATH="${{ github.workspace }}/compiler/bin:$PATH"
74-
75-
# Used "set -ex" instead of hashbang since script isn't executed with hashbang
76-
set -ex
77-
trap "exit 1" ERR
78-
./compile.sh -t android-aarch64 -x -j 4 -g -P ${{ inputs.pm-version-major }} -c ./download_cache -D -z ${{ inputs.php-version-base }}
79-
80-
81-
- name: Create tarball
82-
run: |
83-
tar -czf ./PHP-${{ inputs.php-version-base }}-Android-arm64-PM${{ inputs.pm-version-major }}.tar.gz bin
84-
tar -czf ./Z-PHP-${{ inputs.php-version-base }}-Android-arm64-PM${{ inputs.pm-version-major }}-debugging-symbols.tar.gz bin-debug
85-
86-
- name: Upload artifacts
87-
uses: actions/upload-artifact@v4
88-
if: always()
89-
with:
90-
name: PHP-${{ inputs.php-version-base }}-Android-PM${{ inputs.pm-version-major }}
91-
path: |
92-
./*PHP-${{ inputs.php-version-base }}-Android-arm64-PM${{ inputs.pm-version-major }}*.tar.gz
93-
install.log
94-
compile.sh
95-
if-no-files-found: error
96-
97-
- name: Prepare workspace for upload
98-
if: failure()
99-
run: tar -czf workspace.tar.gz install_data
100-
101-
- name: Upload workspace
102-
uses: actions/upload-artifact@v4
103-
if: failure()
104-
with:
105-
name: PHP-${{ inputs.php-version-base }}-Android-workspace-PM${{ inputs.pm-version-major }}
106-
path: |
107-
workspace.tar.gz
108-
if-no-files-found: error
109-
11027
linux:
11128
name: Linux
11229
runs-on: ubuntu-22.04
@@ -163,72 +80,6 @@ jobs:
16380
workspace.tar.gz
16481
if-no-files-found: error
16582

166-
macos:
167-
name: MacOS ${{ matrix.artifact-name }}
168-
runs-on: ${{ matrix.image }}
169-
strategy:
170-
matrix:
171-
include:
172-
- target-name: mac-x86-64
173-
artifact-name: x86_64
174-
image: macos-13
175-
- target-name: mac-arm64
176-
artifact-name: arm64
177-
image: macos-14
178-
179-
steps:
180-
- uses: actions/checkout@v5
181-
182-
- name: Install tools and dependencies
183-
run: |
184-
#workaround github actions default image providing outdated pkg-config
185-
brew uninstall --ignore-dependencies --force pkg-config@0.29.2 || true
186-
brew install libtool autoconf automake pkg-config bison re2c
187-
188-
- name: Prepare compile.sh download cache
189-
id: download-cache
190-
uses: actions/cache@v4
191-
with:
192-
path: ./download_cache
193-
key: compile-sh-cache-ssl-https-${{ hashFiles('./compile.sh') }}
194-
restore-keys: compile-sh-cache-ssl-https-
195-
196-
- name: Compile PHP
197-
run: |
198-
export PATH="/usr/local/opt/bison/bin:$PATH"
199-
set -ex
200-
trap "exit 1" ERR
201-
./compile.sh -t ${{ matrix.target-name }} -j4 -g -P ${{ inputs.pm-version-major }} -c ./download_cache -D -z ${{ inputs.php-version-base }}
202-
203-
- name: Create tarball
204-
run: |
205-
tar -czf ./PHP-${{ inputs.php-version-base }}-MacOS-${{ matrix.artifact-name }}-PM${{ inputs.pm-version-major }}.tar.gz bin
206-
tar -czf ./Z-PHP-${{ inputs.php-version-base }}-MacOS-${{ matrix.artifact-name }}-PM${{ inputs.pm-version-major }}-debugging-symbols.tar.gz bin-debug
207-
208-
- name: Upload artifacts
209-
uses: actions/upload-artifact@v4
210-
if: always()
211-
with:
212-
name: PHP-${{ inputs.php-version-base }}-MacOS-${{ matrix.artifact-name }}-PM${{ inputs.pm-version-major }}
213-
path: |
214-
./*PHP-${{ inputs.php-version-base }}-MacOS-${{ matrix.artifact-name}}-PM${{ inputs.pm-version-major }}*.tar.gz
215-
install.log
216-
compile.sh
217-
if-no-files-found: error
218-
219-
- name: Prepare workspace for upload
220-
if: failure()
221-
run: tar -czf workspace.tar.gz install_data
222-
223-
- name: Upload workspace
224-
uses: actions/upload-artifact@v4
225-
if: failure()
226-
with:
227-
name: PHP-${{ inputs.php-version-base }}-MacOS-${{ matrix.artifact-name }}-workspace-PM${{ inputs.pm-version-major }}
228-
path: |
229-
workspace.tar.gz
230-
if-no-files-found: error
231-
23283
windows:
23384
name: Windows
23485
runs-on: windows-2022

windows-compile-vs.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,8 @@ function build-grpc {
389389
write-install
390390
sdk-command "cmake -P cmake_install.cmake || exit 1"
391391

392-
Move-Item "third_party\protobuf\php\ext\google\protobuf" "$SOURCES_PATH\php-src\ext\protobuf" >> $log_file 2>&1
393-
Move-Item "third_party\protobuf\third_party" "$SOURCES_PATH\php-src\ext\protobuf\third_party" >> $log_file 2>&1
392+
Move-Item "third_party\protobuf\php\ext\google\protobuf" "$SOURCES_PATH\ext\protobuf" >> $log_file 2>&1
393+
Move-Item "third_party\protobuf\third_party" "$SOURCES_PATH\ext\protobuf\third_party" >> $log_file 2>&1
394394

395395
@"
396396
ARG_ENABLE("protobuf", "Enable Protobuf extension", "yes");
@@ -402,7 +402,7 @@ if (PHP_PROTOBUF != "no") {
402402
403403
AC_DEFINE('HAVE_PROTOBUF', 1, '');
404404
}
405-
"@ | Out-File -Encoding ascii -FilePath $SOURCES_PATH\php-src\ext\protobuf\config.w32
405+
"@ | Out-File -Encoding ascii -FilePath $SOURCES_PATH\ext\protobuf\config.w32
406406

407407
write-done
408408
Pop-Location

0 commit comments

Comments
 (0)