-
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.
- Loading branch information
Showing
3 changed files
with
293 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,168 @@ | ||
name: Compile and install PHP from source | ||
description: Compile and install PHP from source | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout php-src repo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: php/php-src | ||
path: .php-src | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
set -x | ||
export DEBIAN_FRONTEND=noninteractive | ||
sudo apt update -y | true | ||
sudo apt install -y \ | ||
autoconf \ | ||
gcc \ | ||
make \ | ||
curl \ | ||
unzip \ | ||
bison \ | ||
re2c \ | ||
locales \ | ||
ldap-utils \ | ||
openssl \ | ||
slapd \ | ||
language-pack-de \ | ||
libgmp-dev \ | ||
libicu-dev \ | ||
libtidy-dev \ | ||
libenchant-2-dev \ | ||
libbz2-dev \ | ||
libsasl2-dev \ | ||
libxpm-dev \ | ||
libzip-dev \ | ||
libsqlite3-dev \ | ||
libsqlite3-mod-spatialite \ | ||
libwebp-dev \ | ||
libonig-dev \ | ||
libcurl4-openssl-dev \ | ||
libxml2-dev \ | ||
libxslt1-dev \ | ||
libpq-dev \ | ||
libreadline-dev \ | ||
libldap2-dev \ | ||
libsodium-dev \ | ||
libargon2-0-dev \ | ||
libmm-dev \ | ||
libsnmp-dev \ | ||
# postgresql \ | ||
# postgresql-contrib \ | ||
snmpd \ | ||
snmp-mibs-downloader \ | ||
freetds-dev \ | ||
unixodbc-dev \ | ||
llvm \ | ||
clang \ | ||
# dovecot-core \ | ||
# dovecot-pop3d \ | ||
# dovecot-imapd \ | ||
sendmail \ | ||
firebird-dev \ | ||
liblmdb-dev \ | ||
libtokyocabinet-dev \ | ||
libdb-dev \ | ||
libqdbm-dev \ | ||
libjpeg-dev \ | ||
libpng-dev \ | ||
libfreetype6-dev | ||
cd .. | ||
- name: Configure build | ||
shell: bash | ||
run: | | ||
set -x | ||
cd .php-src | ||
./buildconf --force | ||
./configure \ | ||
--enable-option-checking=fatal \ | ||
--prefix=/usr \ | ||
--enable-phpdbg \ | ||
--enable-fpm \ | ||
--with-pdo-mysql=mysqlnd \ | ||
--with-mysqli=mysqlnd \ | ||
--with-pgsql \ | ||
--with-pdo-pgsql \ | ||
--with-pdo-sqlite \ | ||
--enable-intl \ | ||
--without-pear \ | ||
--enable-gd \ | ||
--with-jpeg \ | ||
--with-webp \ | ||
--with-freetype \ | ||
--with-xpm \ | ||
--enable-exif \ | ||
--with-zip \ | ||
--with-zlib \ | ||
--enable-soap \ | ||
--enable-xmlreader \ | ||
--with-xsl \ | ||
--with-tidy \ | ||
--enable-sysvsem \ | ||
--enable-sysvshm \ | ||
--enable-shmop \ | ||
--enable-pcntl \ | ||
--with-readline \ | ||
--enable-mbstring \ | ||
--with-curl \ | ||
--with-gettext \ | ||
--enable-sockets \ | ||
--with-bz2 \ | ||
--with-openssl \ | ||
--with-gmp \ | ||
--enable-bcmath \ | ||
--enable-calendar \ | ||
--enable-ftp \ | ||
--with-enchant=/usr \ | ||
--enable-sysvmsg \ | ||
--with-ffi \ | ||
--enable-zend-test \ | ||
--enable-dl-test=shared \ | ||
--with-ldap \ | ||
--with-ldap-sasl \ | ||
--with-password-argon2 \ | ||
--with-mhash \ | ||
--with-sodium \ | ||
--enable-dba \ | ||
--with-cdb \ | ||
--enable-flatfile \ | ||
--enable-inifile \ | ||
--with-tcadb \ | ||
--with-lmdb \ | ||
--with-qdbm \ | ||
--with-snmp \ | ||
--with-unixODBC \ | ||
--with-pdo-odbc=unixODBC,/usr \ | ||
--with-config-file-path=/etc \ | ||
--with-config-file-scan-dir=/etc/php.d \ | ||
--with-pdo-firebird \ | ||
--with-pdo-dblib \ | ||
--enable-werror | ||
cd ../ | ||
- name: Compile | ||
shell: bash | ||
run: | | ||
cd ./.php-src | ||
make -j$(/usr/bin/nproc) | ||
cd ../ | ||
- name: Install | ||
shell: bash | ||
run: | | ||
set -x | ||
sudo make install | ||
sudo mkdir -p /etc/php.d | ||
sudo chmod 777 /etc/php.d | ||
cd ../ | ||
- name: Cleanup | ||
shell: bash | ||
run: | | ||
rm .php-src |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Tests | ||
permissions: read-all | ||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
name: PHP ${{ matrix.php-versions }} - Test | ||
strategy: | ||
matrix: | ||
operating-system: ['ubuntu-latest'] | ||
php-versions: | ||
- '8.4' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: ./.github/actions/compile-php | ||
|
||
- name: Display versions and env | ||
run: | | ||
php -v | ||
php -m | ||
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 |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: Symbol updater | ||
permissions: read-all | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "20 4 * * *" | ||
|
||
jobs: | ||
run: | ||
runs-on: ${{ matrix.operating-system }} | ||
name: PHP ${{ matrix.php-versions }} - Dump | ||
strategy: | ||
matrix: | ||
operating-system: ['ubuntu-latest'] | ||
php-versions: | ||
- '5.3' | ||
- '5.4' | ||
- '5.5' | ||
- '5.6' | ||
- '7.0' | ||
- '7.1' | ||
- '7.2' | ||
- '7.3' | ||
- '7.4' | ||
- '8.0' | ||
- '8.1' | ||
- '8.2' | ||
- '8.3' | ||
- '8.4' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@verbose | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
env: | ||
update: true | ||
|
||
- name: Display versions and env | ||
run: | | ||
php -v | ||
php -m | ||
- name: "Install Composer dependencies" | ||
run: | ||
composer dump-autoload | ||
|
||
- name: Dump data | ||
run: | | ||
php bin/dump.php | ||
- name: Upload data | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.php-versions }} | ||
path: scratch | ||
|
||
collect: | ||
needs: run | ||
runs-on: ubuntu-latest | ||
name: Collect and Commit Data | ||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
name: Checkout main repo | ||
|
||
- uses: actions/checkout@v4 | ||
name: Checkout data repo | ||
with: | ||
repository: PHPWatch/PHP-Symbols | ||
path: data | ||
token: ${{ secrets.DATA_REPO_PAT }} | ||
|
||
- name: Collect data | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: scratch | ||
|
||
- name: Prime files | ||
run: | | ||
cp scratch/* data/ -Rf | ||
- name: List dirs | ||
run: find data | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/" | ||
|
||
- name: Generate commit message | ||
id: commit_msg | ||
run: echo "commit_msg=$(date +"%Y %b %d")" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Commit data | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: ${{ steps.commit_msg.outputs.commit_msg }} | ||
branch: main | ||
repository: data | ||
add_options: '-A' |