Skip to content

PHPC-888: Support additional TLS libraries for bundled libmongoc #736

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 19 commits into from
Jan 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
acinclude.m4
aclocal.m4
autom4te.cache
build
/build
config.guess
config.h
config.h.in
Expand Down Expand Up @@ -49,7 +49,7 @@ php.ini
!.github/
!tests/utils/*.php
!.travis.yml
!.travis.scripts/*
!.travis.scripts/


!scripts
Expand Down
26 changes: 26 additions & 0 deletions .travis.scripts/before_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh

if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
# https://github.com/eddyxu/cpp-coveralls#linux
pip install --user cpp-coveralls
fi

if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
brew update
brew upgrade

brew tap homebrew/homebrew-php
brew install "${PHP_VERSION}"

# http://brewformulas.org/Lcov
brew install lcov

# https://github.com/eddyxu/cpp-coveralls#os-x
brew install pyenv
eval "$(pyenv init -)"
pyenv install 2.7.6
pyenv global 2.7.6
pyenv rehash
pip install cpp-coveralls
pyenv rehash
fi
18 changes: 18 additions & 0 deletions .travis.scripts/before_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

CONFIGURE_OPTS="--enable-developer-flags --enable-coverage"

if [ -n "${SSL_VERSION}" ]; then
CONFIGURE_OPTS="${CONFIGURE_OPTS} --with-mongodb-ssl=${SSL_VERSION}"
fi

phpize
./configure ${CONFIGURE_OPTS}
make all -j4
make install

# Add the extension to php.ini
echo "extension=mongodb.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`

# Predefine the test server
echo '{"STANDALONE": "mongodb:\/\/127.0.0.1:27017"}' > /tmp/PHONGO-SERVERS.json
42 changes: 0 additions & 42 deletions .travis.scripts/compile.sh

This file was deleted.

9 changes: 7 additions & 2 deletions .travis.scripts/debug-core.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/sh

PHP=/home/travis/.phpenv/versions/`php -r 'echo PHP_VERSION;'`/bin/php
echo "backtrace full" | gdb $PHP $1
if [ "${TRAVIS_OS_NAME}" != "osx" ]; then
# https://www.ics.uci.edu/~pattis/common/handouts/macmingweclipse/allexperimental/mac-gdb-install.html
echo "Cannot debug core files on macOS: ${1}"
exit 1
fi

PHP_BINARY=`which php`
gdb -batch -ex "bt full" -ex "quit" "${PHP_BINARY}" "${1}"
15 changes: 15 additions & 0 deletions .travis.scripts/debug-diff.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

EXP=`echo $1 | sed 's/.diff$/.exp/'`
OUT=`echo $1 | sed 's/.diff$/.out/'`
SEP="--------------------------------------------------------------------------------"

echo $EXP
echo $SEP
cat $EXP; echo
echo $SEP; echo

echo $OUT
echo $SEP
cat $OUT; echo
echo $SEP; echo
19 changes: 0 additions & 19 deletions .travis.scripts/debug-script.sh

This file was deleted.

52 changes: 33 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,33 @@
language: php
php:
- 7.2
- 7.1
- 7.0
- 5.6
- 5.5

addons:
apt:
packages:
- gdb
- lcov

matrix:
include:
- os: linux
dist: trusty
sudo: false
php: 5.5
- os: linux
dist: trusty
sudo: false
php: 5.6
- os: linux
dist: trusty
sudo: false
php: 7.0
- os: linux
dist: trusty
sudo: false
php: 7.1
- os: linux
dist: trusty
sudo: false
php: 7.2

services:
- mongodb
Expand All @@ -13,24 +36,15 @@ env:
global:
- TEST_PHP_ARGS="-q -s output.txt -g XFAIL,FAIL,BORK,WARN,LEAK,SKIP -x --show-diff"
- REPORT_EXIT_STATUS=1
- MONGODB_ORCHESTRATION="http://localhost:8889"
- MONGODB_ORCHESTRATION_REPO="git+git://github.com/mongodb/mongo-orchestration@master"
- MONGODB_ORCHESTRATION_PRESETS_ROOT=`pwd`
- secure: "Dofd9NvXIKEat1PMiia3RQgNsJLaKtzZRf9rM4MsqFaBQPbJmVWPANJkayJPcK+l8pLxHyzzH7WqxML+SlBhBTHdJB++1woXxoVwm+sDdwSye6e+eXc3/zRUxb7zyItBZcvVp2tIJpx5kXJb+CoUQakbfWEQQFk4xrOF0R56+8Y="
- secure: "pfGVPucvgcgcefhtzAVeejlpOtn4TnAqJSTM8mJkBl36KdU9P7hMuD3czQ4drWgzZ373/VT5UVhLu/HNsdbW0YBTeqPKJ4YNjqVVLytI8xT7y2Lw9l+I7o93j98TMgAoo8nVRmp/E4D6yutbKK1eddrcmf899R1iJbw8v8d1Ht8="

before_install:
- sudo pip install --upgrade cpp-coveralls
- sudo pip install ${MONGODB_ORCHESTRATION_REPO}
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't see where mongo orchestration is installed through in the new code.

Copy link
Member Author

Choose a reason for hiding this comment

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

See ef72444d5239f43792a942cd9938b89bb4fbde1c. These were merely artifacts from when Hannes was using Mongo Orchestration locally to spin up test environments (PHPC-128). I found nothing in our current .travis.yml files that actually launched Mongo Orchestration, so this all appears to be dead code.

- sudo apt-get update
- sudo apt-get install gdb valgrind
- sudo apt-get install cdbs debhelper build-essential python-lxml
- .travis.scripts/before_install.sh
- php -r 'if ( ! ($f = php_ini_loaded_file())) { $f = PHP_CONFIG_FILE_PATH . "/php.ini"; } file_put_contents($f, "variables_order=EGPCS\n", FILE_APPEND); $a = file($f, FILE_IGNORE_NEW_LINES); var_dump($a[count($a)-1]);'

before_script:
- ulimit -a
- ulimit -c unlimited || true
- "./.travis.scripts/compile.sh"
- .travis.scripts/before_script.sh

script:
- make test
Expand All @@ -39,5 +53,5 @@ after_success:
- make coveralls

after_failure:
- find . -name \*core\* -exec ./.travis.scripts/debug-core.sh {} \;
- find . -name \*diff -exec ./.travis.scripts/debug-script.sh {} \;
- find . -name 'core*' -exec .travis.scripts/debug-core.sh {} \;
- find . -name '*.diff' -exec .travis.scripts/debug-diff.sh {} \;
Loading