Skip to content

Extension matrix tests #4

Extension matrix tests

Extension matrix tests #4

name: Extension matrix tests
on:
workflow_dispatch:
schedule:
- cron: "0 1 * * 5"
jobs:
test:
name: "${{ matrix.extension }} (PHP ${{ matrix.php-version }} on ${{ matrix.operating-system }})"
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
extension:
- apcu
- bcmath
- bz2
- calendar
- ctype
- curl
- dba
- dom
- ds
- event
- exif
- filter
- fileinfo
- ftp
- gd
- gettext
- gmp
- iconv
- igbinary
- imagick
- imap
- intl
- ldap
- mbstring,mbregex
- memcache
- mysqli,mysqlnd,pdo_mysql
- opcache
- openssl
- pcntl
- password-argon2
- pcntl
- pdo
- pgsql,pdo_pgsql
- phar
- posix
- rar
- protobuf
- readline
- redis
- session
- shmop
- simdjson
- simplexml,xml
- snappy
- soap
- sockets
- sodium
- sqlite3,pdo_sqlite
- sqlsrv
- ssh2
- swoole
- swow
- sysvmsg,sysvsem,sysvshm
- tidy
- tokenizer
- uv
- xhprof
- xmlwriter,xmlreader
- xsl
- yac
- yaml
- zip
- zlib
- zstd
php-version:
- "8.3"
operating-system:
- "ubuntu-latest"
#- "macos-13"
#- "debian-arm64-self-hosted"
- "macos-14"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: OS type
id: os-type
run: |
OS=""
if [ "${{ matrix.operating-system }}" = "ubuntu-latest" ]; then
OS="linux-x86_64"
elif [ "${{ matrix.operating-system }}" = "macos-13" ]; then
OS="macos-x86_64"
elif [ "${{ matrix.operating-system }}" = "debian-arm64-self-hosted" ]; then
OS="linux-aarch64"
elif [ "${{ matrix.operating-system }}" = "macos-14" ]; then
OS="macos-aarch64"
fi
echo "OS=$OS" >> $GITHUB_ENV
- name: Download SPC bin artifact for self-hosted runners
uses: dawidd6/action-download-artifact@v2
with:
repo: crazywhalecc/static-php-cli
branch: main
workflow: release-build.yml
name: "spc-${{ env.OS }}"
- name: Validate SPC bin
run: |
chmod +x spc
./spc --version
- id: cache-download
uses: actions/cache@v3
with:
path: downloads
key: php-${{ matrix.php-version }}-dependencies-for-tests
# If there's no dependencies cache, fetch sources
- name: "Download sources"
env:
GITHUB_TOKEN: ${{ secrets.S_GITHUB_TOKEN }}
run: ./spc download --with-php=${{ matrix.php-version }} --for-extensions=${{ matrix.extension }}
- name: "Build library: ${{ matrix.library }}"
run: |
SPC_USE_SUDO=yes ./spc doctor --auto-fix
if [ "${{ env.OS }}" = "linux-x86_64" ]; then
./spc install-pkg upx
UPX=--with-upx-pack
elif [ "${{ env.OS }}" = "linux-aarch64" ]; then
./spc install-pkg upx
UPX=--with-upx-pack
fi
./spc build --build-cli --build-micro --build-fpm ${{ matrix.extension }} --debug $UPX --with-suggested-libs