ext-matrix-tests.yml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. name: "Extension matrix tests"
  2. on:
  3. workflow_dispatch:
  4. pull_request:
  5. branches: [ "main" ]
  6. paths:
  7. - '.github/workflows/ext-matrix-tests.yml'
  8. jobs:
  9. test:
  10. name: "${{ matrix.extension }} (PHP ${{ matrix.php-version }} on ${{ matrix.operating-system }})"
  11. runs-on: ${{ matrix.operating-system }}
  12. strategy:
  13. fail-fast: false
  14. matrix:
  15. extension:
  16. - amqp
  17. - apcu
  18. - bcmath
  19. - bz2
  20. - calendar
  21. - ctype
  22. - curl
  23. - dba
  24. - dom
  25. - ds
  26. - event
  27. - exif
  28. - filter
  29. - fileinfo
  30. - ftp
  31. - gd
  32. - gettext
  33. - gmp
  34. - iconv
  35. - igbinary
  36. - imagick
  37. - imap
  38. - intl
  39. - ldap
  40. - mbstring,mbregex
  41. - memcache
  42. - mysqli,mysqlnd,pdo_mysql
  43. - opcache
  44. - openssl
  45. - pcntl
  46. - password-argon2
  47. - pcntl
  48. - pdo
  49. - pgsql,pdo_pgsql
  50. - phar
  51. - posix
  52. - rar
  53. - protobuf
  54. - readline
  55. - redis
  56. - session
  57. - shmop
  58. - simdjson
  59. - simplexml,xml
  60. - snappy
  61. - soap
  62. - sockets
  63. - sodium
  64. - sqlite3,pdo_sqlite
  65. - sqlsrv
  66. - ssh2
  67. - swoole
  68. - swoole,swoole-hook-pgsql,swoole-hook-mysql,swoole-hook-sqlite
  69. - swow
  70. - sysvmsg,sysvsem,sysvshm
  71. - tidy
  72. - tokenizer
  73. - uuid
  74. - uv
  75. - xhprof
  76. - xlswriter
  77. - xmlwriter,xmlreader
  78. - xsl
  79. - yac
  80. - yaml
  81. - zip
  82. - zlib
  83. - zstd
  84. php-version:
  85. - "8.4"
  86. operating-system:
  87. - "ubuntu-latest"
  88. #- "macos-13"
  89. #- "debian-arm64-self-hosted"
  90. - "macos-14"
  91. steps:
  92. - name: "Checkout"
  93. uses: "actions/checkout@v4"
  94. - name: OS type
  95. id: os-type
  96. run: |
  97. OS=""
  98. if [ "${{ matrix.operating-system }}" = "ubuntu-latest" ]; then
  99. OS="linux-x86_64"
  100. elif [ "${{ matrix.operating-system }}" = "macos-13" ]; then
  101. OS="macos-x86_64"
  102. elif [ "${{ matrix.operating-system }}" = "debian-arm64-self-hosted" ]; then
  103. OS="linux-aarch64"
  104. elif [ "${{ matrix.operating-system }}" = "macos-14" ]; then
  105. OS="macos-aarch64"
  106. fi
  107. echo "OS=$OS" >> $GITHUB_ENV
  108. - name: "Setup PHP"
  109. uses: shivammathur/setup-php@v2
  110. with:
  111. php-version: 8.2
  112. tools: pecl, composer
  113. extensions: curl, openssl, mbstring
  114. ini-values: memory_limit=-1
  115. env:
  116. phpts: nts
  117. - name: "Install Dependencies"
  118. run: composer update -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
  119. - id: cache-download
  120. uses: actions/cache@v4
  121. with:
  122. path: downloads
  123. key: php-${{ matrix.php-version }}-dependencies-for-tests
  124. # If there's no dependencies cache, fetch sources
  125. - name: "Download sources"
  126. env:
  127. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  128. run: ./bin/spc download --with-php=${{ matrix.php-version }} --for-extensions=${{ matrix.extension }} --debug --ignore-cache-sources=php-src
  129. - name: "Build library: ${{ matrix.library }}"
  130. run: |
  131. SPC_USE_SUDO=yes ./bin/spc doctor --auto-fix
  132. if [ "${{ env.OS }}" = "linux-x86_64" ]; then
  133. ./bin/spc install-pkg upx
  134. UPX=--with-upx-pack
  135. elif [ "${{ env.OS }}" = "linux-aarch64" ]; then
  136. ./bin/spc install-pkg upx
  137. UPX=--with-upx-pack
  138. fi
  139. ./bin/spc build --build-cli --build-micro --build-fpm ${{ matrix.extension }} --debug $UPX --with-suggested-libs --with-suggested-exts