Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-php-library
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
mongo-php-library
Commits
7eead743
Unverified
Commit
7eead743
authored
Jan 16, 2020
by
Andreas Braun
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #706
parents
ee0b4539
672c34ed
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
19 deletions
+51
-19
.travis.yml
.travis.yml
+14
-19
install-extension.sh
.travis/install-extension.sh
+37
-0
No files found.
.travis.yml
View file @
7eead743
...
@@ -31,7 +31,7 @@ jobs:
...
@@ -31,7 +31,7 @@ jobs:
php
:
"
7.1"
php
:
"
7.1"
before_install
:
[]
before_install
:
[]
before_script
:
before_script
:
-
pecl install -f mongodb-${DRIVER_VERSION}
-
.travis/install-extension.sh
-
composer require --no-update doctrine/coding-standard=^6.0
-
composer require --no-update doctrine/coding-standard=^6.0
-
composer install --no-interaction --no-progress --no-suggest ${COMPOSER_OPTIONS}
-
composer install --no-interaction --no-progress --no-suggest ${COMPOSER_OPTIONS}
script
:
vendor/bin/phpcs
script
:
vendor/bin/phpcs
...
@@ -112,6 +112,18 @@ jobs:
...
@@ -112,6 +112,18 @@ jobs:
env
:
env
:
-
DEPLOYMENT=SHARDED_CLUSTER_RS
-
DEPLOYMENT=SHARDED_CLUSTER_RS
# Test next patch release for driver
-
stage
:
Test
php
:
"
7.3"
env
:
-
DRIVER_BRANCH="v1.6"
# Test next minor release for driver
-
stage
:
Test
php
:
"
7.3"
env
:
-
DRIVER_BRANCH="master"
before_install
:
before_install
:
-
pip install "mongo-orchestration>=0.6.7,<1.0" --user `whoami`
-
pip install "mongo-orchestration>=0.6.7,<1.0" --user `whoami`
-
export SERVER_FILENAME=mongodb-linux-x86_64-${SERVER_DISTRO}-${SERVER_VERSION}
-
export SERVER_FILENAME=mongodb-linux-x86_64-${SERVER_DISTRO}-${SERVER_VERSION}
...
@@ -120,28 +132,11 @@ before_install:
...
@@ -120,28 +132,11 @@ before_install:
-
mongod --version
-
mongod --version
-
mongo-orchestration --version
-
mongo-orchestration --version
-
export MO_PATH=`python -c 'import mongo_orchestration; from os import path; print(path.dirname(mongo_orchestration.__file__));'`
-
export MO_PATH=`python -c 'import mongo_orchestration; from os import path; print(path.dirname(mongo_orchestration.__file__));'`
-
|
INI=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
# tpecl is a helper to compile and cache php extensions
tpecl () {
local ext_name=$1
local ext_so=$2
local ext_dir=$(php -r "echo ini_get('extension_dir');")
local ext_cache=~/php-ext/$(basename $ext_dir)/$ext_name
if [[ -e $ext_cache/$ext_so ]]; then
echo extension = $ext_cache/$ext_so >> $INI
else
mkdir -p $ext_cache
echo yes | pecl install -f $ext_name &&
cp $ext_dir/$ext_so $ext_cache
fi
}
export -f tpecl
before_script
:
before_script
:
-
mongo-orchestration start
-
mongo-orchestration start
-
.travis/setup_mo.sh
-
.travis/setup_mo.sh
-
pecl install -f mongodb-${DRIVER_VERSION}
-
.travis/install-extension.sh
-
php --ri mongodb
-
php --ri mongodb
-
composer update --no-interaction --no-progress --no-suggest --prefer-dist --prefer-stable ${COMPOSER_OPTIONS}
-
composer update --no-interaction --no-progress --no-suggest --prefer-dist --prefer-stable ${COMPOSER_OPTIONS}
-
ulimit -c
-
ulimit -c
...
...
.travis/install-extension.sh
0 → 100755
View file @
7eead743
#!/bin/sh
INI
=
~/.phpenv/versions/
$(
phpenv version-name
)
/etc/conf.d/travis.ini
# tpecl is a helper to compile and cache php extensions
tpecl
()
{
local
ext_name
=
$1
local
ext_so
=
$2
local
ext_dir
=
$(
php
-r
"echo ini_get('extension_dir');"
)
local
ext_cache
=
~/php-ext/
$(
basename
$ext_dir
)
/
$ext_name
if
[[
-e
$ext_cache
/
$ext_so
]]
;
then
echo
extension
=
$ext_cache
/
$ext_so
>>
$INI
else
mkdir
-p
$ext_cache
echo yes
| pecl
install
-f
$ext_name
&&
cp
$ext_dir
/
$ext_so
$ext_cache
fi
}
if
[
"x
${
DRIVER_BRANCH
}
"
!=
"x"
]
;
then
echo
"Compiling driver branch
${
DRIVER_BRANCH
}
"
mkdir
-p
/tmp/compile
git clone https://github.com/mongodb/mongo-php-driver /tmp/compile/mongo-php-driver
cd
/tmp/compile/mongo-php-driver
git checkout
${
DRIVER_BRANCH
}
git submodule update
--init
phpize
./configure
--enable-mongodb-developer-flags
make all
-j20
>
/dev/null
make
install
echo
"extension=mongodb.so"
>>
`
php
--ini
|
grep
"Scan for additional .ini files in"
|
sed
-e
"s|.*:
\s
*||"
`
/mongodb.ini
elif
[
"x
${
DRIVER_VERSION
}
"
!=
"x"
]
;
then
echo
"Installing driver version
${
DRIVER_VERSION
}
from PECL"
tpecl mongodb-
${
DRIVER_VERSION
}
mongodb.so
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment