Skip to content

Commit

Permalink
Implement PHP library inclusion (#161)
Browse files Browse the repository at this point in the history
Co-authored-by: Pete Bishop <[email protected]>
  • Loading branch information
PeteBishwhip and Pete Bishop authored Feb 19, 2025
1 parent 54b9e1d commit a9de439
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/build-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ jobs:
echo "PHP_EXTENSIONS=$EXTENSIONS" >> $GITHUB_ENV
echo "PHP_EXT_HASH=$EXT_HASH" >> $GITHUB_ENV
- name: Read PHP libraries from file
id: read-libs
shell: bash
run: |
LIBRARIES=$(php -r "echo trim(file_get_contents('php-libraries.txt'));")
LIBRARIES_HASH=$(php -r "echo md5(getenv('LIBRARIES'));")
echo "PHP_LIBS=$LIBRARIES" >> $GITHUB_ENV
# Cache downloaded source
- id: cache-spc-downloads
uses: actions/cache@v4
Expand All @@ -145,7 +153,7 @@ jobs:
- name: Build PHP
run: |
cd ../static-php-cli
./bin/${{ env.SPC_BINARY }} build --build-cli "${{ env.PHP_EXTENSIONS }}"
./bin/${{ env.SPC_BINARY }} build --build-cli "${{ env.PHP_EXTENSIONS }}" --with-libs="${{ env.PHP_LIBS }}"
cd ../php-bin
- name: Get built PHP version
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.DS_Store
.idea
vendor
1 change: 1 addition & 0 deletions php-libraries.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libjpeg,freetype,libwebp

0 comments on commit a9de439

Please sign in to comment.