8000 CI: Add php 5.x to test matrix by glensc · Pull Request #89 · perftools/php-profiler · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

CI: Add php 5.x to test matrix #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jan 20, 2025
13 changes: 11 additions & 2 deletions .github/workflows/tests-mongodb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ jobs:
- "7.3"
- "7.4"
include:
- php: "5.3"
phpunit: "4"
- php: "5.4"
phpunit: "4"
- php: "5.5"
phpunit: "4"
- php: "5.6"
phpunit: "4"
- php: "7.0"
phpunit: "6"

Expand All @@ -39,14 +47,15 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: xdebug, xhprof, mongodb, tideways_xhprof
extensions: xdebug, xhprof, mongo, mongodb, tideways_xhprof

- name: Validate composer.json and composer.lock
run: composer validate

- name: Install dependencies
run: |
composer install --prefer-dist --no-progress
composer remove alcaeus/mongo-php-adapter --no-update --dev
composer install --prefer-dist
composer require --dev phpunit/phpunit:^$PHPUNIT_VERSION

- name: Install extensions
Expand Down
21 changes: 14 additions & 7 deletions install-extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,21 @@ has_extension() {
}

install_xhprof() {
local version="${1:-stable}"
local ext="xhprof" version="${1:-stable}"

has_extension "xhprof" && return 0
pecl install xhprof-$version
has_extension "$ext" && return 0
# https://github.com/shivammathur/setup-php/issues/905
sudo rm -rf /tmp/pear # shivammathur's leftovers...
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# Allow installing to /usr/local/php
sudo chown -R "$(id -un):" /usr/local/php/
pecl install "$ext-$version"
}

install_mongo() {
echo no | pecl install mongo
local ext="mongo" version="${1:-stable}"

has_extension "$ext" && return 0
echo no | pecl install "$ext-$version"
}

install_mongodb() {
Expand Down Expand Up @@ -58,13 +65,13 @@ install_tideways_xhprof() {
has_extension "$extension"
}

# Show php config paths
php --ini
pecl version
php -m

case "$(uname -s):$PHP_VERSION" in
*:5.*)
install_xhprof 0.9.4
install_mongo
install_mongo 1.6.16
;;
Linux:7.*|Linux:8.*)
install_xhprof
Expand Down
0