forked from pmmp/PHP-Binaries
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'pmmp:stable' into stable
- Loading branch information
Showing
5 changed files
with
137 additions
and
31 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,6 @@ updates: | |
directory: "/" | ||
schedule: | ||
interval: monthly | ||
groups: | ||
github-actions: | ||
patterns: ["*"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,94 @@ on: | |
required: true | ||
type: boolean | ||
|
||
env: | ||
MUSL_CROSS_MAKE_VERSION: 7b9487e56efc83c419a397af7df7f119001dc51c | ||
|
||
jobs: | ||
android: | ||
name: Android arm64 | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install tools and dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install make autoconf automake libtool libtool-bin m4 wget libc-bin gzip bzip2 bison g++ git re2c | ||
- name: Prepare compile.sh download cache | ||
id: download-cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ./download_cache | ||
key: compile-sh-cache-ssl-https-${{ hashFiles('./compile.sh') }} | ||
restore-keys: compile-sh-cache-ssl-https- | ||
|
||
- name: Fetch compiler cache | ||
id: compiler-cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ github.workspace }}/compiler | ||
key: musl-cross-make-${{ env.MUSL_CROSS_MAKE_VERSION }} | ||
restore-keys: musl-cross-make- | ||
|
||
- name: Checkout musl-cross-make | ||
if: steps.compiler-cache.outputs.cache-hit != 'true' | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: pmmp/musl-cross-make | ||
path: musl-cross-make | ||
ref: ${{ env.MUSL_CROSS_MAKE_VERSION }} | ||
|
||
- name: Build compiler | ||
if: steps.compiler-cache.outputs.cache-hit != 'true' | ||
working-directory: musl-cross-make | ||
run: | | ||
echo "TARGET = aarch64-linux-musl" > config.mak | ||
make -j$(nproc) | ||
make install | ||
mv ./output "${{ github.workspace }}/compiler" | ||
- name: Compile PHP | ||
run: | | ||
export PATH="${{ github.workspace }}/compiler/bin:$PATH" | ||
# Used "set -ex" instead of hashbang since script isn't executed with hashbang | ||
set -ex | ||
trap "exit 1" ERR | ||
./compile.sh -t android-aarch64 -x -j 4 -g -P ${{ inputs.pm-version-major }} -c ./download_cache -D -z ${{ inputs.php-version-base }} | ||
- name: Create tarball | ||
run: | | ||
tar -czf ./PHP-${{ inputs.php-version-base }}-Android-arm64-PM${{ inputs.pm-version-major }}.tar.gz bin | ||
tar -czf ./Z-PHP-${{ inputs.php-version-base }}-Android-arm64-PM${{ inputs.pm-version-major }}-debugging-symbols.tar.gz bin-debug | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: PHP-${{ inputs.php-version-base }}-Android-PM${{ inputs.pm-version-major }} | ||
path: | | ||
./*PHP-${{ inputs.php-version-base }}-Android-arm64-PM${{ inputs.pm-version-major }}*.tar.gz | ||
install.log | ||
compile.sh | ||
if-no-files-found: error | ||
|
||
- name: Prepare workspace for upload | ||
if: failure() | ||
run: tar -czf workspace.tar.gz install_data | ||
|
||
- name: Upload workspace | ||
uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: PHP-${{ inputs.php-version-base }}-Android-workspace-PM${{ inputs.pm-version-major }} | ||
path: | | ||
workspace.tar.gz | ||
if-no-files-found: error | ||
|
||
linux: | ||
name: Linux | ||
runs-on: ubuntu-20.04 | ||
|
@@ -51,15 +138,15 @@ jobs: | |
- name: Create tarball | ||
run: | | ||
tar -czf ./PHP-${{ inputs.php-version-base }}-Linux-x86_64-PM${{ inputs.pm-version-major }}.tar.gz bin | ||
tar -czf ./PHP-${{ inputs.php-version-base }}-Linux-x86_64-PM${{ inputs.pm-version-major }}-debugging-symbols.tar.gz bin-debug | ||
tar -czf ./Z-PHP-${{ inputs.php-version-base }}-Linux-x86_64-PM${{ inputs.pm-version-major }}-debugging-symbols.tar.gz bin-debug | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: PHP-${{ inputs.php-version-base }}-Linux-PM${{ inputs.pm-version-major }} | ||
path: | | ||
./PHP-${{ inputs.php-version-base }}-Linux-x86_64-PM${{ inputs.pm-version-major }}*.tar.gz | ||
./*PHP-${{ inputs.php-version-base }}-Linux-x86_64-PM${{ inputs.pm-version-major }}*.tar.gz | ||
install.log | ||
compile.sh | ||
if-no-files-found: error | ||
|
@@ -85,7 +172,7 @@ jobs: | |
include: | ||
- target-name: mac-x86-64 | ||
artifact-name: x86_64 | ||
image: macos-12 | ||
image: macos-13 | ||
- target-name: mac-arm64 | ||
artifact-name: arm64 | ||
image: macos-14 | ||
|
@@ -117,15 +204,15 @@ jobs: | |
- name: Create tarball | ||
run: | | ||
tar -czf ./PHP-${{ inputs.php-version-base }}-MacOS-${{ matrix.artifact-name }}-PM${{ inputs.pm-version-major }}.tar.gz bin | ||
tar -czf ./PHP-${{ inputs.php-version-base }}-MacOS-${{ matrix.artifact-name }}-PM${{ inputs.pm-version-major }}-debugging-symbols.tar.gz bin-debug | ||
tar -czf ./Z-PHP-${{ inputs.php-version-base }}-MacOS-${{ matrix.artifact-name }}-PM${{ inputs.pm-version-major }}-debugging-symbols.tar.gz bin-debug | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: PHP-${{ inputs.php-version-base }}-MacOS-${{ matrix.artifact-name }}-PM${{ inputs.pm-version-major }} | ||
path: | | ||
./PHP-${{ inputs.php-version-base }}-MacOS-${{ matrix.artifact-name}}-PM${{ inputs.pm-version-major }}*.tar.gz | ||
./*PHP-${{ inputs.php-version-base }}-MacOS-${{ matrix.artifact-name}}-PM${{ inputs.pm-version-major }}*.tar.gz | ||
install.log | ||
compile.sh | ||
if-no-files-found: error | ||
|
@@ -169,7 +256,7 @@ jobs: | |
run: | | ||
mkdir temp | ||
Compress-Archive -Path .\bin -DestinationPath "PHP-${{ inputs.php-version-base }}-Windows-x64-PM${{ inputs.pm-version-major }}.zip" | ||
move php-debug-pack-*.zip temp/PHP-${{ inputs.php-version-base }}-Windows-x64-PM${{ inputs.pm-version-major }}-debugging-symbols.zip | ||
move php-debug-pack-*.zip temp/Z-PHP-${{ inputs.php-version-base }}-Windows-x64-PM${{ inputs.pm-version-major }}-debugging-symbols.zip | ||
move temp\*.zip . | ||
- name: Upload artifacts | ||
|
@@ -178,15 +265,15 @@ jobs: | |
with: | ||
name: PHP-${{ inputs.php-version-base }}-Windows-PM${{ inputs.pm-version-major }} | ||
path: | | ||
PHP-${{ inputs.php-version-base }}-Windows-x64-PM${{ inputs.pm-version-major }}*.zip | ||
*PHP-${{ inputs.php-version-base }}-Windows-x64-PM${{ inputs.pm-version-major }}*.zip | ||
compile.log | ||
windows-compile-vs.bat | ||
if-no-files-found: error | ||
|
||
|
||
publish: | ||
name: Publish binaries | ||
needs: [linux, macos, windows] | ||
needs: [linux, macos, windows, android] | ||
runs-on: ubuntu-20.04 | ||
if: ${{ github.ref_name == 'stable' && github.ref_type == 'branch' && !contains(github.event.head_commit.message, '[no release]') }} | ||
concurrency: release-${{ inputs.php-version-base }}-pm${{ inputs.pm-version-major }} | ||
|
@@ -205,7 +292,7 @@ jobs: | |
uses: actions/download-artifact@v4 | ||
with: | ||
path: ${{ github.workspace }} | ||
pattern: "PHP-${{ inputs.php-version-base }}-*-PM${{ inputs.pm-version-major }}" | ||
pattern: "*PHP-${{ inputs.php-version-base }}-*-PM${{ inputs.pm-version-major }}" | ||
|
||
- name: Generate release notes | ||
run: | | ||
|
@@ -237,9 +324,8 @@ jobs: | |
if: ${{ inputs.special-release != 'none' }} | ||
with: | ||
artifacts: | | ||
${{ github.workspace }}/PHP-*-Linux-PM*/*.tar.gz | ||
${{ github.workspace }}/PHP-*-MacOS-*-PM*/*.tar.gz | ||
${{ github.workspace }}/PHP-*-Windows-PM*/*.zip | ||
${{ github.workspace }}/*PHP-*-PM*/*.tar.gz | ||
${{ github.workspace }}/*PHP-*-Windows-PM*/*.zip | ||
name: PM ${{ inputs.pm-version-major }}.x (${{ steps.date.outputs.DATE }}) - Recommended | ||
tag: pm${{ inputs.pm-version-major }}-latest | ||
commit: ${{ github.sha }} | ||
|
@@ -253,9 +339,8 @@ jobs: | |
uses: ncipollo/[email protected] | ||
with: | ||
artifacts: | | ||
${{ github.workspace }}/PHP-*-Linux-PM*/*.tar.gz | ||
${{ github.workspace }}/PHP-*-MacOS-*-PM*/*.tar.gz | ||
${{ github.workspace }}/PHP-*-Windows-PM*/*.zip | ||
${{ github.workspace }}/*PHP-*-PM*/*.tar.gz | ||
${{ github.workspace }}/*PHP-*-Windows-PM*/*.zip | ||
name: PM ${{ inputs.pm-version-major }}.x (${{ steps.date.outputs.DATE }}) - PHP ${{ inputs.php-version-base }} | ||
tag: pm${{ inputs.pm-version-major }}-php-${{ inputs.php-version-base }}-latest | ||
commit: ${{ github.sha }} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,9 +56,8 @@ jobs: | |
uses: ncipollo/[email protected] | ||
with: | ||
artifacts: | | ||
${{ github.workspace }}/PHP-*-Linux-PM*/*.tar.gz | ||
${{ github.workspace }}/PHP-*-MacOS-*-PM*/*.tar.gz | ||
${{ github.workspace }}/PHP-*-Windows-PM*/*.zip | ||
${{ github.workspace }}/*PHP-*-PM*/*.tar.gz | ||
${{ github.workspace }}/*PHP-*-Windows-PM*/*.zip | ||
name: PHP (Build ${{ github.run_number }}) - Archive | ||
tag: php-build-${{ github.run_number }} | ||
commit: ${{ github.sha }} | ||
|
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
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